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
{ | |
init: function(elevators, floors) { | |
var floorsWaiting = { | |
up: [], | |
down: [] | |
}; | |
var self = this; | |
var distance = function(num1, num2) { |
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
{ | |
init: function(elevators, floors) { | |
var floorsWaiting = { | |
up: [], | |
down: [] | |
}; | |
var self = this; | |
var distance = function(num1, num2) { |
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
// Clock Directive | |
// Demo at http://embed.plnkr.co/W36A8G1dJfmbnXSnbl98/preview | |
// Uses SVG to render an analog clock | |
// Requires moment.js and also moment-timezone if you set the `zone` optional attribute. | |
// Usage | |
// <clock radius='40'></clock> | |
// You can also set the timezone | |
// <clock radius='40' zone='America/New_York'></clock> |
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 AnimalKingdom | |
def type | |
'Animal' | |
end | |
end | |
module PlantKingdom | |
def type | |
'Plant' | |
end |
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
// This is a plugin for ImpactJS that Google Chrome | |
// rendering for the Macbook Pro with Retina display. | |
// Based on the solution offered on http://www.html5rocks.com/en/tutorials/canvas/hidpi/ | |
// It probably have a negative impact on performance. | |
// Use wisely. | |
// | |
// | |
// Place this in lib/plugins/smart-resize.js | |
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
KeyCodes = | |
K_CANCEL: 3 | |
K_HELP: 6 | |
K_BACK_SPACE: 8 | |
K_TAB: 9 | |
K_CLEAR: 12 | |
K_RETURN: 13 | |
K_ENTER: 14 | |
K_SHIFT: 16 | |
K_CONTROL: 17 |
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
// EMBLEM OUTPUT | |
window.require.register("templates/application", function(exports, require, module) { | |
module.exports = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) { | |
this.compiledVersion = '1.0.rc.2'; | |
helpers = helpers || Handlebars.helpers; data = data || {}; | |
var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression; | |
buffer += "<div class=\"container-fluid\"><div class=\"navbar\"><div class=\"navbar-inner\"><a class=\"brand\">Hampsters</a><ul class=\"nav\"><li class=\"active\"><a>Home</a></li><li></li><li><a>Link</a></li></ul></div></div><p>Find me in <code>app/templates/application.emblem</code>"; |
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
--type-set=mustache=.mustache | |
--type-set=css=.css,.scss,.less | |
--type-set=html=.html,.haml,.hamlc | |
--type-set=js=.js,.coffee |
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
ENV["RAILS_ENV"] ||= 'test' | |
require 'pry' | |
# Conditional Spork.prefork (this comment is needed to fool Spork's `bootstrapped?` check) | |
if /spork/i =~ $0 | |
require File.expand_path("../env_spork", __FILE__) | |
else | |
require File.expand_path("../env_base", __FILE__) | |
end |
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
"Paste into your .vimrc | |
" for insert mode remap <c-l> to: | |
" Insert a hash rocket for ruby | |
" Insert a -> for php | |
function! SmartHash() | |
let ruby = match(expand("%"), '\(.rb\|.haml\)$') != -1 | |
let php = match(expand("%"), '.php') != -1 | |
if php |