Tunnel your browser connections (i.e. your web traffic) through an SSH tunnel.

August 24th, 2012 by exhuma.twn

I actually did not believe it’s this simple.

Creating the tunnel is as easy as typing:

ssh -D 1080 user@remote_host

Which can be improved with

ssh -fND 1080 user@remote_host

See the man page on the details of the extra options.

This will open up port 1080 on your local machine, providing a SOCKS proxy (SOCKS5 if I’m right). You can then specify this in any application supporting SOCKS proxies. This includes Firefox and Chrome. With Firefox it’s straight-forward. You can find it in the usual proxy page in the settings.

For chrome it’s a bit more tricky. While you can specify a SOCKS proxy, it seems to ignore it. If you want to enable your tunnel, you have to run chrome with the following command-line flag:

chromium-browser --proxy-server="socks5://localhost:1080"

(or use chrome. Whatever rocks your boat).

Once this is set up, what will happen is that your application/browser will send all requests to your locally running SSH instance. This in turn will forward it to the remote host, where the request will be sent out on the web. The response takes the inverse direction. As stated by linode, this is great if you’re on an untrustworthy network!

Sources:

Posted in Linux, Techno Voodoo | No Comments »

Git visualization with gource

May 7th, 2012 by latz.twn

Are you using git/svn/mercurial/bazaar as version control system and you ever wanted to visualize your work, how the project developed over time well Gource is there to visualize all this in a beautiful way. It takes the history of your svn/git/mercurial/bazaar repository and visualizes the changes over time, by whom they were done and so forth.

sudo apt-get install gource

Now run the following with path/to/project being your projects root directory, and give gource the .git subfolder. Run it and you should see the animation being presented.

gource /path/to/project/.git/

Now to export this to an mpeg4 video do the following.

gource /path/to/project/.git/ --stop-at-end --output-ppm-stream - | ffmpeg -y -b 6000k -r 60 -f image2pipe -vcodec ppm -i - -vcodec mpeg4 /tmp/gource.mp4

Here an example I created from one of my projects.

Posted in Linux | No Comments »

Monitoring memory on Solaris

April 24th, 2012 by exhuma.twn

I am currently writing a new munin plugin to monitor memory usage on Solaris machines. Strangely the existing plugins are fairly useless. Currently the script is running on a test-machine. If the results are satisfactory, I’ll post them here. Stay tuned.

Posted in Linux | No Comments »

Custom bash completion for fabric tasks

March 20th, 2012 by exhuma.twn

Here’s a small bash function to provide TAB-completion for fabric tasks.

Simply add the following to your ~/.bashrc

You may already have a block like if [ -f /etc/bash_completion ]... in that case, simply add the extra line into that block.

Have fun

Posted in Coding Voodoo, Linux | 2 Comments »

Making “File Size View” in Konqueror suck less

March 5th, 2010 by exhuma.twn

I’ve been down that road many times: “What folder takes up the most disk space”. Over the time lots of junk accumulates on one’s disk. So far the following one-liner has been a trusty companion:

$ du -s * | sort -n

Some other tools are available of which I don’t remember the names. But why not use something that integrates well with Konqueror in KDE? Like “FSView” (short for file-size view)? Well, for one thing it’s painfully slow, and what makes things worse it’s utterly unreadble. But what I figured out this afternoon, is that the app actually offers some quite nice settings. The buty of Konqueror integration is that the “plugins” can insert thei own menu-items wherever they like. Which is nice, because they then integrate well with already existing menu options. But on the other hand, if you are used to open menu paths like “Plugins -> MyPlugin -> Settings” or “Edit/Tools -> Options -> Plugins” you won’t find them.

In the case of fs-view, the options are neatly tucked away in the “View” menu. Which actually makes perfect sense. But working too much on Windows-inspired user interfaces twisted my mind too much and I go looking into the non-obvious places out of pure habit ;)

Now, to spice up fsview a bit I made the following changes:

  • In the “Visualisation” sub-menu:
    • Set “Nesting” to “Vertical”
    • Set “Border” Width to 3
    • Disabled both options “Enable Rotation” and “Shading”
  • In the “Stop at Area” sub-menu:
    • Set value to “400″
  • In the “Stop at Depth” sub-menu:
    • Set value to “2″

Both “Stop at …” settings limit the number of times fs-view has to redraw/rearrange the grid. This should speed things up and it becomes more readable. The end result looks something like this:

FSView with customizations

FSView with customizations

In any case, running fs-view on folders with a large number of files can be very slow and make konqueror even unresponsive while it’s running. Be patient. In my opinion, if you want to determine the biggest file/folder as quickly as possible, the “du -s” method (as outlined above) is preferrable.

Posted in Linux | No Comments »

Speed comparison of various terminals

September 6th, 2007 by exhuma.twn

Terminal speed comparisonI never cared about which terminal to chose. I usually ended up with aterm on non-KDE boxes and Konsole on KDE boxes. This comparison (and the attached comments) is actually quite interesting.

The results were quite surprising ;)

Posted in Linux | No Comments »

Pages

Recent Posts

Categories

Links


Archives

Meta