Skip to content

Instantly share code, notes, and snippets.

vangberg / README
Created Feb 22, 2009
Deploying a Sinatra app to Heroku
# Deploying a Sinatra app to Heroku
## Database
The location of the database Heroku provides can be found in the environment
variable DATABASE_URL. Check the configure-block of toodeloo.rb for an example
on how to use this.
## Server
Heroku is serving your apps with thin, with means you have all your thin goodness available,
such as EventMachine.
mazuhl / application_controller.rb
Created Jan 8, 2010
Putting together a traffic analytics model and controller for a Ruby on Rails app based on this presentation about Scribd (see slides 17 to 22).
View application_controller.rb
class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time
protect_from_forgery # See ActionController::RequestForgeryProtection for details
# Scrub sensitive parameters from your log
# filter_parameter_logging :password
before_filter :log_page_view, :except => [:destroy]
View guilloche.js
name: guilloche
script: guilloche.js
description: guilloche
provides: [Guilloche]
mrdoob / RequestAnimationFrame.js
Created Feb 22, 2011
Provides requestAnimationFrame in a cross browser way.
View RequestAnimationFrame.js
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish /
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
anildigital / client.js
Created Apr 9, 2011
Twitter streaming API example twitter-node and
View client.js
<title>Codesnippit NodeJS Twitter Tracker Client</title>
(function() {
var script = document.createElement("script");
script.src = "";
mattetti / gist:1318670
Created Oct 27, 2011
google cloud print pointers
View gist:1318670
client =, CLIENT_SECRET,
:authorize_url => "/o/oauth2/auth",
:access_token_url => "/o/oauth2/token",
:site => '')
get '/auth' do
url = client.web_server.authorize_url(
:redirect_uri => redirect_uri,
:scope => '',
:response_type => "code"

Tiny Content Framework

About the project

This is a tiny content strategy framework focused on goals, messages, and branding. This is not a checklist. Use what you need and scrap the rest. Rewrite it or add to it. These topics should help you get to the bottom of things with clients and other people you work with.

Give me feedback on Twitter (@nicoleslaw) or by email (


View ios-8-web-app.html
<!doctype html>
<!-- -->
<title>iOS 8 web app</title>
tonycoco / image_filters.rb
Created Jun 11, 2012
Useful image filters (Instagram/Hipster/Cool) for CarrierWave using MiniMagick (ImageMagick)
View image_filters.rb
module CarrierWave
module MiniMagick
def toaster_filter
manipulate! do |img|
img.modulate '150,80,100'
img.gamma 1.1
jhollinger / dropbox.css
Created Jul 27, 2012
Dropbox - async, ajax uploads with HTML5 in Sinatra
View dropbox.css
#dropbox {
position: relative;
#dropbox > input {
position: absolute;
top: 0px;
right: 0px;
bottom: 0px;
left: 0px;