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
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative" |
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
REGIOES_BRASILEIRAS = { | |
'Norte' => [ | |
['Acre', 'AC'], | |
['Amapá','AP'], | |
['Amazonas', 'AM'], | |
['Pará', 'PA'], | |
['Rondônia', 'RO'], | |
['Roraima', 'RR'], | |
['Tocantins', 'TO'] | |
], |
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
class BlackHoleStore | |
def clear; end | |
def logger | |
Rails.logger | |
end | |
def fetch( *args ) | |
yield | |
end | |
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
var sys = require('sys'); | |
sys.puts("Top level"); | |
sys.puts(" this === GLOBAL: " + (this === GLOBAL)); // false | |
sys.puts(" this === exports: " + (this === exports)); // true | |
var x = "1"; // local variable | |
sys.puts(" x === GLOBAL.x: " + (x === GLOBAL.x)); // false |
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
require.paths.unshift 'express/lib' | |
require 'express' | |
http: require 'express/http' | |
get '/', -> | |
this.contentType 'html' | |
this.respond 200, ''' | |
<html> | |
<head><title>NodeJs Example</title></head> | |
<body> |
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
By Klaus Wuestefeld | |
1) Torne-se excelente. | |
Seja realmente bom em alguma coisa. Não fique só choramingando ou | |
querendo progredir às custas dos outros. Não pense q pq vc sentou 4 | |
anos numa faculdade ouvindo um professor falar sobre software q vc | |
sabe alguma coisa. Jogador de futebol não aprende a jogar bola tendo | |
aula. Ele pratica. Instrumentistas geniais nao aprendem a tocar tendo | |
aula. Eles praticam. Pratique. Chegue em casa depois do trabalho e da |
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
//Parser string differences: http://stackoverflow.com/questions/3085937/safari-js-cannot-parse-yyyy-mm-dd-date-format | |
var EODateParser = (function(Date,undefined) { | |
var pad = function(s) { | |
return (s.toString().length === 1) ? "0" + s: s; | |
}; | |
var checkerValue = function(target, func, value) { | |
if (typeof value !== "undefined") { | |
target[func](value); |
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
if did_filetype() " filetype already set.. | |
finish " ..don't do these checks | |
endif | |
if getline(1) =~ '^#!.*node' | |
setfiletype javascript | |
endif |
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
app.route('/forums', function(){ | |
app.get('/', function(){ | |
}); | |
app.route('/:id', function(){ | |
app.get('/', function(){ | |
}); |
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
// Load the TCP Library | |
net = require('net'); | |
// Keep track of the chat clients | |
var clients = []; | |
// Start a TCP Server | |
net.createServer(function (socket) { | |
// Identify this client |
OlderNewer