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
var expect = chai.expect; | |
describe('services', function(){ | |
var goat, monkey, monkey2, Donkey, tiger1, tiger2, lion; | |
beforeEach(function(){ | |
//load the module | |
module('app'); | |
//configure providers |
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
<h1>Inner</h1> | |
<img src="http://www.21stcenturytiger.org/wp-content/blogs.dir/2/files/home-page/malayan_adrianotavano_zoomaimi2_2012.jpg"/> |
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
<Response> | |
<Play>http://stark-eyrie-7115.herokuapp.com/cmm.mp3</Play> | |
</Response> |
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
/* Pattern for OOP in JavaScript */ | |
//TODO see if safe way to add inheritsFrom to Function | |
var should = require('should'); | |
function inherit(C, P){ | |
var F = function(){}; //intermediary function between Parent and Child | |
F.prototype = P.prototype; //link intermediary function to Parent | |
var funcs = C.prototype; //keep track of any existing functions on the Child prototype | |
C.prototype = new F(); //link child to intermediary function | |
for (var attrname in funcs) { |
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
Show hidden characters
{ | |
"caret_style": "wide", | |
"color_scheme": "Packages/Color Scheme - Default/GrandsonOfObsidian.tmTheme", | |
"font_face": "Source Code Pro light", | |
"font_size": 19.0, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"save_on_focus_lost": 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
var express = require('express'); | |
var connect = require('connect'); | |
var zlib = require('zlib'); | |
var fs = require('fs'); | |
var app = express(); | |
var compressOptions = { | |
filter: function(req, res) { | |
return /json|text|xml|javascript/.test(res.getHeader('Content-Type')) | |
} |
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
var http = require('http'); | |
var fs = require('fs'); | |
var zlib = require('zlib'); | |
http.createServer(function (req, res) { | |
// var img = fs.readFileSync('./bird.jpg'); | |
var img = fs.createReadStream('./public/bird.jpg'); | |
// res.writeHead(200, {'Content-Type': 'image/jpeg'}); | |
res.writeHead(200, { 'content-encoding': 'gzip' }); |
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
{ | |
"bg" : "purple", | |
"spacing" : 0, | |
"gutter" : "10px", | |
"queries": { | |
"small": "screen and (min-width:1px) and (max-width:400px)", | |
"large": "screen and (min-width:1501px)" | |
}, | |
"animate": { | |
"special": { |
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
body{ | |
background: orange; | |
} |
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
var npm = require('npm'); | |
npmInstall(['http://dl.dropbox.com/u/3098507/sample.tar.gz'], function () { | |
console.log('yay'); | |
}); | |
/* | |
programmatically install some libs with npm | |
working in OSX but not windows | |
*/ | |
function npmInstall(libs, callback){ |