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)


#!/bin/bash

### ABOUT
### Runs rsync, retrying on errors up to a maximum number of tries.
### Simply edit the rsync line in the script to whatever parameters you need.

# Trap interrupts and exit instead of continuing the loop
trap "echo Exited!; exit;" SIGINT SIGTERM

MAX_RETRIES=50
i=0
# Set the initial return value to failure
false

while [ $? -ne 0 -a $i -lt $MAX_RETRIES ]
do
i=$(($i+1))
`which rsync` $*
done

if [ $i -eq $MAX_RETRIES ]
then
echo "Hit maximum number of retries, giving up."
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

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

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

Removing packages marked rc

I got an error when building the 2.32 version for ubuntu. Some packages once where installed but got removed. But they still had the status rc.

So I purged them with the help of this blog.

I compiled evolution with the help of a Makefile that I downloaded.

I had to add the “maverick” distro and install some additional packages such as:

  • gobject-introspection
  • autopoint
  • libgdata-dev

I removed the evolution-exchange plugin.

The master branch of gweather required gtk3 so I changed that to: gnome-2.30 (or something)
I had to apply a patch to solve a build error.

Bottom of this post: http://www.mail-archive.com/evolution-hackers@gnome.org/msg03863.html

http://www.mail-archive.com/evolution-list@gnome.org/msg15575.html

Zend_db

Zend Framework logoThe last few days I’ve been spending my time on creating a website with Zend Framework. A lot of it I liked but the Zend_db stuff is is a complicated piece of crap. I’ve worked with a lot of ORM’s and db api’s but the Zend_db stuff is really the most awfull I’ve had till now.

I really, really don’t want to work with it ever again and I regret that I chose ZF for this particular project just because of the db layer.

Don’t wat to type any explanation

[global]
security = ads
realm = LAB.EXAMPLE.COM
password server = 10.0.0.1
# note that workgroup is the 'short' domain name
workgroup = LAB
#       winbind separator = +
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind enum users = yes
winbind enum groups = yes
template homedir = /home/%D/%U
template shell = /bin/bash
client use spnego = yes
client ntlmv2 auth = yes
encrypt passwords = yes
winbind use default domain = yes
restrict anonymous = 2

security = ads
realm = TIM-ONLINE.NL
password server = 10.76.122.21
workgroup = TIM-ONLINE
idmap uid = 10000-20000
idmap gid = 10000-20000
winbind enum users = yes
winbind enum groups = yes
template homedir = /home/%D/%U
template shell = /bin/bash
client use spnego = yes
client ntlmv2 auth = yes
encrypt passwords = yes
winbind use default domain = yes
winbind use default domain = yes
winbind refresh tickets = yes

netbios name = concepts
netbiosname = concepts

#Vista compatibliyy
client schannel = Auto
server schannel = Auto

sudo /etc/init.d/winbind stop
sudo /etc/init.d/smbd restart
sudo /etc/init.d/winbind start

net ads join -U administrator

/etc/init.d/winbind restart

wbinfo -u
wbinfo -g

file: /etc/pam.d/common-session

session required pam_unix.so
session required pam_mkhomedir.so umask=0022 skel=/etc/skel

Nice guide to upgrading magento

http://www.nicksays.co.uk/2010/03/fool-proof-magento-upgrades/

./pear upgrade --force magento-core/Mage_All_Latest

installing macvim with python interpreter

As easy as: sudo port install macvim +python :)

installing non-free-codecs in Ubuntu “Lucid Lynx” 10.04

A very nice article about installing the non-free-codes (wmv, wma, et cetera) in 10.04!