A A

Archive | Scripts

Bulk Upload Images as Simple Products in Magento

Friday, September 14, 2012

0 Comments

The client has thousands of images, each of which is a (simple) product they want in Magento. Each image is named the associated product’s SKU number with a JPG extension. I began by using a recorded Batch script in Photoshop to resize all the images to reduce filesize and make the image more web-friendly. The [...]

Using Rsync to Copy Remote Files to Local Machine on OS X / Linux

Monday, September 3, 2012

0 Comments

The following is used to copy files from a remote server to your local machine using Rsync to keep both synchronized. This is useful for things like backing up important directories on your web server to your external hard drive or elsewhere. Rsync can incrementally synchronize files between two locations whether local or remote. This [...]

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

Scraping Google Trends with Mechanize and Hpricot

Saturday, January 24, 2009

3 Comments

This is a small Ruby script that fetches the 100 trends of the day for a specific date. If multiple dates are searched, one can find out how many times a keyword occurred between two dates, or just find out what keywords are constantly appearing on the top 100 list. The script is incomplete and [...]

AnimeCrazy Scraper Example Using Hpricot & Mechanize

Sunday, January 11, 2009

2 Comments

This is a little (as of now incomplete) scraper I wrote to grab all the anime video code off of AnimeCrazy (dot) net. This site doesn’t host any videos on its own server, but just embeds ones that have been uploaded to other sites (Megavideo, YouTube, Vimeo, etc). I don’t know who the original uploaders [...]

Quick BASH Script to Dump & Compress a MySQL Database

Saturday, December 27, 2008

2 Comments

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) download BackThatSqlUp.sh