Skip to content

Instantly share code, notes, and snippets.

define([
'jquery',
'underscore',
'backbone',
'ui'
], function($,_,Backbone, widgetListView){
var DialogView = Backbone.View.extend({
className: 'widget-slider',
define([
'jquery',
'underscore',
'backbone',
'router',
'collections/widget-list',
'amplify'
], function($, _, Backbone, router, WidgetCollection, amplify){
var init = function(){
var defaults = amplify.store('defaults');
(function(l){var n=function(){var i=function(){};i.prototype={otag:"{{",ctag:"}}",pragmas:{},buffer:[],pragmas_implemented:{"IMPLICIT-ITERATOR":true},context:{},render:function(a,b,c,d){if(!d){this.context=b;this.buffer=[]}if(!this.includes("",a))if(d)return a;else{this.send(a);return}a=this.render_pragmas(a);a=this.render_section(a,b,c);if(d)return this.render_tags(a,b,c,d);this.render_tags(a,b,c,d)},send:function(a){a!=""&&this.buffer.push(a)},render_pragmas:function(a){if(!this.includes("%",a))return a;
var b=this;return a.replace(RegExp(this.otag+"%([\\w-]+) ?([\\w]+=[\\w]+)?"+this.ctag),function(c,d,e){if(!b.pragmas_implemented[d])throw{message:"This implementation of mustache doesn't understand the '"+d+"' pragma"};b.pragmas[d]={};if(e){c=e.split("=");b.pragmas[d][c[0]]=c[1]}return""})},render_partial:function(a,b,c){a=this.trim(a);if(!c||c[a]===undefined)throw{message:"unknown_partial '"+a+"'"};if(typeof b[a]!="object")return this.render(c[a],b,c,true);return this.render(c[a],b[a],c,true)},render_secti
define([
'jquery',
'underscore',
'backbone',
'store',
'models/location'
], function($,_,Backbone, Store, Location){
var LocationList = Backbone.Collection.extend({
model: Location,
reset: function(){
var funcs = [],
self = this,
jsons = [
['default-widgets.json', Widgets, 'default-widgets'],
//['audio.json', AudioList, 'audio'],
['departures.json', Locations, 'departures'],
['destinations.json', Locations, 'destinations'],
['stops.json', Locations, 'stops'],
['trends.json', Trends, 'trends'],
@meirish
meirish / license_generator.vim
Created April 3, 2012 19:30 — forked from chuckha/license_generator.vim
License Generator for SBO projects
function! LicenseGenerator()
let date = strftime("%c")
if &ft == "javascript"
return "/*jslint bitwise: true, browser: true, eqeqeq: true, immed: true, newcap: true, regexp: true, nomen: false, onevar: false, undef: true, plusplus: false, white: true, indent: 2 */\n/*global confirm define interpolate gettext console */\n\n// Created by Matthew Irish (mirish@safaribooksonline.com) on " . date . "\n/*! Copyright (c) 2012 Safari Books Online, LLC. All rights reserved.*/\n\n"
endif
if &ft == "python"
return "# encoding: utf-8\n\n# Created by Matthew Irish (mirish@safaribooksonline.com) on " . date . "\n# Copyright (c) 2012 Safari Books Online, LLC. All rights reserved.\n\n"
endif
endfun
@meirish
meirish / mbriggs.theme.bash
Created May 20, 2012 21:35
bash-it mbriggs change to add virtualenv
# ------------------------------------------------------------------#
# FILE: mbriggs.zsh-theme #
# BY: Matt Briggs (matt@mattbriggs.net) #
# BASED ON: smt by Stephen Tudor (stephen@tudorstudio.com) #
# ------------------------------------------------------------------#
SCM_THEME_PROMPT_DIRTY="${red}⚡${reset_color}"
SCM_THEME_PROMPT_AHEAD="${red}!${reset_color}"
SCM_THEME_PROMPT_CLEAN="${green}✓${reset_color}"
SCM_THEME_PROMPT_PREFIX=" "
@meirish
meirish / index.html
Created June 17, 2012 18:56 — forked from tkadlec/mqListener.html
machMedia Listener Test
<html>
<head>
<title>MatchMedia Listener Test</title>
<meta name="viewport" content="width=device-width" />
<style type="text/css">
body{
font-family: Helvetica, sans-serif;
}
#colorMe{
padding: 1.5em 1em;
@meirish
meirish / gist:3030572
Created July 2, 2012 02:28
instagram's inlined js
<script>
// SETUP
is_logged_in = false
myUsername = "";
myProfilePicURL = "#";
package main
import (
"code.google.com/p/go-tour/pic"
)
func Pic(dx, dy int) [][]uint8 {
result := make([][]uint8, dy)
for x := 0; x < dy; x++ {