- How good are you at foosball?
- What developer tools do you use and what are some things you like about them?
- Walk me through a Cross site scripting attack? Cross site request forgery?
- NPM? How does node resolve dependencies? require('foo');
- Walk me through binding a model to a text input?
- How do you learn a library?
- Whats the most recent one you've tried?
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
function($http, $q) { | |
var cache = {}; | |
return { | |
get: function (force){ | |
var deferred = $q.defer(); | |
if(force || !cache['get']){ | |
return $http.get('/path/to/data').then(function(result){ |
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
module.exports = function(grunt) { | |
'use strict'; | |
var _ = require('lodash'); | |
// Configuration | |
// ------------- | |
// Load Tasks | |
// ---------- |
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
it('waits for delete to return before saving', function(done){ | |
// Given | |
var options = { | |
model: new Backbone.Model({ | |
modules: new Backbone.Collection([ | |
new Model(), | |
new Model() | |
]) | |
}), | |
success: 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 d3 = require('d3'); | |
var internals = {}; | |
module.exports = function ($parse, $compile) { | |
return { | |
restrict: 'E', | |
replace: false, | |
scope: { | |
data: '=chartData', | |
width: '=width', |
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
.input-validation-error | |
{ | |
border: 1px solid #ff0000; | |
background-color: #ffeeee; | |
} | |
span.input-validation-error { | |
border: none; | |
} |
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
(function ($) { | |
$.fn.formatfilename = function (options) { | |
var settings = $.extend({ | |
'length': '40' | |
}, options); | |
return this.each(function () { | |
var $this = $(this); |
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
$.fn.autotab = function () { | |
var inputEvents = "input"; | |
if (!("oninput" in document || "oninput" in $("<input>")[0])) { | |
inputEvents += " keypress"; | |
} | |
return this.each(function () { | |
var $this = $(this); | |
$this.on(inputEvents, "input[maxlength]", function (e) { | |
var $this = $(this); | |
if ($this.attr("maxlength") <= $(this).val().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
Function.prototype.inheritsFrom = function (base) { | |
this.prototype = Object.create(base.prototype); | |
this.prototype.constructor = this; | |
this.prototype._super = base.prototype; | |
return this; | |
}; | |
var Base = function () { | |
if (!(this instanceof Base)) | |
throw ('Constructor called without "new"'); |
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
cd "$(ProjectDir)Scripts" | |
node.exe r.js -o build.js |
OlderNewer