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
jar 'com.netflix.hystrix:hystrix-core', '~>1.2.16' |
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
/*jshint multistr:true */ | |
var fs = require('fs'), | |
exec = require('child_process').exec, | |
path = require('path'), | |
os = require('os'); | |
var Sentinel = require("node-sentinel"), | |
_ = require("underscore"), | |
async = require("async"), | |
nodemailer = require("nodemailer"); |
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
$ git branch -r --merged | | |
sed '/>|master/d;/origin/!d;s:origin/::' | | |
xargs git push origin --delete | |
# I think this will work, but I don't know how to get git branch to show me that -> line |
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 'csv' | |
def coordinates(addr) | |
include Geokit::Geocoders | |
res=MultiGeocoder.geocode(addr) | |
res.ll | |
end | |
namespace :import do | |
desc 'Parse CSV files and import into the database' |
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
class District | |
has_many :leagues | |
has_many :seasons, :through => :leagues | |
# If this doesn't work | |
has_many :teams, :through => :seasons | |
# How about this? | |
def teams | |
seasons.teams |
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 commands | |
from string import Template | |
tmpl = Template("git-svn clone $repo $folder") | |
def getCommandOutput(command): | |
status, output = commands.getstatusoutput(command) | |
if status != 0: | |
raise RuntimeError, '%s failed w/ exit code %d' % (command, status) | |
return data |