You will need Sija's version of the garb gem, so add this line to your Gemfile
(you will need git installed for this):
gem 'garb', :git => 'git://github.com/Sija/garb.git'
Then run the gem bundler: bundle install
Set your google username
import os | |
from os.path import join | |
from blaze.server import Server | |
from bambooclient import Client, autoload | |
def make_app(): | |
basedir = os.environ.get('BAMBOO_BASEDIR', os.getcwd()) | |
data_filename = os.environ.get('BAMBOO_DATAFILE', False) |
#!/bin/bash | |
# | |
# Install Postgres 9.2, PostGIS and create PostGIS template on an Ubuntu 12.04 Server | |
# add official postgresql.org ubuntu repos (http://wiki.postgresql.org/wiki/Apt) | |
# Create /etc/apt/sources.list.d/pgdg.list. The distributions are called codename-pgdg. | |
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg2.list | |
# Import the repository key from http://apt.postgresql.org/pub/repos/apt/ACCC4CF8.asc, update the package lists, and start installing packages: |
Evasive Maneuvers
class A(object): | |
def say(self): | |
print "This is A" | |
class B(object): | |
def say(self): | |
print "This is B" | |
class C(A, B): | |
def say(self): |
class C(B): | |
def __init__(self, *args, **kwargs): | |
super(C, self).__init__(*args, **kwargs) |
<?php | |
// current implementation | |
class HairColor implements ReflectionAnnotation { | |
public $hairColor = ""; | |
} | |
[HairColor(hairColor="purple")] | |
class PurplePeopleEater { } |
import datetime | |
import gevent | |
from gevent import wsgi, pywsgi | |
# Configuration bits. | |
PORT = 8081 | |
LOG_PATH = '/Users/daniellindsley/Desktop/LoggingFramework/benchmarks/receiver/logs/gevent_test.log' | |
# ============ |
# Current API. | |
exports.name: "Unit tests for ochre.Case" | |
exports.tests: { | |
"case has name property equal to what it is instantiated with": -> | |
testCase: ochre.Case "Some test", -> | |
assert.equal "Some test", testCase.name | |
# Hypothetical API. |
require 'open-uri' | |
# url dsl -- the ultimate url dsl! | |
# | |
# You just can't beat this: | |
# | |
# $ irb -r url_dsl | |
# >> include URLDSL | |
# => Object | |
# >> http://github.com/defunkt.json |