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
| /* | |
| Usage examples | |
| */ | |
| // select * from users where active = true and last_logged_in > '2010-12-01' and type in ('admin, 'moderator') and expires > now() limit 1 | |
| table('users'). | |
| where({active: true}). | |
| where({'last_logged_in >': new Date(2010, 12, 1)}). | |
| where({type: ['admin', 'moderator']}). | |
| where('expires > now()'). |
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
| // curl -k https://localhost:8000/ | |
| var https = require('https'); | |
| var fs = require('fs'); | |
| var options = { | |
| key: fs.readFileSync('test/fixtures/keys/agent2-key.pem'), | |
| cert: fs.readFileSync('test/fixtures/keys/agent2-cert.pem') | |
| }; | |
| https.createServer(options, function (req, res) { |
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 'net/http' | |
| require 'uri' | |
| require 'cgi' | |
| text = "<html><head><title>Delicious2Google</title></head><body>" + | |
| "<h1>Upload</h1>" + | |
| "<form action='https://www.google.com/bookmarks/mark?op=upload&zx=#{rand(65535)}' method='POST'>" + | |
| "<input type='submit'/><input type='hidden' id='data'></form>" + | |
| "<textarea id='xml' style='display:none'>\n<bookmarks>" |
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
| Opa, | |
| Bom, estou mandando esse email (atrasado, pelo que tinha prometido pra alguns) pra avisar que infelizmente | |
| você não foi selecionado pra trabalhar com a gente. Agradeço *muito* o interesse em entrar na nossa equipe, | |
| e espero que não desista. | |
| Quem sabe na próxima vez você surpreenda a gente? Seja com algum livro novo que tenha lido(aqui tem uma | |
| lista bem bacana http://plentz.org/unsorted/mustread.html) ou com alguma contribuição que tenha | |
| feito em um projeto opensource (aqui tem algunsque usamos e gostamos http://github.com/plentz/following). |
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
| /** | |
| * Module dependencies. | |
| */ | |
| var express = require('express'), | |
| connect = require('connect'); | |
| var app = module.exports = express.createServer(); | |
| var Mu = require('./vendor/mu'); |
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
| /* | |
| A simple helper for cleaning MongoDB collections in NodeJS, using mongoose. | |
| They act as setup/teardown cleaners | |
| */ | |
| // lib/tools.js | |
| exports.chainedCalls = function() { | |
| var funcs = Array.prototype.slice.call(arguments, 0); | |
| function callNext() { | |
| if (funcs.length) { |
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
| for i in `grep -l "TEXTO" /pasta/arquivo(s)`; do | |
| cat $i >> destino.txt ; | |
| done |
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
| # Variation on Hashrocket's script for managing the git process | |
| # as documented here: http://reinh.com/blog/2008/08/27/hack-and-and-ship.html | |
| # Create shell scripts out of each of these, put them in your path (~/bin for example) | |
| # chmod 755 them and use like this: | |
| # | |
| # This version of hack is totally different than Hackrockets. I feel that hack implies | |
| # that you are getting started, not finishing up. sink is Hashrockets hack. | |
| # | |
| # $ hack branch_name | |
| # Test and Implement until done |