Skip to content

Instantly share code, notes, and snippets.

@joshvermaire
joshvermaire / reset.sass
Created July 24, 2011 00:20
Eric Meyer Reset 2.0 SASS
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
Changed from CSS to SASS
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
margin: 0
padding: 0
border: 0
@joshvermaire
joshvermaire / shorthand.coffee
Created February 21, 2012 17:11
My Take on Twitter Bootstrap's Typeahead
Shorthand = (element, options) ->
@$el = $(element)
@options = $.extend({}, $.fn.shorthand.defaults, options)
for key, val of @options
@[key] = val
delete @options
@$menu = $(@menu)[@method](@parent)
@listen()
@init()
this
@joshvermaire
joshvermaire / gist:1975341
Created March 4, 2012 23:20
Jitsu Deploy
Joshs-MacBook-Air:turntable joshvermaire$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in app.js
warn: Local version appears to be old.
warn: Your package.json version will be incremented for you automatically.
warn: About to write /Users/joshvermaire/Sites/turntable/package.json
data:
data: {
@joshvermaire
joshvermaire / gist:1975363
Created March 4, 2012 23:26
Jitsu Deploy 2
Joshs-MacBook-Air:turntable joshvermaire$ jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing your application dependencies in app.js
warn: Local version appears to be old.
warn: Your package.json version will be incremented for you automatically.
warn: About to write /Users/joshvermaire/Sites/turntable/package.json
data:
data: {
@joshvermaire
joshvermaire / normalize-modern.css
Created March 11, 2012 08:55
Normalize.css for modern browsers
/*! normalize.css 2012-03-09T22:11 UTC - http://github.com/necolas/normalize.css */
/* === HTML5 display definitions === */
/*
* Prevents modern browsers from displaying 'audio' without controls
* Remove excess height in iOS5 devices
*/
audio:not([controls]) {display: none;height: 0;}
/*
@joshvermaire
joshvermaire / env.sample.js
Created March 12, 2012 18:47 — forked from jmreidy/env.sample.js
Pivotal to Sprintly importer
module.exports = {
pivotal: {
PID: 'PID',
TOKEN: 'TOKEN'
},
sprintly: {
USER: "USER_EMAIL",
ID: 'PRODUCT_ID',
KEY: 'API_KEY'
},
canvas {
position: absolute;
left: 0;
top: 0;
}​
@joshvermaire
joshvermaire / gist:2344694
Created April 9, 2012 16:52
jitsu error
→ jitsu apps start
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command apps start
info: Starting app BrilliantTurntableBot
error: Error running command apps start
error: Nodejitsu Error (500): Internal Server Error
warn: Error returned from Nodejitsu
error: Error: Attempt to start running application
error: at /root/nodejitsu/lib/nodejitsu/resources/app/controller/start.js:31:23
ViewClass = Backbone.View.extend
tagName: 'div'
className: 'class_name'
id: 'my_cool_id'
events:
'click #here' : 'myFunc'
initialize: ->
@joshvermaire
joshvermaire / gist:2942810
Created June 16, 2012 23:16
multiple collections per model instance
tlmodel = (attributes, options) ->
attributes = _.extend({}, defaults, attributes) if defaults = getValue(this, "defaults")
attributes or = {}
options or = {}
attributes = @parse(attributes) if options.parse
@collections = {}
@attributes = {}
@_escapedAttributes = {}
@cid = _.uniqueId("c")
@changed = {}