The short tags in PHP have been deprecated as of 5.3.0. Short tags provided a shorter alternative to the annoying-to-type <?php and <?php echo. Instead, you could use <? and <?= respectively. This was great but it caused problems when working with XML files, and the short_tags option was disabled in the PHP config by [...]
Every Geek site needs an obligatory Bash Tips post
Copy Files Securely Between Two Machines
I used to always forget the syntax for this, until I realized that the syntax is exactly like the standard cp command. In fact, you can copy files like you normally would using scp, on your local machine. The following are equivalent:
$ [...]
This Bash script is used to calculate your Grade Point Average (GPA) on the command line. Usage might not be intuitive. Please see the usage function or just run the script without passing it any arguments.
The gval function should be edited to reflect your own region or university. It has been written and tested on [...]
Sometimes, like when you’re testing hooks or trying to create synced remote and local repos, you’ll find yourself touching empty files just to get a git push going. This script automates this task by creating a unique temporary file, committing it, pushing, and then removing the file.
#!/bin/sh
TMP=tmp-`date +'%m%s'`
touch $TMP
git add $TMP
git commit $TMP -m '(forced [...]
Static sites in this context just means non-database driven sites. Your static site can be an elaborate PHP script or just a few markup and image files. For this I am using Jekyll – A neat Ruby gem that makes your static sites dynamic. It lets you create layouts and embed custom variables in your [...]
Just sharing a script I wrote to quickly deploy Wordpress (and eventually a few other webapps) sites, which somebody might find useful. This uses Linode’s API* to add the domain name to the DNS server along with some subdomains. If you’re using another server, (Slicehost, your own, etc), you can alter the dns class to [...]
POSTing data on web forms is essential for writing tools and services that interact with resources already available on the web. You can grab information from your Gmail account, add a new thread to a forum from your own app, etc.
The following is a brief example on how this can be done in Ruby [...]
Wednesday, September 30, 2009
0 Comments