Skip to content

Instantly share code, notes, and snippets.

View lancejpollard's full-sized avatar
🐢
Code

Lance Pollard lancejpollard

🐢
Code
View GitHub Profile
@lancejpollard
lancejpollard / Procfile
Created June 25, 2012 22:31 — forked from todoubled/Procfile
Getting Kue working on Heroku
web: node app.js
worker: node consumer.js
/**
* A `tail -f` implementation in Node.js.
*
* Bratish Goswami
* bratishgoswami AT gmail DOT com
*
*/
var sys = require("sys"),
fs = require('fs'),

Routing in Ember

In Ember, the application's state manager handles routing. Let's take a look at a simple example:

App.stateManager = Ember.StateManager.create({
  start: Ember.State.extend({
    index: Ember.State.extend({
      route "/",
@lancejpollard
lancejpollard / .gitignore
Created March 23, 2012 09:28 — forked from mbleigh/.gitignore
MongoMapper::TokenKeys, a simple way to generate tokens for MongoMapper models.
Gemfile.lock
@lancejpollard
lancejpollard / data-markdown.user.js
Created November 8, 2011 19:09 — forked from paulirish/data-markdown.user.js
*[data-markdown] - use markdown, sometimes, in your HTML
// ==UserScript==
// @name Use Markdown, sometimes, in your HTML.
// @author Paul Irish <http://paulirish.com/>
// @link http://git.io/data-markdown
// @match *
// ==/UserScript==
// If you're not using this as a userscript just delete from this line up. It's cool, homey.
@lancejpollard
lancejpollard / GridModel.coffee
Created August 24, 2011 04:49 — forked from d4tocchini/GDOM.coffee
JQML Responsive Grid API demo
class GridModel extends RW.Model
defaults:
area:
selector: '.G_area'
dimensions: ['h', 'v']
h:
unit: null
count: 12
gutter: 20
@lancejpollard
lancejpollard / gist:1086568
Created July 16, 2011 17:28
Kramdown+Albino(Pygments)でハイライト
require "rubygems"
require "kramdown"
require "albino"
class Kramdown::Parser::AlbinoKramdown < Kramdown::Parser::Kramdown
def replace_code(code, ptrn, f = false)
if /\A\|(.+?)(!?)\|(?!\Z)/ =~ code then
lang = $1
run = $2