Skip to content

Instantly share code, notes, and snippets.

View sirleech's full-sized avatar

Christopher Lee sirleech

  • Canberra, Australia
View GitHub Profile
@sirleech
sirleech / gist:1824697
Created February 14, 2012 07:48
Amazon EC2 How to Grow Storage

Amazon EBS - How to Grow the Storage

Seen loads of good posts about EBS describing how to use them to provide cross instance persistent storage. Really it's awesome. All the EC2 images store to their own EBS and if the EC2 crashes a new one can be resumed with minimal downtime. Amazon has nice pictures about this use case.

Quite simple to increase the size of an EBS volume, just: create, attach, mount, write, umount, snapshot, create, attach, check, resize, check, mount, delete. We're going to walk through the process using Amazon EC2 command line tools.

Create the initial volume and attach to an EC2 instance.

@sirleech
sirleech / gist:1956020
Created March 2, 2012 05:50
Node JS and Now JS Ubuntu
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs npm
#http://stackoverflow.com/questions/3329355/node-js-could-not-configure-a-cxx-compiler-ubuntu
sudo apt-get install build-essential libssl-dev curl git-core
npm install now
@sirleech
sirleech / gist:2040452
Created March 14, 2012 23:44
PHP Debugging with PDT and Xdebug
http://www.eclipse.org/projects/project.php?id=tools.pdt
http://devzone.zend.com/1147/debugging-php-applications-with-xdebug/
http://xdebug.org/
http://ubuntuforums.org/showthread.php?t=525257
@sirleech
sirleech / gist:2091521
Created March 19, 2012 02:39
Numato Relay Linux Quick Start
Open a terminal window after plugging the Numato device into your usb port.
> screen /dev/ttyACM0
> relay on 0
> relay off 0
@sirleech
sirleech / gist:2128590
Created March 19, 2012 23:50
Git Graph
git config --global alias.graph 'log --graph --all --oneline --decorate --color --date-order'
git graph
@sirleech
sirleech / gist:2289568
Created April 3, 2012 05:42
Imagemagick make thumbnails
convert -resize 133x100 -extent 133x100 -gravity center annualClimateSummary2011.jpg
convert -resize 300x225 -extent 300x225 -gravity center annualClimateSummary2011.jpg
@sirleech
sirleech / gist:2583166
Created May 3, 2012 04:26
RRDTool with Python on Ubuntu 11.10
@sirleech
sirleech / gist:2583622
Created May 3, 2012 05:55
Get the UNIX Time Stamp
date +%s
@sirleech
sirleech / gist:2592215
Created May 4, 2012 05:19
RRDdata Temperature Database Example

Use this command to get the UNIX time

date +%s

Create a gauge RRD with a 60 second heartbeat

rrdtool create temperature.rrd --step 60 \
  DS:temp:GAUGE:600:-273:5000 \
 RRA:AVERAGE:0.5:1:1200 \