New games!!!

Posted on October 6th, 2008 by hamstar

Oh man, so excited. Bunch of new games coming last month, this month, and November, for the annual release-right-before-xmas bullshit. I’m just gonna make a list here so I remember to get them but put some links to videos for you:

Read more »

Tags: , ,

Process multiple items in command line

Posted on December 8th, 2007 by hamstar

This is great, I saw it somewhere the other day but can’t remember where. It is pretty simple too… sometimes when I do stuff on the command line with cut I try to run multiple commands on the output, but it never works cos I try to it with sed but with this method it works great.

Check it out:

for i in `ps auwx|grep hamstar|cut -f2 -d’ ‘`; do kill $i; done

That would kill all the processes that I have started under my username. Notice the red part is where it takes all the entries (puts each one into $i as it uses it, and the blue part is where it does something with the entries ($i again)). Adding kill to the start and ; to the end using sed would not work for this.

Ok that might a bit tricky for some of you, especially if you haven’t come across the miracle of piping yet, let me show you a simpler one.

for i in *; do echo $i; done

Basically another form of ls but thing of the things you can do with this. Rename from lowercase to uppercase:

for i in *; do mv $i `echo $i|tr [A-Z] [a-z]`; done

So its basically limitless to what you can do with this cool thing.

I also found another cool thing while writing this. Doing the following will covert all characters in a given file to lowercase or uppercase if you changed it:

dd file.txt conv=lcase

Tags: , ,

Open a remote machines window on your desktop

Posted on August 21st, 2007 by hamstar

So I found out a little while ago that the X server can do this thing where it outputs the window from the machine its running on, to a remote machine, also running an X server. I did this a few times and its pretty damn cool. Basically you simply open a console, set the DISPLAY variable to something like 10.0.0.2:0 and it will open on that IP and that display once you add your machine to that machines xhost list. You follow me? No?

Okay, here it is broken down. Lets say, you have two linux boxes, both running GUI’s, and you want to open gedit on one machine (machine1), but display it on the other machine (machine2):

Read more »

Tags: , ,