This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//=== LIST | |
Article.Views.List = Backbone.View.extend({ | |
template: "", | |
initialize: function( options ){ | |
_.bindAll(this, "render", "addAll", "addOne"); | |
this.collection.bind( "add", this.addOne ); | |
this.collection.bind( "reset", this.addAll ); | |
this.totalItems = this.collection.length; | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the main application configuration file. It is a Grunt | |
// configuration file, which you can learn more about here: | |
// https://github.com/cowboy/grunt/blob/master/docs/configuring.md | |
module.exports = function(grunt) { | |
grunt.initConfig({ | |
// The clean task ensures all files are removed from the dist/ directory so | |
// that no files linger from previous builds. | |
clean: ["dist/"], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> | |
<title>{{app_title}}</title> | |
<!-- Mobile viewport optimization h5bp.com/ad --> | |
<meta name="HandheldFriendly" content="True"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//################################################################ STYLUS MIXIN | |
// Colors | |
$lavender = #9569bb | |
$pink = #f468f9 | |
$white = #fff | |
$black = #000 | |
$grayDark = #333 | |
$grayMed = #666 | |
$grayLight = #999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fs = require 'fs' | |
ID3 = require 'node-id3' | |
findit = require 'findit' | |
cradle = require 'cradle' | |
db = new(cradle.Connection)().database('music') | |
allowed_files = [ 'mp3', 'aiff', 'wav', 'ogg' ] | |
mnt = [ | |
'/Users/<username>/Music', | |
'/Users/<username>/Podcasts' ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the main application configuration file. It is a Grunt | |
// configuration file, which you can learn more about here: | |
// https://github.com/cowboy/grunt/blob/master/docs/configuring.md | |
// http://net.tutsplus.com/tutorials/javascript-ajax/meeting-grunt-the-build-tool-for-javascript/ | |
// If you need support for a pre-compiler or a new tool to play with, check out | |
// http://gruntjs.com/ | |
module.exports = function(grunt) { | |
// directory paths |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
// 2012-09-21 : RWM | |
(function(){ | |
var countrysortinator = function(){ | |
// Sort object | |
var sortinator = { | |
parse_countries : function($container){ | |
var countries = []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if _( others ).include( dubstep.banger ) | |
for bassface in [1..140] | |
"WUB" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define [ "modules/user" ], (User)-> | |
describe "User", -> | |
users = new User.Collection() | |
me = null | |
it "create new user", -> | |
users.create | |
"email" : "[email protected]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define([], function(app) { | |
var Graph = {}, | |
adj = {}; //Map of adjacency lists for each node | |
//@nodes (int[]) | |
Graph.init = function(nodes){ | |
//your node labels are consecutive integers starting with one. | |
//to make the indexing easier we will allocate an array of adjacency one element larger than necessary | |
adj = adj.clone(); | |
for (var i = 0; i < nodes.length; ++i) { |
OlderNewer