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
$stack, $draws = [], {} | |
def method_missing *args | |
return if args[0][/^to_/] | |
$stack << args.map { |a| a or $stack.pop } | |
$draws[$stack.pop(2)[0][0]] = args[1] if args[0] == :< | |
end | |
class Array | |
def +@ |
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
source /home/heron/.vim/vimrc | |
"Shortcut to rapidly toggle `set list` | |
nmap <leader>l :set list!<CR> | |
"Map \s as show git status | |
nmap <leader>s :Gstatus<CR> | |
" Use the same symbols as TextMate for tabstops and EOLs | |
set listchars=tab:▸\ ,eol:¬,trail:- |
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
form { | |
} | |
form input[type="text"] { | |
background: url(images/search.png) no-repeat 10px 6px #fcfcfc; | |
border: 1px solid #d1d1d1; | |
font: bold 12px Arial,Helvetica,Sans-serif; | |
color: #bebebe; | |
width: 150px; |
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
# MySQL. Versions 4.1 and 5.0 are recommended. | |
# | |
# Install the MySQL driver: | |
# gem install mysql2 | |
# | |
# And be sure to use new-style password hashing: | |
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
development: | |
adapter: mysql2 | |
encoding: utf8 |
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 doSomething(callback) { | |
// faca algo de util | |
// chama o callback | |
callback('coisas', 'aqui'); | |
} | |
function funcaoComCallback(a, b) { | |
// callback | |
alert(a + " " + b); |
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
import java.util.Arrays; | |
import java.util.List; | |
import android.app.Activity; | |
import android.os.Bundle; | |
import android.view.View; | |
import android.widget.AdapterView; | |
import android.widget.AdapterView.OnItemClickListener; | |
import android.widget.ArrayAdapter; | |
import android.widget.ListView; |
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
"""""""""""""""""""""""""""""""""""""""" | |
" CONFIGURAÇÕES GOGS - WWW.GOGS.COM.BR " | |
"""""""""""""""""""""""""""""""""""""""" | |
set number " Numera as linhas | |
set linebreak " Quebra a linha sem quebrar a palavra | |
set nobackup " Não salva arquivos de backup~ | |
set wildmode=longest,list " Completa o comando com TAB igual o bash | |
set ignorecase " Ignora o case sensitive nas buscas | |
set smartcase " Se tiver alguma letra maiúscula, ativa o case sensitive | |
set gdefault " Sempre substitui todas as palavras, não só a primeira |
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(day1). | |
-export([count_words/1]). | |
-export([upto/1]). | |
-export([printRet/1]). | |
% 1. Write a function that uses recursion to count the number of words in a string | |
list_len([]) -> 0; | |
list_len(Input) -> | |
[H | Tail] = Input, |
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 | |
if [ -z "$1" ] ; then | |
echo "Coloque o nome da app" | |
else | |
a="rails new $1 -d mysql" | |
echo $a | |
exec $a |
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.exports['Mongoose: attendees'] = testCase({ | |
"Mongoose must have model Atteendee" : function(test){ | |
test.ok(mongoose.models.hasOwnProperty('attendees')); | |
test.done(); | |
}, | |
"mongoose.attendees must be a function" : function(assert){ | |
var value = mongoose.models.attendees; | |
assert.ok(typeof(value), "function" ); | |
assert.done(); |