Quick and easy sharing of a directory over HTTP in Linux

Say you want to share a folder for a friend. What better way than pointing him to an URL? Put this in your .bash_profile and login to your account. alias webshare=‘python -c “import SimpleHTTPServer;SimpleHTTPServer.test()”‘ Now cd to the directory in question a do a simple webshare command. That folder will be accessible from any browser by typing http://your_ip:8000Alternatively, you… Read More »

Check your laptop battery in Linux

If you run Linux off a laptop, you might want to check your battery status alt least once a year: grep -F capacity: /proc/acpi/battery/BAT0/info This will output something like design capacity:         7800 mAhlast full capacity:      6414 mAh

Viewing a webcam with MPlayer in Linux

MPlayer has tons of other uses besides viewing video files. For example, you can view your webcam with it: mplayer -cache 128 -tv driver=v4l:width=640:height=480:outfmt=i420 -vc rawi420 -vo xv tv://

Show package sizes in Ubuntu

If you ever want to find out how much space your packages are using, do a simple dpkg-query -Wf ‘${Package}\t${Installed-Size}\n’