Iedereen die het nog niet gedaan heeft: onderteken de ACTA petitie nu!
ACTA / SOPA / PIPA
January 27th, 2012 — Uncategorized
git add -u
January 21st, 2012 — development
This is a nice one:
-
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
December 24th, 2011 — Linux
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:
-
sudo ufw enable
-
sudo ufw default deny
-
sudo ufw deny "Dovecot POP3"
-
sudo ufw deny "Dovecot IMAP"
-
sudo ufw deny "Dovecot Secure IMAP"
-
sudo ufw deny "Dovecot Secure POP3"
-
sudo ufw status verbose
Listing contents of a tar.gz and extracting one specific directory
December 9th, 2011 — Linux
-
# tar -ztvf babyhuiscasita.nl.tar.gz |grep sql
-
# tar -xzvf babyhuiscasita.nl.tar.gz ./.backup/babyhuiscasita.nl_mysql
-t = list
-x = extract
Asus k53sv & ubuntu power management
November 23rd, 2011 — Linux
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:
-
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to:
-
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
November 9th, 2011 — Linux
To route an ip address through a (vpn) connection:
-
sudo route add -net XX.192.85.XX netmask 255.255.255.255 gw 192.168.1.1
-
sudo route add -net 10.76.122.0 netmask 255.255.255.0 gw 192.168.1.1
-
route -n
Sublime Text 2
October 26th, 2011 — development, Linux, PHP, python, Ruby
I installed sublime text on my Ubuntu 11.10 box but I had some troubled loading external python modules:
-
loaded 937 snippets
-
>>> import distutils
-
Traceback (most recent call last):
-
File "<string>", line 1, in <module>
-
ImportError: No module named distutils
This is how I solved it:
Edited ~/.local/share/applications/sublime.desktop
Especially this line:
-
Exec="/home/leon/Software/bin/sublime" %U
/home/leon/Software/bin/sublime contains this:
-
#!/bin/bash
-
cd /usr/lib/python2.7
-
/home/leon/Software/SublimeText2/sublime_text
Then I installed some excellent plugins:
Chaning the glippy indicator icon
October 24th, 2011 — Linux
Copy the mono paste icon over to ~/.icons/Humanity/actions/22/edit-paste.svg
Using rsync with spaces
September 14th, 2011 — Linux
Something to never forget again:
-
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
September 6th, 2011 — Linux, PHP
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.
-
sudo apt-get install libc6-i386 ia32-libs
-
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