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
rvm use 1.8.7@gemsetname |
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(doc) { | |
var value = {}; | |
for (property in doc) value[property] = doc[property]; | |
delete value._id; | |
delete value._rev; | |
delete value.type; | |
emit(doc.type, 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
google.load("feeds", "1"); | |
var user = {}; | |
user.gravatar = "943753a9af1bd4a2f6466875ac5efccd"; | |
user.contato = "https://spreadsheets.google.com/viewform?formkey=dHVobnA4dkc1cm1fcjlFWGJYSXJJUUE6MQ&ifq"; | |
user.aboutme = "henriquegogo"; | |
user.twitter = "henriquegogo"; | |
user.facebook = "henriquegogo"; | |
user.orkut = "10554372327654343666"; | |
user.youtube = "henriquegogo"; |
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 app = Sammy('#content', function() { | |
this.use('Mustache'); | |
this.get('#/', function(ctx) { | |
ctx.redirect('#/home'); | |
}); | |
this.get('#/home', function(ctx) { | |
var content = {user: 'henriquegogo', gender: 'male'} | |
ctx.partial('templates/home.mustache', user); |
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() { | |
var viewpower = function (str, data){ | |
var fn = new Function("obj", | |
"var p=[],print=function(){p.push.apply(p,arguments);};" + | |
"with(obj){p.push('" + | |
str.replace(/[\r\t\n]/g, " ") | |
.split("<%").join("\t") | |
.replace(/((^|%>)[^\t]*)'/g, "$1\r") | |
.replace(/\t=(.*?)%>/g, "',$1,'") |
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
$.couch.db('database').changes().onChange(function(data) { console.log(data) } ); |
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 ($) { | |
var keyNames = { | |
alt: 18, backspace: 8, capslock: 20, ctrl: 17, 'delete': 46, | |
down: 40, end: 35, enter: 13, esc: 27, home: 36, insert: 45, | |
left: 37, menu: 93, numlock: 144, numpad_add: 107, numpad_decimal: 110, | |
numpad_divide: 111, numpad_enter: 108, numpad_multiply: 106, | |
numpad_subtract: 109, pagedown: 34, pageup: 33, pause: 19, right: 39, | |
scrolllock: 145, shift: 16, space: 32, tab: 9, up: 38, windows: 91 | |
}; |
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'); | |
var app = module.exports = express.createServer(); | |
var cradle = require('cradle'); | |
var db = new(cradle.Connection)().database('f2rh'); |
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
table.grid { | |
position: relative; | |
display: block; | |
width: 100%; | |
height: 200px; | |
border-collapse: collapse; | |
} | |
table.grid thead { | |
position: absolute; | |
top: 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
$("selector").data("events").change[0].handler; |