Skip to content

Instantly share code, notes, and snippets.

View cmilfont's full-sized avatar

Christiano Milfont cmilfont

View GitHub Profile
require.extensions[".json"] = function (module, filename) {
module.exports = JSON.parse(require("fs").readFileSync(filename, "utf8"))
}
@cmilfont
cmilfont / nodeconf_2011.md
Created May 7, 2011 03:01 — forked from guybrush/nodeconf_2011.md
a list of slides from nodeconf 2011
@cmilfont
cmilfont / server.js
Created May 19, 2011 15:09 — forked from jeffrafter/server.js
Twitter OAuth with node-oauth for node.js+express
var express = require('express');
var sys = require('sys');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = "YOURTWITTERCONSUMERKEY";
var _twitterConsumerSecret = "YOURTWITTERCONSUMERSECRET";
function consumer() {
@cmilfont
cmilfont / tired.rb
Created May 30, 2011 14:41 — forked from karmi/tired.rb
Template for generating a no-frills Rails application with support for ElasticSearch full-text search via the Tire gem
# ===================================================================================================================
# Template for generating a no-frills Rails application with support for ElasticSearch full-text search via Tire
# ===================================================================================================================
#
# This file creates a basic, fully working Rails application with support for ElasticSearch full-text search
# via the Tire gem [http://github.com/karmi/tire].
#
# You DON'T NEED ELASTICSEARCH INSTALLED, it is installed and launched automatically by this script.
#
# Requirements
@cmilfont
cmilfont / david_herman_brazilJS_2011_pt-br.srt
Created June 25, 2011 12:57
Legenda em pt-br - David Herman - BrazilJS 2011
1
00:00:09,502 --> 00:00:11,578
Muito obrigado.
2
00:00:13,485 --> 00:00:19,276
Sinto muito por não ter aprendido português no caminho
3
00:00:20,630 --> 00:00:26,054
@cmilfont
cmilfont / jquery.ba-tinypubsub.js
Created July 7, 2011 21:02 — forked from cowboy/HEY-YOU.md
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.
/*!
* jQuery Tiny Pub/Sub - v0.6 - 1/10/2011
* http://benalman.com/
*
* Copyright (c) 2010 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
(function($){
@cmilfont
cmilfont / sammyjs
Created October 12, 2011 20:58 — forked from hvitorino/sammyjs
sammyjs
//Rota no Sammy
this.get('#/evento/criar', Views.Evento.Criacao.Inicializa);
// Arquivo da View
;(function() {
if(!Views.Evento)
Views.Evento = { };
Views.Evento.Criacao = function (ctx) {
var self = this;
@cmilfont
cmilfont / tbodyScroll.css
Created October 31, 2011 17:51 — forked from henriquegogo/tbodyScroll.css
Scroll on TBODY
table {
display: block;
width: 100%;
}
table thead tr {
display: block;
}
table th,
table td { width: 100px; min-width: 100px; }
table tbody {
@cmilfont
cmilfont / inflections.rb
Created November 15, 2011 11:54 — forked from mateusg/inflections.rb
pt-BR inflections file for Ruby on Rails applications
# encoding: utf-8
# Be sure to restart your server when you modify this file.
# Add new inflection rules using the following format
# (all these examples are active by default):
# ActiveSupport::Inflector.inflections do |inflect|
# inflect.plural /^(ox)$/i, '\1en'
# inflect.singular /^(ox)en/i, '\1'
# inflect.irregular 'person', 'people'
# inflect.uncountable %w( fish sheep )
@cmilfont
cmilfont / goat.rb
Created December 1, 2011 18:58 — forked from cykod/goat.rb
RCov + `git blame` = Find out who the non-testing Goat on your Rails project is
#!/usr/bin/env ruby1.8
require 'rubygems'
require 'nokogiri'
# Copyright @2011 Pascal Rettig - Released under the MIT License,
# No Warranty whatsoever. This will probably destroy your project
#
# Find out who the goat is on your Rails the project - i.e the person responsible for
# writing or modifying the most untested code. Drop goat.rb into your script/
# directory, make it executable then run: