Skip to content

Instantly share code, notes, and snippets.

@there4
there4 / mobile-meta-links.html
Created December 1, 2011 04:41
iOS Web App Configuration
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Responsive Design Testing</title>
<style>
body { margin: 20px; font-family: sans-serif; overflow-x: scroll; }
.wrapper { width: 6000px; }
.frame { float: left; }
h2 { margin: 0 0 5px 0; }
@there4
there4 / jslint-config-for-qunit.js
Created March 21, 2012 23:31 — forked from zackd/jslint-config-for-qunit.js
jslint config for QUnit tests
/*global QUnit:true, module:true, test:true, asyncTest:true, expect:true*/
/*global start:true, stop:true ok:true, equal:true, notEqual:true, deepEqual:true*/
/*global notDeepEqual:true, strictEqual:true, notStrictEqual:true, raises:true*/
@there4
there4 / gist:2778321
Created May 23, 2012 22:48 — forked from joefitzgerald/gist:1990736
Handlebars JST Grunt Task
/*
* Grunt Task File
* ---------------
*
* Task: JST-HB
* Description: Compile handlebars templates to JST file.
* Dependencies: underscore@1.2.4
*
*/
@there4
there4 / template_spec.js
Created June 10, 2012 00:16
javascript: Jasmine template (jslint)
/*global beforeEach, afterEach */
/*global describe, it, expect */
/*global window, eb, loadFixtures */
(function () {
"use strict";
describe('Test Class', function() {
it('Test Name', function () {
@there4
there4 / handlebars-helpers.js
Created June 10, 2012 00:23 — forked from elidupuis/handlebars-helpers.js
Simple Handlebars.js helpers
define([
"use!underscore",
"use!handlebars",
"moment"
],
function(
_, Handlebars, Moment
) {
@there4
there4 / Grunt Coffee Task
Created June 15, 2012 22:42 — forked from davidpfahler/Grunt Coffee Task
A grunt task that compiles coffee-script to js
/*
* Grunt Task File
* ---------------
*
* Task: coffee
* Description: Compile coffee files to js
* Dependencies: coffee-script
*
*/
@there4
there4 / gist:3220241
Created July 31, 2012 20:34 — forked from munhitsu/gist:1034876
python 2.7 install on OSX (10.6.7) using brew (pip, easy_install, virtualenv, virtualenvwrapper)
#NOTE: .pydistutils.cfg seems to be not compatible with brew install python
#areas I needed to clean before installation
#clean up ~/Library/Python
#clean up .local
brew install python --framework
easy_install pip
pip install virtualenv
pip install virtualenvwrapper
mkdir $HOME/.virtualenvs
@there4
there4 / backbone_sync.js
Created August 16, 2012 04:16 — forked from jonpaul/backbone_sync.js
Rewriting backbone.sync for rails CSRF
(function($) {
var methodMap = {
'create': 'POST',
'update': 'PUT',
'delete': 'DELETE',
'read' : 'GET'
};
var getUrl = function(object) {
if (!(object && object.url)) return null;
@there4
there4 / vertebrates.js
Created November 6, 2012 22:03 — forked from jsvine/vertebrates.js
vertebrates.js
var Vertebrate = {};
Vertebrate.Model = Backbone.Model.extend();
Vertebrate.Collection = Backbone.Collection.extend({
model: Vertebrate.Model
});
// Source: http://en.wikipedia.org/wiki/Vertebrates
var vertebrates = new Vertebrate.Collection([