Skip to content

Instantly share code, notes, and snippets.

@Ian Fieldhouse's Whole Widget Custom Quix Commands
bit javascript:var%20e=document.createElement('script');e.setAttribute('language','javascript');e.setAttribute('src','http://bit.ly/bookmarklet/load.js');document.body.appendChild(e);void(0); Make a bit.ly link
db http://delicious.com/save?url=%r&title=ʬ:%20%t Bookmark in Delicious
down http://downforeveryoneorjustme.com/%d Is this site downforeveryoneorjustme?
i javascript:function%20iprl5(){var%20d=document,z=d.createElement('scr'+'ipt'),b=d.body;try{if(!b)throw(0);d.title='(Saving...)%20'+d.title;z.setAttribute('src','http://www.instapaper.com/j/nobwkx0a45wL?u='+encodeURIComponent(d.location.href)+'&t='+(new%20Date().getTime()));b.appendChild(z);}catch(e){alert('Please%20wait%20until%20the%20page%20has%20loaded.');}}iprl5();void(0) Instapaper: Read me later
markd javascript:location.href='http://www.aaronsw.com/2002/html2text/?url='+document.location.href; Transform this page into Markdown
read javascript:(
@ianfieldhouse
ianfieldhouse / gist:2035478
Created March 14, 2012 09:56
Apache with mod_wsgi on work's Solaris Container
Install PCRE
============
cd $HOME/src
curl -O ftp://ftp.csx.cam.ac.uk//pub/software/programming/pcre/pcre-8.31.tar.gz
tar xvzf pcre-8.31.tar.gz
rm pcre-8.31.tar.gz
cd pcre-8.31
./configure --prefix=$HOME/local/stow/pcre-8.31
make
make install
@ianfieldhouse
ianfieldhouse / gist:2037342
Created March 14, 2012 15:38
RabbitMQ 2.6.1 on work's Solaris Container
cd $HOME/local
curl -O http://www.rabbitmq.com/releases/rabbitmq-server/v2.6.1/rabbitmq-server-2.6.1.tar.gz
tar xzvf rabbitmq-server-2.6.1.tar.gz
rm rabbitmq-server-2.6.1.tar.gz
ln -s rabbitmq-server-2.6.1 rabbitmq-server
cd rabbitmq-server
export TARGET_DIR=/home/cartogrm/local/rabbitmq-server-2.7.1
export SBIN_DIR=/home/cartogrm/local/rabbitmq-server-2.7.1/sbin
export MAN_DIR=/home/cartogrm/local/rabbitmq-server-2.7.1/man
@ianfieldhouse
ianfieldhouse / gist:2284557
Created April 2, 2012 15:52
Create PNG from Shapefile
import shapefile
import pngcanvas
# Open shapefile with Python Shapefile Library
shapefile_name = 'REPLACE_WITH_SHAPEFILE_NAME' # e.g. england_oa_2001
r = shapefile.Reader(shapefile_name)
# Determine bounding box x and y distances and then calculate an xyratio
# that can be used to determine the size of the generated PNG file. A xyratio
# of greater than one means that PNG is to be a landscape type image whereas
@ianfieldhouse
ianfieldhouse / gist:3839037
Created October 5, 2012 10:01
Setting up SQLite and Django project on virgin Solaris 10 container
SQLite on containers
====================
These instructions assume:
- you have Stow <http://www.gnu.org/software/stow/stow.html> installed in $HOME/local/stow
- that you are going to install all software in $HOME/local/stow/
- that you are going to use Stow to link you app installations into $HOME/local
- python virtual environments are created in $HOME/virtualenvs
- projects are deployed to $HOME/dist
- source code is downloaded and compiled in $HOME/src
@ianfieldhouse
ianfieldhouse / gist:4066912
Created November 13, 2012 16:49
Stow on containers
cd src
curl -O http://ftp.gnu.org/gnu/stow/stow-2.2.0.tar.gz
tar xvzf stow-2.2.0.tar.gz
cd stow-2.2.0
./configure --prefix=$HOME/local/stow
make
make install
Add $HOME/local/stow/bin to $PATH
@ianfieldhouse
ianfieldhouse / gist:4071251
Created November 14, 2012 09:45
GEOS on containers
cd $HOME/src
curl -O http://download.osgeo.org/geos/geos-3.3.5.tar.bz2
tar xvjf geos-3.3.5.tar.bz2
cd geos-3.3.5
./configure --disable-dependency-tracking --prefix=$HOME/local/stow/geos-3.3.5
make
make install
@ianfieldhouse
ianfieldhouse / gist:4071321
Created November 14, 2012 10:05
PROJ.4 on Containers
cd $HOME/src
curl -O http://download.osgeo.org/proj/proj-4.8.0.tar.gz
tar xvzf proj-4.8.0.tar.gz
cd proj-4.8.0
./configure --prefix=/home/trcons/local/stow/proj-4.8.0
make
make install
cd $HOME/local/stow
stow -t $HOME/local proj-4.8.0
@ianfieldhouse
ianfieldhouse / gist:4071686
Created November 14, 2012 11:46
spatilite extension for sqlite3
cd $HOME/src
curl -O http://www.gaia-gis.it/gaia-sins/libspatialite-3.0.1.tar.gz
tar xvzf libspatialite-3.0.1.tar.gz
rm libspatialite-3.0.1.tar.gz
cd libspatialite-3.0.1
LDFLAGS="-L$HOME/local/lib" CFLAGS="-I$HOME/local/include" ./configure --prefix=$HOME/local/stow/libspatialite-3.0.1 --disable-dependency-tracking
make
make install
cd $HOME/local/stow
stow -t $HOME/local libspatialite-3.0.1
@ianfieldhouse
ianfieldhouse / gist:4071706
Created November 14, 2012 11:51
FreeXL on containers
cd $HOME/src
curl -O http://www.gaia-gis.it/gaia-sins/freexl-1.0.0d.tar.gz
tar xvzf freexl-1.0.0d.tar.gz
rm freexl-1.0.0d.tar.gz
cd freexl-1.0.0d
./configure --prefix=$HOME/local/stow/freexl-1.0.0d
make
make install
cd $HOME/local/stow
stow -t $HOME/local freexl-1.0.0d