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
puts "afasgfdsfbuz\\xC3\\xB3n".gsub(/\\x([A-F0-9][A-F0-9])/) {|h| [$1.hex].pack("C*")}.force_encoding('UTF-8') |
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
function cleardb { | |
DEVDB="`ruby -e "require 'yaml'; puts YAML.load(File.open('config/database.yml'))['development']['database']"`" | |
if [[ $DEVDB =~ "production" ]]; then | |
echo 'WATCHOUT! cleardb running against production dump'; | |
else | |
bundle exec rake db:drop db:create db:schema:load db:seed && bundle exec rake db:test:clone; | |
fi | |
} |
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
task_list.save(data.task_list, {success: self.render, error: onError}); |
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
/* | |
* Run validations | |
*/ | |
TaskList.validate = function (attrs) { | |
//check for required attributes | |
var errors = {} | |
, i18n = Teambox.helpers.jade.i18n; | |
_(['name']).each(function(attr) { |
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
Show hidden characters
{ | |
"predef": [ | |
"Teambox", | |
"_", | |
"Backbone", | |
"Templates", | |
"Handlebars", | |
"Juggernaut", | |
"Cookie", | |
"jasmine", |
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
// i.schlueter's comma-first style | |
var o = | |
{ a : "ape" | |
, b : "bat" | |
, c : "cat" | |
, d : "dog" | |
, e : "elf" | |
, f : "fly" | |
, g : "gnu" | |
, h : "hat" |
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
Setup | |
===== | |
[stunnel acccept port 443 connect 8443] | |
|| | |
[haproxy | |
* accept port 80 | |
default: connect 8080 (nginx) | |
host: 'push.*' => connect 8090 (node) | |
* accept port 8443 |
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
#!/bin/bash | |
while read LINE | |
do | |
grep -q "$LINE" <(git diff --cached) && echo "Fail words found: '$LINE' | |
Fix your commit damn it..." && exit 1 | |
done < .git_fail_words | |
exit 0 |
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
#!/bin/bash | |
while read LINE | |
do | |
grep -q "$LINE" <(git diff --cached) && echo "Fail words found: '$LINE' | |
Fix your commit damn it..." && exit 1 | |
done < .git_fail_words |
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
#!/bin/bash | |
while read LINE | |
do | |
grep -q "$LINE" <(git diff --cached) && echo "Fail words found: '$LINE' \nFix your commit..." && exit 1 | |
done < ../../.git_fail_words |