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
// jShoulda 1.2.x | |
describe("Un ukelele", { | |
setup: function() { | |
// setup routines | |
}, | |
teardown : function() { | |
// teardown routines | |
} | |
}, | |
it("mola mucho", function() { |
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 | |
locales="es en it ja fr de pt" | |
until [[ "$1" = "" ]] | |
do | |
base=${1%.*} | |
ext=${1#*.} | |
for lang in $locales | |
do cp $1 "${base}_${lang}.${ext}" | |
done | |
shift |
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
module RakeExtensions | |
def concat(*args, &block) | |
t = Rake::FileTask.define_task(*args) | |
out_file = t.name | |
list = [] | |
yield list if block_given? | |
t.enhance(list) do | |
File.open(out_file, 'w+') do |f| | |
f << list.map do |item| | |
ERB.new(IO.read(File.expand_path(item)), nil, '%').result(binding) |
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 EasternEggTrigger = function(sequence, callback) { | |
var seqString = sequence.join(' '), | |
seqLength = sequence.length, | |
got = [], | |
d = document, | |
handler = function(e) { | |
e = e || window.event; | |
got.push(e.keyCode); | |
if (got.join(' ').indexOf(seqString) !== -1) { |
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
├─┼─┼─┤ | |
R * │ │ | |
├─┼─┼─┤ | |
│ │ * * | |
├─┼─┼─┤ | |
│ * │ │ | |
├─┼─┼─┤ | |
* │ R * | |
├─┼─┼─┤ |
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
<% raise ArgumentError, "The @collection has no items to build the ToC." if @collection.empty? %> | |
<% @depth ||= -1 %> | |
<% @depth -= 1 if @depth > 0 %> | |
<% @reject ||= lambda { |x| false } %> | |
<% @sort_by ||= lambda { |x| x[:weight] || 0 } %> | |
<% @label ||= lambda { |x| x[:title] } %> | |
<% collection = @collection.reject(&@reject) %> | |
<% unless collection.empty? %> | |
<ul> | |
<% collection.sort_by(&@sort_by).each do |child| %> |
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
;; show current line number | |
(setq line-number-mode t) | |
;; show current column number | |
(setq column-number-mode t) | |
;; enable auto pairing of parens, bracketts, etc | |
(add-hook 'prog-mode-hook #'electric-pair-mode) | |
;; enable line numbering |
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
# to make tab completion case insensitive | |
# put this into your ~/.zshrc | |
# https://superuser.com/questions/1092033/ | |
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' | |
autoload -Uz compinit && compinit |
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
{ | |
"title": "Ctrl + ESC -> Caps Lock", | |
"rules": [ | |
{ | |
"description": "Ctrl + ESC -> Caps Lock", | |
"manipulators": [ | |
{ | |
"from" : { | |
"key_code" : "escape", | |
"modifiers" : { |