This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| petunia:~/scripts# cat psql.sh | |
| #!/bin/bash | |
| # Location of the backup logfile. | |
| timeslot=`date +%d-%m-%Y` | |
| # Location to backups. | |
| backup_dir="/backups/" | |
| mkdir -p $backup_dir/$timeslot/psql | |
| backup_dst=$backup_dir/$timeslot/psql | |
| logfile="$backup_dst/logfile.log" | |
| md5file="$backup_dst/md5sum.txt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| root@volatile:~# cat /etc/php5/conf.d/xdebug.ini | |
| xdebug.var_display_max_data = 10240 | |
| xdebug.var_display_max_depth = 4 | |
| xdebug.max_nesting_level = 100 | |
| xdebug.var_display_max_children = 128 | |
| zend_extension=/usr/lib/php5/20090626+lfs/xdebug.so |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- Remove '-', ':' and the space from a string | |
| preg_replace( '[-|:|\ ]' , '', $header['date'] ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # apt-get install bzr intltool imagemagick rar menu python-sexy python-sqlalchemy python-gtk2 python-glade2 gnome-icon-theme | |
| # apt-get -t lenny-backports install libgtk2.0-0 | |
| # bzr branch http://bazaar.launchpad.net/~wii.sceners.linux/wiithon/1.0 wiithon | |
| Modificar en el archivo gui.py - linea 80 | |
| self.uimgr.insert_action_group(actiongroup) | |
| por | |
| self.uimgr.insert_action_group(actiongroup, -1) | |
| # make install_auto_and_fix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| http://www.letsgeek.com/code/find-facebook-profile-from-photo/ | |
| Put this into the address bar: javascript:(function(){var sp = location.href.split('/'); var f = sp[sp.length-1].split('_'); window.open("http://www.facebook.com/profile.php?id="+f[2],Math.random()); })(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| apt-get install cryptsetup | |
| cryptsetup luksFormat /dev/sda5 | |
| cryptsetup luksOpen /dev/sda5 home | |
| mkfs.ext3 /dev/mapper/home | |
| echo "home /dev/sda5 none luks" >> /etc/crypttab | |
| echo "/dev/mapper/home /home ext3 defaults 0 2" >> /etc/fstab | |
| update-initramfs -u -k all | |
| reboot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Clone just one branch | |
| mkdir $BRANCH | |
| cd $BRANCH | |
| git init | |
| git remote add -t $BRANCH -f origin $REMOTE_REPO | |
| git checkout $BRANCH | |
| // Aliases and stuff | |
| git config --global user.name "Luis Uribe" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ gst-launch v4l2src ! video/x-raw-yuv,width=640,height=480 ! ffmpegcolorspace ! theoraenc ! oggmux ! filesink location=osug-1.og | |
| Thanks to http://noraisin.net/~jan/diary/?p=40 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| find . -name '*' | sort | while read i | |
| do | |
| NEWFILE=`echo $i | tr '[A-Z]' '[a-z]' | tr ' ' '_' | tr '(' '[' | tr ')' ']' | tr '&' 'N'` ; | |
| if [ "${i}" != "${NEWFILE}" ]; then | |
| mv "${i}" "${NEWFILE}" | |
| fi | |
| done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/dash | |
| # | |
| # TODO | |
| # - Fix code | |
| # - Port to phyton | |
| # Usage: ./script.sh -n | |
| # Variables | |
| #################################################################### | |
| encoder=/usr/bin/id3v2 |