View notifier.rb
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
response.docs.each_with_index do |doc, i| | |
attachments[doc.filename.to_s] = {:mime_type => doc.blob.content_type, :content => doc.blob.download } | |
end |
View stdin.sh
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
myvar=`cat` | |
echo "$myvar" |
View sqlformat.sh
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/bash | |
/usr/local/bin/sqlformat --keywords upper --reindent --identifiers lower - |
View .gitconfig
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
[diff] | |
external = /home/user/diff.py |
View options.coffee
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
// coffescript | |
(options...)-> | |
$.each options, (i, v)-> | |
console.log v |
View superkiller.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
function superkiller(o, prop_name) { | |
if(o.hasOwnProperty(prop_name)) { | |
delete o[prop_name] | |
} | |
$.each(x, function(i, e) { | |
if(typeof(e) == "object") { superkiller(e, prop_name) } | |
}); | |
} |
View escape.rb
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
h.simple_format h.h(object.text) |
View delegate_all.rb
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
def method_missing(method_name, *arguments, &block) | |
return target.send(method_name, *arguments, &block) if target.respond_to? method_name | |
super | |
end |
View boolean.rb
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
[true, false].reduce(&:&) | |
[true, false].reduce(&:|) | |
# the same | |
[true, false].any? |
View unique.coffee
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
if Array.prototype.unique == undefined | |
Array.prototype.unique = -> | |
filtered_array = [] | |
$.each this.sort(), (index, value)-> | |
filtered_array.push(value) if filtered_array.indexOf(value) == -1 | |
filtered_array | |
if Array.prototype.is_unique == undefined | |
Array.prototype.is_unique = -> | |
this.length == this.unique.length |
NewerOlder