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([ | |
'dojo/declare', | |
'dojo/promise/when' | |
], function (declare, when) { | |
var slice = [].slice, | |
nop = function () {}; | |
function createNotifier(object) { | |
var listenerMap = {}, | |
objectListeners = []; |
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 dojoConfig = { | |
asyc: true, | |
baseUrl: 'path/to/src', | |
tlmSiblingOfDojo: false, | |
packages: [ | |
'dojo', | |
'dijit', | |
'dojox', | |
{ name: 'doh', location: 'util/doh' } | |
] |
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
# Set the default behavior, in case users don't have core.autocrlf set | |
* text=auto | |
# Files that should always be normalized and converted to native line | |
# endings on checkout. | |
*.js text | |
*.json text | |
*.htm text | |
*.html text | |
*.svg text |
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
/// ice/logging/advanced.js | |
define(function (require, exports) { | |
exports.log = function (message, options) { | |
// ... | |
}; | |
exports.error = function (message, options) { | |
// ... | |
}; | |
}); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Test</title> | |
<style> | |
#test { | |
width: 300px; | |
height: 300px; |
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
# vim: set filetype=zsh: | |
if [[ $# -eq 0 ]]; then | |
echo "Usage: hostit [-l] [[-d -f] hostname]" | |
return | |
fi | |
REMOVE_HOST=0 | |
FORCE_HOST=0 | |
LIST_HOSTS=0 |
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 secretSanta(array) { | |
var year = (new Date).getYear(), | |
offset = year % array.length, | |
map = {}; | |
array.forEach(function (item, index) { | |
map[item] = array[index + offset] || array[array.length - (index + offset)]; | |
}); | |
return map; |
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
has.add("css-user-select", function(global, doc, element){ | |
var style = element.style; | |
if(typeof style.userSelect !== "undefined"){ | |
// Unlikely; user-select is non-standard, but might as well be future-proof... | |
return "userSelect"; | |
} | |
var prefixes = ["Khtml", "O", "ms", "Moz", "Webkit"], | |
i = prefixes.length, | |
prefix, name; |
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
#!/usr/bin/env node | |
var repl = require('repl'), | |
vm = require('vm'), | |
useGlobal = true; | |
function evalWithHistory(code, context, file, callback){ | |
// TOOD: write history saving routines | |
var err, result; | |
try{ | |
if(useGlobal){ |