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: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: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: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:1813497
Created February 13, 2012 03:55
Apache SSI (Server Side Includes)
Apache Mods Required
a2enmod rewrite
a2enmod include
Virtual Host: SSI Includes, AllowOverride All, index.php
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
@sirleech
sirleech / gist:1813307
Created February 13, 2012 03:31
Reinstall Apache2 Ubuntu

To replace configuration files that have been deleted, without purging the package, you can do

sudo apt-get -o DPkg::Options::="--force-confmiss" --reinstall install apache2.2-common

To fully remove the apache2 config files, you should

sudo apt-get purge apache2.2-common
@sirleech
sirleech / gist:1812914
Created February 13, 2012 02:49
PHP Image Processing Libraries Ubuntu 10.04
PHP5
php5 curl php5-curl php5-xcache php-pear php5-dev
GD
php5-gd
PHP Imagick
sudo apt-get install imagemagick libmagick9-dev
sudo pecl install imagick
@sirleech
sirleech / gist:1786641
Created February 10, 2012 04:36
Apache Solr for Drupal 6 Installation
@sirleech
sirleech / gist:1786544
Created February 10, 2012 04:14
Revert PHP 5.3 to 5.2 (better compatibility with Drupal 6)

Let us list all existing PHP packages to know what version we are running:

# dpkg -l | grep php

So, now we are going to duplicate the existing sources.list and replace the lucid with karmic repos and saving it in sources.list.d

@sirleech
sirleech / gist:1783670
Created February 9, 2012 22:04
Freenas 7 Update Fuppes DB Nightly, upnp
Add this to your cron:
/etc/rc.d/fuppes updatedb
@sirleech
sirleech / gist:1765615
Created February 8, 2012 05:10
Mapnik Rendering System on Ubuntu 11.10 Installation

Install Postgres and Postgis

sudo apt-get install postgresql-9.1 pgadmin3 postgresql-contrib postgis postgresql-9.1-postgis

Set password for user Postgres

sudo su postgres
psql
\password postgres