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
(?<=<h2>).+(?=</h2>) |
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
@import "compass/utilities/sprites/base"; | |
$icons: sprite-map("images/icons/*.png", $layout: smart); | |
[class^="icon-"] { | |
display: inline-block; | |
background: $icons; | |
} | |
@each $i in sprite_names($icons) { |
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
/* Simple JavaScript Inheritance | |
* By John Resig http://ejohn.org/ | |
* MIT Licensed. | |
* Usage exmaples: http://ejohn.org/blog/simple-javascript-inheritance/ | |
*/ | |
// Inspired by base2 and Prototype | |
(function(){ | |
var initializing = false, fnTest = /xyz/.test(function(){xyz;}) ? /\b_super\b/ : /.*/; | |
// The base Class implementation (does nothing) | |
this.Class = function(){}; |
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 conn = new Mongo(); | |
var db = conn.getDB("test"); | |
var myCursor = db.images.find(); | |
myCursor.forEach( | |
function(myDoc) { | |
// print( "images: " + tojson(myDoc) ); | |
var myAlbum = db.albums.findOne( { "images": myDoc._id } ); |
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 app = express(); | |
app.configure(function() { | |
app.set(' view engine', 'jade'); | |
app.use(express.static(__dirname + '/ public')); | |
}); | |
app.get('/', function(req, res) { | |
res.render(" index.jade", { | |
layout: false | |
}); |
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({ | |
forceChoke: function() { | |
}, | |
forceLighting: function() { | |
}, | |
forceRun: function() { | |
} |
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
require.config({ | |
paths: { | |
// use cdn default | fall back local copy | |
"jquery": [ | |
'//cdnjs.cloudflare.com/ajax/libs/jquery/2.0.0/jquery.min.js', | |
'lib/jquery' | |
] | |
"backbone": "vendor/backbone", | |
"underscore": "vendor/underscore" | |
}, |
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
// Write a program that finds the document with the highest | |
// recorded temperature for each state, and adds a "month_high" | |
// field for that document, setting its value to true. | |
var MongoClient = require('mongodb').MongoClient; | |
MongoClient.connect('mongodb://localhost:27017/weather', function(err, db) { | |
if(err) throw err; | |
var cursor = db.collection('data').find({}); |
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
'use strict'; | |
var LIVERELOAD_PORT = 35729; | |
var lrSnippet = require('connect-livereload')({port: LIVERELOAD_PORT}); | |
var mountFolder = function (connect, dir) { | |
return connect.static(require('path').resolve(dir)); | |
}; | |
/*global module:false*/ | |
module.exports = function(grunt) { |
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 BaseModel = function(type){ | |
this.type = !type ? "BaseModel" : type ; | |
}; | |
BaseModel.prototype.sayHello = function() { | |
return "Hello " + this.type; | |
}; | |
var User = function() { |
OlderNewer