Skip to content

Instantly share code, notes, and snippets.

View thurloat's full-sized avatar

Adam Thurlow thurloat

View GitHub Profile
@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

@thurloat
thurloat / css3demo.html
Created July 6, 2010 14:48
A pure CSS3 implementation of the JS + CSS demo: http://tympanus.net/Tutorials/CufonizedFlyOutMenu/
<!-- This is a pure CSS3 implementation of the CSS3 + jQuery Demo for flyout menus I saw today featured on Smashing Mag.
My Demo: http://commondatastorage.googleapis.com/thurloat/css3demo.html
Codes on Gist.Github: http://gist.github.com/465478
Original Link: http://tympanus.net/Tutorials/CufonizedFlyOutMenu/
Original Author: Mary Lou http://tympanus.net/codrops/author/crnacura/
-->
<html>
<head>
class ResponseObject():
html = None
def __init__(self, html):
self.html = html
def render(self):
print "<html>"
print self.html
print "</html>"
def get_user_information():