This file contains hidden or 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 unittest | |
def enum(obj): | |
if type(obj) == list: | |
return EnumList(obj) | |
elif type(obj) == dict: | |
return EnumDict(obj) | |
class Enumerable(object): | |
def each(self, cb): |
This file contains hidden or 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/env ruby | |
=begin | |
A hook to make sure that all staged .rb files are syntatically correct. | |
The hook tries to run `ruby -c file_path` for all those files and | |
prints outs the errors if any and halts the commit. | |
If you want to use this pre-commit, simply copy the code and create a | |
file called 'pre-commit' inside your .git/hooks directory. |
This file contains hidden or 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/env ruby | |
# Count lines of code in a pull request | |
# Usage: | |
# ./b/cloc_pr 22621 | |
# | |
# Code: +1212 / -208 | |
# Blank Lines: +241 / -18 | |
# Files: +17 / -0 | |
# Modified Files: 38 |
This file contains hidden or 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/env ruby | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'premailer' | |
gem 'nokogiri' | |
gem 'base64' | |
gem 'mail' |
OlderNewer