Skip to content

Instantly share code, notes, and snippets.

View ricardobeat's full-sized avatar

Ricardo Tomasi ricardobeat

View GitHub Profile
@ricardobeat
ricardobeat / count.js
Last active December 16, 2015 02:59 — forked from alanhoff/gist:5366411
var async = require('async')
models = [model1, ...]
async.map(models, function(model, next){
model.count().exec(next)
}, function(err, count){
res.render('painel/info', {
title: 'Informações',
subtitle: 'Geral',
@ricardobeat
ricardobeat / body.html
Created December 5, 2012 20:02 — forked from jcla1/body.html
Web Audio API overview post
<body>
<div id="container">
<canvas height="200" width="500" id="fft"></canvas>
<audio id="audio" src="IO2010.mp3" preload controls></audio>
</div>
<script>
// requestAnim shim layer by Paul Irish
window.requestAnimFrame = (function(){
return window.requestAnimationFrame ||
window.webkitRequestAnimationFrame ||
@ricardobeat
ricardobeat / recommender.coffee
Created December 20, 2011 19:13 — forked from malgorithms/recommender.coffee
Fake Recommender class for CoffeeScript/tame discussion - using async (http://github.com/caolan/async)
async = require 'async'
class Recommender
getRecommendations: (search_params, respond) ->
# Do 2 things at once:
# - check if we have a logged in user, get their info
# - fire off distributed requests for search queries
# ------------------------------------------------------------------------
# Textmate essential bundles
cd ~/Library/Application\ Support/TextMate/Pristine\ Copy/Bundles
# mkdir -p cd /Applications/TextMate.app/Contents/SharedSupport/Bundles
git clone git://github.com/protocool/ack-tmbundle.git Ack.tmbundle
git clone git://github.com/textmate/ruby-haml.tmbundle.git
git clone git://github.com/seaofclouds/sass-textmate-bundle.git "Ruby Saas.tmbundle"
git clone git://github.com/bmabey/cucumber-tmbundle.git Cucumber.tmbundle
git clone git://github.com/karnowski/blue-ridge-tmbundle.git JavaScript\ Blue\ Ridge.tmbundle
git clone git://github.com/johnmuhl/nginx-tmbundle.git nginx.tmbundle
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<!--Site-->
<div id="site">
<!--container-->
<div id="container">