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 Array | |
def complect n | |
sum = self.reduce { |sum, x| sum + x } | |
first = sum - n + 1 | |
[first] + [1] * (n - 1) | |
end | |
end | |
puts [2, 3, 4, 5].complect(2).join(', ') | |
puts [2, 5, 3, 6].complect(2).join(', ') |
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
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
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
// CONDITIONALS | |
if (foo && bar) { | |
} | |
if () { | |
} else { | |
} |
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
mkdir -p ~/.ssh | |
chmod 700 ~/.ssh | |
touch ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/authorized_keys | |
echo ssh-dss AAAAB3NzaC1kc3MAAACBAIrGtuwyApXEnEQP1xil3JU2Jt+sDHT2j0KdX6K38OIQydWnyOuJdLndIoQmG7vT6o6cgL9PAPui+PtmV2tTduVvPmNxFkj/vWlxLkTprnFOLJKaWG6dD+UVFyAf7TNP1G4dQ+rqt1E5xXx9fGNTwHF3HSeWTWt5spP2NGSIrXBPAAAAFQCn0Dra0A+VTXTkKT2ONXIxRfZ0YQAAAIA3Yo6HzzkzTHWoRU6EWYNbIYcXA+t1B2RX+EJAOD6R9W5WqRITvQc4E6CVYlnd3CGV4cpEMZrWDFRUbvJdk60hUo8D81nzAb+r4jh2rz9N0tC0z9yeoreAnljjIYfy4PrJnhvDlgiZLVRXNu27CR1kja6u+OWphF7Oc1iXyrk2lQAAAIA+r6M9IaRt75JLTCTabn2el8SibJo1ZpbCKgrni6xEMoGYZaDZvOelko8YJFgVT07Kw3qY1uGvROjE7SAgTZb5inrGwfnY98ZENhbu0+ZRJ/UgbtL9Ge47UqTaDty4LIpdy2522zaUFPEtSWxwo8aUqfLLZZ9CpJ5HdnD3TPVWrA== >> ~/.ssh/authorized_keys | |
echo ALL DONE! |
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
mkdir -p ~/.ssh | |
chmod 700 ~/.ssh | |
touch ~/.ssh/authorized_keys | |
chmod 600 ~/.ssh/authorized_keys | |
echo ssh-dss AAAAB3NzaC1kc3MAAACBAIrGtuwyApXEnEQP1xil3JU2Jt+sDHT2j0KdX6K38OIQydWnyOuJdLndIoQmG7vT6o6cgL9PAPui+PtmV2tTduVvPmNxFkj/vWlxLkTprnFOLJKaWG6dD+UVFyAf7TNP1G4dQ+rqt1E5xXx9fGNTwHF3HSeWTWt5spP2NGSIrXBPAAAAFQCn0Dra0A+VTXTkKT2ONXIxRfZ0YQAAAIA3Yo6HzzkzTHWoRU6EWYNbIYcXA+t1B2RX+EJAOD6R9W5WqRITvQc4E6CVYlnd3CGV4cpEMZrWDFRUbvJdk60hUo8D81nzAb+r4jh2rz9N0tC0z9yeoreAnljjIYfy4PrJnhvDlgiZLVRXNu27CR1kja6u+OWphF7Oc1iXyrk2lQAAAIA+r6M9IaRt75JLTCTabn2el8SibJo1ZpbCKgrni6xEMoGYZaDZvOelko8YJFgVT07Kw3qY1uGvROjE7SAgTZb5inrGwfnY98ZENhbu0+ZRJ/UgbtL9Ge47UqTaDty4LIpdy2522zaUFPEtSWxwo8aUqfLLZZ9CpJ5HdnD3TPVWrA== > ~/.ssh/authorized_keys | |
echo ALL DONE! |
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
var amazon = 'https://s3-eu-west-1.amazonaws.com/td.aws/'; | |
var mobile = (/iphone|ipad|ipod|android|blackberry|mini|windows\sce|palm/i.test(navigator.userAgent.toLowerCase())), | |
isIphone = (/iphone/i.test(navigator.userAgent.toLowerCase())), | |
isIpad = (/ipad/i.test(navigator.userAgent.toLowerCase())), | |
isTouch = 'ontouchstart' in window, | |
mobRatio = 2; | |
var AUTHED = false, | |
cmahsxcto = 0, | |
METERS = 0, | |
TIME = 0, |
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
worker_processes 1; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
passenger_root /home/web/.rvm/gems/ruby-1.8.7-p371@maxinfo/gems/passenger-4.0.5; | |
passenger_ruby /home/web/.rvm/wrappers/ruby-1.8.7-p371@maxinfo/ruby; |
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
ffmpeg -i input.avi -filter:v scale=640:-1 -sws_flags lanczos -vcodec libx264 -b 800k out.avi |
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
Backbone.origSync = Backbone.origSync | |
Backbone.sync = (method, model, options) -> | |
url = _.result(model, 'url') | |
url = 'http://my-server.com/' + url | |
options.url = url | |
Backbone.origSync.call @, method, model, options |
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
[user] | |
name = XXXX XXXX | |
email = xxxx@xxxx.com | |
[core] | |
excludesfile = /Users/monk/.gitignore_global | |
[alias] | |
st = status -s | |
ci = commit | |
br = branch | |
co = checkout |
OlderNewer