ACTA / SOPA / PIPA

Iedereen die het nog niet gedaan heeft: onderteken de ACTA petitie nu!

git add -u

This is a nice one:

CODE:
  1. git add -u

This only adds already commited files to a new commit. And leaves files not in the git repository alone.

Ubuntu 11.10 on my laptop and ufw

I decided on enabling ufw (uncomplicated firewall) on my laptop (you can't be secure enough). Too bad it isn't enabled by default on Ubuntu. So I had to do this:

CODE:
  1. sudo ufw enable
  2. sudo ufw default deny
  3. sudo ufw deny "Dovecot POP3"
  4. sudo ufw deny "Dovecot IMAP"
  5. sudo ufw deny "Dovecot Secure IMAP"
  6. sudo ufw deny "Dovecot Secure POP3"
  7. sudo ufw status verbose

Listing contents of a tar.gz and extracting one specific directory

CODE:
  1. # tar -ztvf babyhuiscasita.nl.tar.gz |grep sql
  2. # tar -xzvf babyhuiscasita.nl.tar.gz ./.backup/babyhuiscasita.nl_mysql

-t = list
-x = extract

Asus k53sv & ubuntu power management

Using my new Asus k53sv with Ubuntu 11.10 resulted in 2 hours of battery time. I know the k53 doesn't have a fancy battery (quite the opposite) but I thought 2 hours was really bad.

With the power regression bug of the Linux kernel in my mind, I started searching. A lot of posts suggested using "pcie_aspm=force". I tried that by editing the grub menu, but that didn't really help (at all). dmesg kept complaining about the bios not letting it so that was a dead end.

Phoronix suggested enabling some power options for the i915 chipset (onboard videocard).

So I changed the following in /etc/default/grub:

CODE:
  1. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"

to:

CODE:
  1. GRUB_CMDLINE_LINUX_DEFAULT="quiet splash pcie_aspm=force i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1"

After a reboot the remaining battery time had changed from 2 hours to a little less than 3 hours. That's an improvement of almost 50%!

The only downside was that after a suspend (to memory) the screen gets garbled. But after a ctrl+F1 and ctrl+F8 that's fixed. So I'm actually quite happy know. Thanks Phoronix!

3 useful route commands

To route an ip address through a (vpn) connection:

CODE:
  1. sudo route add -net XX.192.85.XX netmask 255.255.255.255 gw 192.168.1.1
  2. sudo route add -net 10.76.122.0 netmask 255.255.255.0 gw 192.168.1.1
  3. route -n

Sublime Text 2

I installed sublime text on my Ubuntu 11.10 box but I had some troubled loading external python modules:

CODE:
  1. loaded 937 snippets
  2. >>> import distutils
  3. Traceback (most recent call last):
  4.   File "<string>", line 1, in <module>
  5. ImportError: No module named distutils

This is how I solved it:

Edited ~/.local/share/applications/sublime.desktop
Especially this line:

CODE:
  1. Exec="/home/leon/Software/bin/sublime" %U

/home/leon/Software/bin/sublime contains this:

CODE:
  1. #!/bin/bash
  2. cd /usr/lib/python2.7
  3. /home/leon/Software/SublimeText2/sublime_text

Then I installed some excellent plugins:

Chaning the glippy indicator icon

Copy the mono paste icon over to ~/.icons/Humanity/actions/22/edit-paste.svg

 

Using rsync with spaces

Something to never forget again:

CODE:
  1. rsync --recursive me@remote:'"~/Very complicated path/"' ~/Downloads/

So: single quote, double quote, path, double quote, single quote

The continuing story of Zend Studio 5.5.1

Everytime I install a new version of Ubuntu / Linux I'm hoping Zend Studio (the old/good one) will still be working. So I installed Ubuntu 11.10 and also this time I had to install some stuff to get Zend Studio working.

CODE:
  1. sudo apt-get install libc6-i386 ia32-libs
  2. ln -s /lib32/libc.so.6 /lib/libc.so.6

And it worked! Know I'm gonna try do update the JRE of the Zend Studio 5.5