A A

Tag Archive | "Scripts"

Calculate Your GPA Using this Bash Script

Thursday, May 21, 2009

0 Comments

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 [...]

Bash Script to Force an Empty Git Push

Wednesday, April 1, 2009

0 Comments

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. I place this in ~/bin/ which is in [...]

Quick BASH Script to Dump & Compress a MySQL Database

Saturday, December 27, 2008

1 Comment

A quick script I whipped up to dump my MySQL database. Usage: sh backthatsqlup.sh (be warned that it dumps ALL databases. This can get huge uncompressed) #!/bin/sh # Isam (Biodegradablegeek.com) public domain 12/28/2008 # Basic BASH script to dump and compress a MySQL dump out=sequel_`date +'%m%d%Y_%M%S'`.sql dest=/bx/ function e { echo -e "n** $1" } [...]

Script to Quickly Setup WebApp Environment and Domain

Saturday, October 11, 2008

0 Comments

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 [...]

How to POST Form Data Using Ruby

Thursday, April 24, 2008

2 Comments

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 [...]