Tag Archives: tips

Writing Safe Shell scripts

Posted in IT development | Tagged , , , , , , , , , , , , | Leave a comment

Continuous Integration from Git

Continuous Integration Not sure what to make of this yet. Seems interesting enough.

Posted in git | Tagged , , | Leave a comment

SSH Tricks

Forcing either IPv4 or IPv6 This is for the scenario that you know which specific protocol works to reach a particular host. Usually good to eliminate the delay for SSH to figure out to switch IP protocols. For IPv4: ssh … Continue reading

Posted in Linux | Tagged , , , | Leave a comment

Diskless Archlinux

I am still to test this recipe Server Configuration First of all, we must install the following components: A DHCP server to assign IP addresses to our diskless nodes. A TFTP server to transfer the boot image (a requirement of … Continue reading

Posted in Linux | Tagged , , | Leave a comment

ArchLinux tips

Custom Repos and Packages In the repo directory, put all the packages in there. repo-add ./custom.db.tar.gz ./* Add to pacman.conf: [custom] SigLevel = [Package|Databse]Never|Optional|Required Server = path-to-repo See also repo-remove. A package database is a tar file, optionally compressed. Valid … Continue reading

Posted in Linux | Tagged , , | Leave a comment

Kerberos howtos

Kerberos is a network authentication protocol which works on the basis of “tickets” to allow nodes communicating over a non-secure network to prove their identity to one another in a secure manner. (Source Kerberos_(protocol) ) Backups Create backup: kdb5_util dump … Continue reading

Posted in IT development | Tagged , , , , | Leave a comment

Mirroring a Gitorious repository to GitHub

There is nothing special with GitHub and Gitorious here. This technique would work exactly the same the other way around or with other servers. In a nutshell # Inital setup git clone –mirror git://gitorious.org/weasyprint/weasyprint.git weasyprint GIT_DIR=weasyprint git remote add github … Continue reading

Posted in git | Tagged , | Leave a comment

Git recipes

Rewriting history Rolling back the last commit if nobody has pulled your remote repo yet, you can change your branch HEAD and force push it to said remote repo: git reset –hard HEAD^ git push -f Restoring changes So in … Continue reading

Posted in git | Tagged , , , , , , , , , , | Leave a comment

PHP Tips

Object oriented introspection property_exists(obj,prop_name) method_exists(obj,method_name) is_a(obj,’clas_name’) or ($obj instanceof ClassName) Dynamic coding Call a method: call_user_func(array($obj,’method’,…args…) You can simply $obj->prop = value to add properties. or you can use __set and __get. See http://php.net/manual/en/language.oop5.overloading.php varargs func_get_arg(num) func_get_args() func_get_num_args()

Posted in IT development, Linux, Web | Tagged , , , | Leave a comment

Google Services Tips

Cleaning up Google Calendar Sign in to Google Calendar Click on Calendar Settings (current version has this just above the list of personal calendars, under an arrow). Click on “Delete” of the main calendar. A confirmation dialog box appears telling … Continue reading

Posted in IT | Tagged , , | Leave a comment