This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'twitter' | |
require 'open-uri' | |
require 'yajl' | |
def auto_follow | |
twitter_config = ConfigStore.new("config/twitter_credentials.yml") | |
shortening_config = ConfigStore.new("config/url_shortening.yml") | |
httpauth = Twitter::HTTPAuth.new(twitter_config['email'], twitter_config['password']) | |
base = Twitter::Base.new(httpauth) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.test.simple import DjangoTestSuiteRunner | |
class ByPassableDBDjangoTestSuiteRunner(DjangoTestSuiteRunner): | |
def setup_databases(self, **kwargs): | |
from django.db import connections | |
old_names = [] | |
mirrors = [] | |
for alias in connections: | |
connection = connections[alias] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add this | |
public/javascripts/all.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# init.d script for single or multiple unicorn installations. Expects at least one .conf | |
# file in /etc/unicorn | |
# | |
# Modified by [email protected] http://github.com/jaygooby | |
# based on http://gist.github.com/308216 by http://github.com/mguterl | |
# | |
## A sample /etc/unicorn/my_app.conf | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.ws.rs.OPTIONS; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.core.MediaType; | |
import javax.ws.rs.core.Response; | |
import org.springframework.stereotype.Service; | |
@Produces(MediaType.APPLICATION_JSON) | |
@Path("/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
class Langton(object): | |
def __init__(self): | |
self.ant = ((0,0), 'E') | |
self.black_squares = set() | |
self.next = {'E':'S', 'S': 'W', 'W':'N', 'N':'E'} | |
self.previous = {'E':'N', 'N': 'W', 'W':'S', 'S':'E'} | |
self.max_y,self.max_x,self.min_y,self.min_x = 0,0,0,0 | |
self.transf = {'E':(1,0), 'S': (0,1), 'W':(-1,0) , 'N':(0,-1)} |