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
(function() { | |
var moduleList = [] | |
module, | |
key; | |
if (typeof requirejs !== 'undefined') { | |
console.groupCollapsed('%cRequire.js v%s module list', 'color: #0080ff; font: 1.4em Menlo, monospace', requirejs.version); | |
for (key in requirejs.s.contexts._.defined) { | |
module = requirejs.s.contexts._.defined[key]; | |
moduleList.push({ |
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
define( | |
'observer', | |
[ | |
'EventEmitter' | |
], | |
function(EventEmitter) { | |
'use strict'; | |
var OBSERVER_KEY = '_isObserver', | |
isStandardDefineProperties = true; |
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
define( | |
'Observer', | |
[ | |
'EventEmitter' | |
], | |
function(EventEmitter) { | |
'use strict'; | |
function copyValue(value) { | |
if (typeof value === 'object') { |
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
define( | |
'EventEmitter', | |
function() { | |
'use strict'; | |
/** | |
* Parse event types into topic and filters. | |
*/ | |
function parseEvent(event) { | |
event = event.split('.'); |
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
/** | |
* Creates an array in which each value stored in the array represets the value's index (zero-based). | |
* @param {number} len - Length of array to produce. | |
* @returns {array} The resulting array. | |
*/ | |
function arrayOfNumbers(len) { | |
/* | |
* You could replace Number with eval and save 2 additional bytes, | |
* however that is less secure and probalby not worth the 2 bytes. | |
* |
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 | |
if [ "$#" -ne 3 ] || ! [ -f "$1" ]; then | |
# usage | |
echo "$(basename $0) [file] [offset] [bytes]" | |
exit 1 | |
fi | |
bytes=$(printf "$3" | xxd -p) | |
printf $bytes | xxd -r -p | dd of="$1" seek=$(( $2 )) count=$(( ${#bytes} / 2 )) bs=1 conv=notrunc &> /dev/null |
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 result = []; | |
(function dfs(set, len, stack) { | |
if(len === 0) | |
return result.push(Array.prototype.map.call('metadata', function(x, i) { | |
return i%2 ? stack[i>>1] : x; | |
}).join('')); | |
for(var i = 0; i < set.length; dfs(set, len-1, (stack || []).concat(set[i++]))); | |
}(['a', 'e', 'i', 'o', 'u', 'y'], 4)) |
NewerOlder