Archive

Posts Tagged ‘geek’

3 Favorite Geek Tips/Tricks

September 28th, 2009 No comments

Every geek should have at least a few tips or tricks that they don’t have to reference documentation or google for, here’s a few of my favorites that I use daily.

1) SSH Tunnels – Each and every time I’ve used this to cut half the time off a task I remember just how great SSH is.

When to use: Anytime you need internal access to a remote network. Or perhaps your company filters your internet usage and you need to check your gmail, this allows you to TUNNEL to your internet back at the house and ask it to do all the talking for you.

Example: I’m working from home, but I really need to access a ‘local’ resource on the remote network, it could be something as simple as connecting to the router on-site that doesn’t have remote access setup.

Howto Linux: If you’re a linux user, use the “-D” option with your standard ssh command. IE: ssh -l username -D 54321 sub.domain.com

Howto Windows: Get PuTTY. You’ll likely want to save this configuration so, open PuTTY, type in the hostname, give the session a name, on the left hand panel navigate to Connection->SSH->Tunnels. Under “Add New Forwarded Port” pick a port number, I like to use something high in the range, 54321 or you can pick your own. There are two rows of radio buttons, on the top choose “Dynamic” and leave the other as “Auto”, click “Add”. Now before connecting, on the left hand panel goto Sessions and click “Save”, now click “Open”

Utilizing the tunnel: What this essentially does is creates a secure SOCKS proxy for you to use. In Firefox, goto Preferences->Advanced->Network->Settings and set the SOCKS proxy address to “127.0.0.1″, that’s right, localhost (but don’t use ‘localhost’), then enter the port you chose earlier. Click “Ok” and you’re now surfing securely through SSH.

2) Converting movies to pocket size (linux only):
I have a simple Creative Zen 8GB Mp3 Player, it was cheap and works exactly as expected. It plays video of the same quality popular cell phones use, occasionally I want to watch a TV episode so I pieced together a simple little alias to make it quick and painless, you’ll need mencoder for this, if your on debian/ubuntu it’s as simple as ‘apt-get install mencoder’

Code (I put in ~/.bashrc): alias encode=’mencoder -ovc xvid -oac mp3lame -vf scale=320:240 -xvidencopts fixed_quant=4 -o ${args[0]} ${args[1]}’

Usage: encode outputFile.avi /path/to/file/to/convert.flv|avi|mpg

3) Using axel for super fast downloads
Situation: You’re remotely connected to a server you adminster, you’re crunched for time and need to download a file, maybe an ISO or perhaps a service pack, but you need it fast. You have no problem finding links to get it, but which do you use, which will be faster? The solution, grab 3 or 4 of those links and use axel.

Usage: axel -n X url1 url2 url3…
Replacing ‘X’ with the number of connections you want to use, passing as many URLs in as you’d like. In most cases, 3 or 4 seem to be enough to max out my 2MB/s.

Share