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

ClipIt clipboard manager trayicon under Ubuntu 11.10

In ubuntu 11.04 I had an icon at ~/.icons/Humanity/status/22/gtk-paste.svg so I would get a nice systray icon for ClipIt. But ClipIt changed something so now I had to cp the gtk-paste.svg to:

~/.icons/hicolor/scalable/apps/clipit-trayicon.svg

Then logout/login and I had a nice trayicon! Long live clipboard managers. I _really_ wouldn't want to miss them!

Install pcntl (pcntl_fork) on Ubuntu Hardy

No apt-getting on Hardy :(

CODE:
  1. cd ~/
  2. mkdir php
  3. cd php
  4. apt-get source php5
  5. cd php5-*/ext/pcntl
  6. phpize
  7. ./configure
  8. make
  9. no=`phpize | grep "Zend Module Api No" | cut -d : -f2 | awk '{gsub(/^ +| +$/,"")}1'`
  10. cp modules/pcntl.so /usr/lib/php5/$no/
  11. echo "extension=pcntl.so"> /etc/php5/conf.d/pcntl.ini

Lsyncd

FreeBSD rsync configI was messing around with some python script to test a spamassassin install. It checks al the mail in the spam folder an see if it is marked as spam. Then it goes through the mail in ham/ and see if it passes as not-spam.

So I'm developing it on my local computer but I wanted to test it on a remote server. Well, actually not that remote because I can touch it from where I'm sitting but that's not the point :) The point was that I needed something to keep the remote version of the sourcecode in sync with the local source. Google to the rescue and I found lsyncd.

A nice little tool to sync two directories with rsync. Too bad it didn't support transfers only via sftp because freebsd (the remote server) doesn't come with rsync installed. So I had to install that also :( Yeah, tough job....

CODE:
  1. cd /usr/ports/net/rsync
  2. make config
  3. make install

Then on the local machine:

CODE:
  1. lsyncd --no-daemon --delay 1 ~/Workspaces/spamassassin-test/ beastie:~/spamassassin-test/

You have to specify the remote directory or else it will wipe you home folder as I discovered...

After this was done I could go on developing.

vim on github!

Vim is now on a github repository. Check: https://github.com/LeonB/vim

rsync retry (rrsync)

Met onze super-stabiele connectie op het kantoor wil rsync er nog wel eens uitklappen. Dus als je dan 's ochtends kijkt hoe ver 'ie is kom je er achter dat rsync gestopt is. Daarom een rrsync. Gebasseerd op deze link: http://blog.iangreenleaf.com/2009/03/rsync-and-retrying-until-we-get-it.html maar iets beter gemaakt zodat het rsync commando er niet hard in staat:

(Misschien dat de indent niet helemaal goed is)

CODE:
  1. #!/bin/bash
  2.  
  3. ### ABOUT
  4. ### Runs rsync, retrying on errors up to a maximum number of tries.
  5. ### Simply edit the rsync line in the script to whatever parameters you need.
  6.  
  7. # Trap interrupts and exit instead of continuing the loop
  8. trap "echo Exited!; exit;" SIGINT SIGTERM
  9.  
  10. MAX_RETRIES=50
  11. i=0
  12. # Set the initial return value to failure
  13. false
  14.  
  15. while [ $? -ne 0 -a $i -lt $MAX_RETRIES ]
  16. do
  17. i=$(($i+1))
  18. `which rsync` $*
  19. done
  20.  
  21. if [ $i -eq $MAX_RETRIES ]
  22. then
  23. echo "Hit maximum number of retries, giving up."
  24. fi

Linux printer drivers for the Dell 1710n

Voila: http://www.cups.org/ppd.php?L483+I80+T+Q

Nice: github resumé

Generate your own Github resumé

Installing banshee + removing rhythmbox from the soundmenu

CODE:
  1. sudo add-apt-repository ppa:banshee-team/banshee-unstable
  2. sudo aptitude install banshee
  3. rm ~/.cache/indicators/sound/familiar-players-db.keyfile

And don't forget to enable the soundmenu plugin in banshee!