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
macro val { | |
case $var:ident = $expr => { | |
var $var = $expr | |
} | |
case $var:ident = $x:lit .. $y:lit => { | |
var $var = (function() { | |
var arr = [] | |
for (var i = $x; i < $y; i++) | |
arr.push(i) |
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
package main | |
import ( | |
"fmt" | |
) | |
type Stack struct { | |
top *Element | |
size int | |
} |
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 firstUnrepeated(str) { | |
var blacklist = []; | |
var once = {}; | |
str.split("").forEach(function(e, pos) { | |
if (blacklist.indexOf(e) === -1) { | |
once[e] = pos; | |
blacklist.push(e); | |
} | |
else { delete once[e]; } | |
}); |
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
/** | |
* Circular Tooltip (SO) | |
* http://stackoverflow.com/q/13132864/1397351 | |
*/ | |
* { margin: 0; padding: 0; } | |
body { | |
overflow: hidden; | |
background: url(http://theearlcarlson.com/experiments/amTooltip/img/bg.jpg); | |
} | |
/* generic styles for button & circular menu */ |
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
// Try with `redis-benchmark -t GET,SET -n 100000` | |
'use strict'; | |
var net = require('net'); | |
var split = require('split'); | |
var db = {}; | |
net.createServer(function(socket) { | |
function sendError(err) { | |
console.error(err); |
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
'use strict'; | |
var net = require('net'); | |
var db = Object.create(null); | |
net.createServer(function(socket) { | |
function sendError(err) { | |
console.error(err); | |
socket.write("-ERR " + err + "\r\n") | |
} |
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
<html> | |
<head> | |
<script src="pixi.js"></script> | |
</head> | |
<body> | |
<script> | |
var stage = new PIXI.Stage(0x66FF99, true); | |
var renderer = PIXI.autoDetectRenderer(500, 500); | |
var graphics = new PIXI.Graphics(); |
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
// Accumulators | |
// ============================================================================= | |
// | |
// A tiny library for reactive programming that offers blazing fast generic | |
// collection manipulation, asyncronous flow control and the ability to | |
// represent infinitely large collections. | |
// | |
// Copyright Gordon Brander, 2013. Released under the terms of the [MIT license](http://opensource.org/licenses/MIT). | |
// | |
// Background: |
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
launch_tests() { | |
cd $GAIADIR | |
if [ ! -d profile/extensions/httpd ] ; then | |
DEBUG=1 make | |
fi | |
$NIGHTLY/firefox --no-remote -profile $GAIADIR/profile-debug/ http://test-agent.gaiamobile.org:8080/ & | |
make test-agent-server | |
} |
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
diff --git a/apps/communications/contacts/test/unit/mock_iccmanager.js b/apps/communications/contacts/test/unit/mock_iccmanager.js | |
deleted file mode 100644 | |
index 1df8692..0000000 | |
--- a/apps/communications/contacts/test/unit/mock_iccmanager.js | |
+++ /dev/null | |
@@ -1,13 +0,0 @@ | |
-'use strict'; | |
- | |
-var MockIccManager = function() { | |
- this.iccIds = []; |