Click "raw" below to install. Requires Google Chrome, Firefox + Greasemonkey, or some other browser supporting user scripts / content scripts / user javascript.
This file contains hidden or 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 mongoose = require('./index') | |
| , TempSchema = new mongoose.Schema({ | |
| salutation: {type: String, enum: ['Mr.', 'Mrs.', 'Ms.']} | |
| }); | |
| var Temp = mongoose.model('Temp', TempSchema); | |
| console.log(Temp.schema.path('salutation').enumValues); | |
| var temp = new Temp(); | |
| console.log(temp.schema.path('salutation').enumValues); |
This file contains hidden or 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
| <label>Phones:</label> | |
| <input type="checkbox" name="phones" id="Android" value="Android"/><label for="Android">Android</label> | |
| <input type="checkbox" name="phones" id="iPhone" value="iPhone" checked="checked"/><label for="iPhone">iPhone</label> | |
| <input type="checkbox" name="phones" id="Blackberry" value="Blackberry" checked="checked"/><label for="Blackberry">Blackberry</label> |
This file contains hidden or 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
| """ | |
| Functions for converting dates to/from JD and MJD. Assumes dates are historical | |
| dates, including the transition from the Julian calendar to the Gregorian | |
| calendar in 1582. No support for proleptic Gregorian/Julian calendars. | |
| :Author: Matt Davis | |
| :Website: http://github.com/jiffyclub | |
| """ |
This file contains hidden or 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
| begin | |
| require 'compass' | |
| require 'compass/exec' | |
| rescue LoadError | |
| require 'rubygems' | |
| require 'compass' | |
| require 'compass/exec' | |
| end | |
| module Jekyll |
This file contains hidden or 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 hem = new (require('hem')); | |
| var less = require('less'); | |
| var fs = require('fs'); | |
| var argv = process.argv.slice(2); | |
| hem.compilers.less = function(path) { | |
| var content, result; | |
| content = fs.readFileSync(path, 'utf8'); | |
| result = ''; | |
| less.render(content, function(err, css) { |
This file contains hidden or 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
| // module dependencies | |
| var http = require('http'), | |
| url = require('url'); | |
| /** | |
| * UrlReq - Wraps the http.request function making it nice for unit testing APIs. | |
| * | |
| * @param {string} reqUrl The required url in any form | |
| * @param {object} options An options object (this is optional) |
This file contains hidden or 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
| #!/bin/sh | |
| # | |
| # Shell script that configures gnome-terminal to use solarized theme | |
| # colors. Written for Ubuntu 11.10, untested on anything else. | |
| # | |
| # Solarized theme: http://ethanschoonover.com/solarized | |
| # | |
| # Adapted from these sources: | |
| # https://gist.github.com/1280177 | |
| # http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # DESCRIPTION: | |
| # | |
| # Set the bash prompt according to: | |
| # * the active virtualenv | |
| # * the branch/status of the current git repository | |
| # * the return value of the previous command | |
| # * the fact you just came from Windows and are used to having newlines in | |
| # your prompts. |
This file contains hidden or 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 node js module to get distance between two coordinates. */ | |
| /* */ | |
| /* Code transformed from Chris Veness example code - please refer to his website for licensing */ | |
| /* questions. */ | |
| /* */ | |
| /* */ | |
| /* Latitude/longitude spherical geodesy formulae & scripts (c) Chris Veness 2002-2011 */ | |
| /* - www.movable-type.co.uk/scripts/latlong.html */ |