Skip to content

Instantly share code, notes, and snippets.

View snarkyboojum's full-sized avatar
🧠
Probably not on a plane

Adrian White snarkyboojum

🧠
Probably not on a plane
  • Sydney, Australia
View GitHub Profile
Especially, the t1.micro instance type:
Use a ZeroMQ example - run it in a loop and time it.
python2.7 ~/zguide/examples/Python/wuserver.py &
while true; do (time python2.7 ~/zguide/examples/Python/wuclient.py) 2>> ~/wuclient_output ; done
Install latest Zeromq (e.g. 3.2.2)
Get an install the latest Python 2.x (e.g. 2.7.3)
- install with sudo make altinstall
Get and install Cython
Get Pyzmq (e.g. git clone git://github.com/zeromq/pyzmq.git)
Build Pyzmq with Python 2.7
#!/bin/env python
import boto
import boto.ec2.cloudwatch
from boto.ec2.cloudwatch import MetricAlarm
access_key_id='YOUR_ACCESS_KEY_ID'
secret_access_key='YOUR_SECRET_ACCESS_KEY'
@snarkyboojum
snarkyboojum / gist:4362010
Created December 23, 2012 04:46
Moja Vim config
" Snarkyboojum's Vim configuration
" Last updated: 24/06/2006
set nocompatible
" turn syntax highlighting on and change tabs to 4 spaces
syntax on
set autoindent
set tabstop=4
set shiftwidth=4
export DEBIAN_FRONTEND=noninteractive
sudo -E apt-get update
sudo -E apt-get install -y ubuntu-desktop
sudo add-apt-repository ppa:freenx-team
sudo apt-get update
sudo aptitude install -y freenx
wget https://bugs.launchpad.net/freenx-server/+bug/576359/+attachment/1378450/+files/nxsetup.tar.gz
tar -xvf nxsetup.tar.gz
@snarkyboojum
snarkyboojum / gist:4238999
Created December 8, 2012 06:58
Getting Dancer up and running from a base Amazon Linux AMI
$ cat build.sh
#!/bin/env bash
sudo yum -y update
sudo yum -y groupinstall "Development Tools"
sudo yum -y install perl-devel
curl -L http://cpanmin.us | perl - --sudo Dancer
curl -L http://cpanmin.us | perl - --sudo YAML
@snarkyboojum
snarkyboojum / gist:2946078
Last active October 6, 2015 05:48
AWS hack tasks
* A Logstash client -> Kinesis -> Logstash indexer (scale out?) -> CloudSearch
-> Redshift
pipeline.
* A CloudFormation template to spin up an HA NFS server setup, with drdb replication configured, volumes provisioned, and heartbeat configured and running for failover
* Define a new ECU measure that actually makes sense. An automation approach to spinning up all instance types, and run SPECint and SPECfp and generate a relative score of CPU capacity across EC2 instances.
* An app to determine how much to run in x region – enumerate all services in account via Billing API, then 1:1 match that with another region pricing to see what it would cost to run in the other region
@snarkyboojum
snarkyboojum / gist:2056139
Created March 17, 2012 07:30
Auto dragon writing...
Scott milton
10:48 AM (7 hours ago)
to me, Peter
written using Dragon Naturally Speaking:
The boys extended is hideously deformed arm and attempted the grass at
the lolly the dangle just above his head he was quite unsuccessful as
the dangle his older brother would immediately retract the lolly this
father-son minutes until finally the boy left altogether returned to
@snarkyboojum
snarkyboojum / fakejson.pl
Created November 7, 2011 12:29 — forked from tadzik/fakejson.pl
META.info parser not worky
#use Grammar::Tracer;
grammar FakeJSON {
token TOP {
'['
<project>+ % ','
']'
}
token project {
use v6;
grammar Vcard::Grammar {
rule TOP {
<begin>
<version>
<property> **
<end>
}
rule version {