Skip to content

Instantly share code, notes, and snippets.

View thurloat's full-sized avatar

Adam Thurlow thurloat

View GitHub Profile
@thurloat
thurloat / test_off.sh
Created March 3, 2015 14:36
demo manual offline snapshot in openstack
#!/bin/bash
# ./test_off.sh <uuid> <snap_name>
uuid=$1
snapname=$2
nova stop $uuid
while true; do
status=$(nova show $uuid | grep vm_state | awk '{ print $4 }')

containerkeys v1 auth with Duplicity, tested with a local swift AIO install /w middleware installed.

$ export SWIFT_USERNAME="test:testcontainer:Full-Key"
$ export SWIFT_PASSWORD="mykeyiscool"
$ export SWIFT_AUTHURL="http://192.168.122.95:8080/keys_auth/"
$ export SWIFT_AUTHVERSION="1"

$ duplicity --no-encryption containerkeys swift://testcontainer
Local and Remote metadata are synchronized, no sync needed.
@thurloat
thurloat / gist:193976
Created September 26, 2009 01:49 — forked from kastner/gist:193968
(__(__)==D ~ ~(___☼___)
PHP Warning: mysqli_connect() [<a href='function.mysqli-connect'>function.mysqli-connect</a>]: (08004/1040): Too many connections in /var/www/vhosts/cscatlantic.ca/httpdocs/core/Database.php on line 100
import SpiceRack, Knife, SaucePan, Stove, FoodProcessor, PorkChop, Onion, GreenPepper
Stove.heat(:HIGH)
SaucePan.oil
Knife.cube(PorkChop)!
SaucePan.add(PorkChop)
spice = SpiceRack.choose(:CAYENNE)
10.times {SaucePan.add(spice.dash)}
[Onion, GreenPepper].do { |x|
h1. Git for deployment
Pros:
* instant (atomic?) switching
* diffs between versions are concise and can include commits
* VERY little space
* pre and post-update hooks allow you to reject pushes that may overwrite un-commited data
Cons:
@thurloat
thurloat / 1stattempt.sass
Created February 26, 2010 17:11
First attempt at creating a SASS setup
@charset "UTF-8"
//Theme Colors & Variables
//REQUIRED TO BE SET
!colorFont = "black"
!colorBG = "white"
!color1 = #4EACC7
!color2 = #7581bd
!headerSize = 3em
@thurloat
thurloat / FoulLine.py
Created June 4, 2010 14:36
Getting Google Storage working in Python App Engine
#Bring in the boto library
import boto
#Load the configuration variables from your .boto file
config = boto.config
"""
FAIL.
""""
test for my google reader...
@thurloat
thurloat / rietvelduploadsamples.markdown
Created July 6, 2010 00:15
Rietveld upload CLI util for newbies

###simply upload all un-commited changes to be reviewed

upload.py

##these are some cooler usages. ####upload all changes to a file from a certain commit point to the present for review

upload.py -- GIT_COMMIT_ID..HEAD -- src/main.py

####upload all changes for a span commits to a module for review