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
{ | |
"excludeFiles": ["node_modules/**", "script/**", "wrapped/**", "mobile/libs/**"], | |
"requireCurlyBraces": ["if", "else", "for", "while", "do", "try", "catch"], | |
"disallowLeftStickedOperators": ["?", "+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], | |
"disallowRightStickedOperators": ["?", "+", "/", "*", ":", "=", "==", "===", "!=", "!==", ">", ">=", "<", "<="], | |
"requireRightStickedOperators": ["!"], | |
"requireLeftStickedOperators": [","], | |
"disallowImplicitTypeConversion": ["string"], | |
"disallowKeywords": ["with"], | |
"disallowMultipleLineBreaks": true, |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
extension String { | |
func asTripDictionary() -> NSDictionary { | |
return ["wat":"wat"] | |
} | |
} | |
extension NSDate { | |
func asLocalISOString() -> String { | |
return "2015-03-12T13:24:00" | |
} |
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
# Background: https://twitter.com/burin/status/608303217999544322 | |
# > i just went on a whitespace fixing binge. is there a way to combine my git diff w/ git blame to see whose code i fixed most? | |
# | |
# This downloads the git-diff-blame script, and sets it to be executable | |
# Then you can run the script and give it two commit hashes, ./git-diff-blame old new | |
curl https://raw.githubusercontent.com/toddlipcon/tlipcon-bin/master/git-diff-blame -O -L | |
chmod +x git-diff-blame | |
./git-diff-blame 56f00b4 b3aaee4 |
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
http://chris.beams.io/posts/git-commit/ | |
https://github.com/edx/edx-platform/wiki/How-to-Rebase-a-Pull-Request#squash-your-changes |
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
# environment variables | |
export PATH=/usr/local/bin:$PATH | |
export PATH="$HOME/bin:$PATH" | |
export PATH=/usr/local/git/bin:$PATH | |
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:$PATH" | |
export MANPATH=/usr/local/git/man:$MANPATH | |
export EDITOR="mate -w" | |
export SVN_EDITOR="mate -w" | |
# aliases |
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
# Short circuit a deliver_* methods defined in ActionMailer::Base subclasses. | |
def do_not_deliver! | |
def self.deliver! ; false ; end | |
end |
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
development: &non-production | |
adapter: mysql | |
database: example_development | |
username: root | |
password: | |
host: localhost | |
timeout: 5000 | |
test: | |
<<: *non-production |
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
Rails::Initializer.run do |config| | |
%w(observers sweepers mailers).each do |dir| | |
config.load_paths << "#{RAILS_ROOT}/app/#{dir}" | |
end | |
end |
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
--most referred questions in the past 7 days | |
select q.question, q.created_at as asked_on,count(1) as referrals from question_referrals r, questions q where r.question_id=q.id and r.created_at>SUBDATE(CURRENT_DATE(), INTERVAL 7 DAY) group by r.question_id order by referrals desc, asked_on desc |
OlderNewer