Friday, March 15, 2013

Going out for the weekend, need to idle. Script + contrab to the rescue!

Just a quick update on the TF2 Idling for Linux project, I haven't done much due to real life expectations. However I whipped up a quick shell script to run idle accounts quickly. Since I'm going out for the weekend, I just setup contrab to run my accounts at specific times. Hopfully this script will be of use to others.


#!/bin/bash
# Start an idle account
clear
echo "*******************************************"
echo "* TF2 Idle Start                          *"
echo "* Valid Accounts: 1-5                     *"
echo "*                                         *"
echo "*******************************************"
case $1 in
1) rm /home/cyhawk/.steam/steam.pid && nice -n 20 sudo arkose -h --device /dev/nvidiactl --device /dev/nvidia0 "steam -login login password1 -applaunch 440 -nomouse -textmode -nosound -low -novid -nopreload -noipx -nojoy -sw +sv_lan 1 -maxplayers 2 +map itemtest" ;;
2) rm /home/cyhawk/.steam/steam.pid && nice -n 20 sudo arkose -h --device /dev/nvidiactl --device /dev/nvidia0 "steam -login login password2 -applaunch 440 -nomouse -textmode -nosound -low -novid -nopreload -noipx -nojoy -sw +sv_lan 1 -maxplayers 2 +map itemtest" ;;
3) rm /home/cyhawk/.steam/steam.pid && nice -n 20 sudo arkose -h --device /dev/nvidiactl --device /dev/nvidia0 "steam -login login password3 -applaunch 440 -nomouse -textmode -nosound -low -novid -nopreload -noipx -nojoy -sw +sv_lan 1 -maxplayers 2 +map itemtest" ;;
4) rm /home/cyhawk/.steam/steam.pid && nice -n 20 sudo arkose -h --device /dev/nvidiactl --device /dev/nvidia0 "steam -login login password4 -applaunch 440 -nomouse -textmode -nosound -low -novid -nopreload -noipx -nojoy -sw +sv_lan 1 -maxplayers 2 +map itemtest" ;;
5) rm /home/cyhawk/.steam/steam.pid && nice -n 20 sudo arkose -h --device /dev/nvidiactl --device /dev/nvidia0 "steam -login login password5 -applaunch 440 -nomouse -textmode -nosound -low -novid -nopreload -noipx -nojoy -sw +sv_lan 1 -maxplayers 2 +map itemtest" ;;
S) su -l tf2server ;;
z) exit 0 ;;
*) echo "Invalid response. Exiting";
esac

My end goal is to have this script setup to automate running the hlds (restarting once a week) and starting and stopping idle accounts. Or perhaps a more user friendly interface, who the hell knows at this point. I'm just happy I can finish idling up this week. Don't forget to fix the paths and add in your username/passwords. Also to run this without the sudo password, you'll have to add arkose to the sudoers file:

sudo nano /etc/sudoers
Under: # User privilege specification, add
cyhawk  ALL=NOPASSWD : /usr/bin/arkose

change your username of course. Is this secure? I doubt it, but the machine I idle on isn't very secure to begin with.



I've also noticed memory usage for TF2 in -textmode can be quite varied. I've seen as low as 240mb and as high as 1.7gb. I have no idea why this is, or what resources it could possibly want to balloon up that far. I believe the answer to this will be to run a dedicated server locally and connect to it to combat the high memory usage. The HLDS doesn't use much and if you aren't running as a server memory usage drops down to 200-500mb which is quite acceptable. This should allow scaling of multiple idle accounts much easier. We'll see how this goes (hlds is currently updating again, i'll have results sometime next week)



Tuesday, March 5, 2013

Starting a business.

I've been using eCigs for a very long time now. My first 'mod' was an old flashlight, some stripped electronic wire and some cotton I salvaged from cotton balls. That was 8 years ago and eCigarettes have come a LONG way since then.

About 6 months ago, I picked up my first modern eCig, an eGo-T and some eJuice. And I played with it for a while. Then 47 days ago, I made a large order and haven't touched an analog cig since. Hell I even converted a few friends by accident. They just couldn't keep from asking questions and they ended up switching too after seeing my chain-smoking butt fully convert over.

Move forward to two weeks ago. My best friend (He was my first convert) came to be and said, "I have the best idea, lets sell eCigs! Lets start a business!" Now, I have to admit to you, I already wanted to try this on my own, I just didn't have the capital to begin. Now heres my best friend with the exact same idea as me with the sales ability I don't and the money to back it up. Fast forward two weeks, we have a shipment coming in from China, a website (only accepting reservations for the first kit right now) and at LEAST 70 pre-orders for this product. My head is currently spinning on how fast this got up and running.

Dealing with suppliers from China was massively overwhelming at first. The sheer number of suppliers for the same product is just insane. If I want a simple item, theres maybe 200+ companies to buy it from. All of them more than happy to email with quotes. (Also I should note, I now have a separate email address for this purpose. I once went out to play an MTG Draft and came home to 600+ emails. Oops) However one thing was constant. Everyone was incredibly friendly and more than happy to help. If I need my company's logo in 5 places they'll do it. If I want the batteries to be a specific color they're on it. My only complaint is getting a solid price from them. Whenever I search Alibaba for a basic part only a handful of suppliers provide the pricing, and even then its not correct.

I also had to setup a website, http://www.spartanvape.com in case you're wondering, and as of this post its VERY basic since we don't have any products physically in hand yet. Now 14 years ago, I started a business which failed horribly. I was young, I had $$ in my eyes and I surrounded myself with bad people. That aside setting up an eCommerce website was damned simple today compared to 14 years ago. I put maybe a total of 4 hours into the website to do what I needed it to do (just take reservations for now). Last time I did this, it took 9 weeks and 4 companies to get a website up and running. How things have changed. I ended up using Shopify. They may not be the cheapest but damn their admin interface is just... simple. I don't have to fight with anything, I love it.

My head is still spinning to the speed at which this is happening. I love it. I haven't been this excited about anything in many, many years.