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
public static class VaultManager | |
{ | |
private const string VaultKeyResource = "My App Or Something..."; | |
private static readonly PasswordVault Vault = new PasswordVault(); | |
public static string Username | |
{ | |
get | |
{ | |
try |
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
This is a snippit of a long text from 'The Journey of the Void' - Ben Goertzel | |
Who am I, a mere conglomeration of particles -- | |
an organism flashing in and out of existence -- | |
a web of learned and inherited patterns -- | |
to explain the universe as a whole? | |
And yet, |
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
node 0.10.39 | |
decode to buffer | |
13,172 op/s » bencode | |
13,310 op/s » bencoding | |
16,289 op/s » dht_bencode | |
686 op/s » bncode | |
11,969 op/s » dht | |
encode buffer |
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.defs = {}; | |
define.modules = {}; | |
function define(name, fn) { | |
define.defs[name] = fn; | |
} | |
function require(name) { | |
if (define.modules.hasOwnProperty(name)) return define.modules[name]; | |
if (define.defs.hasOwnProperty(name)) { | |
var fn = define.defs[name]; | |
define.defs[name] = function () { throw new Error("Circular Dependency"); }; |
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 = TwoStep; | |
var slice = Array.prototype.slice; | |
function Group(callback) { | |
this.args = [null]; | |
this.left = 0; | |
this.callback = callback; | |
this.isDone = false; | |
} |
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 match = [] | |
var _finalizeExpr = function(match) { | |
var vs = match[0] | |
var _iter = match[1] | |
var _done = match[2] | |
var i = 0 | |
var _iterWrappper = function() { | |
if(i === vs.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
// Creating a grammatical pattern for real numbers using XRegExp.build | |
/* | |
* Approach 1: Make all of the subpatterns reusable | |
*/ | |
var lib = { | |
digit: /[0-9]/, | |
exponentIndicator: /[Ee]/, | |
digitSeparator: /[_,]/, |
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 GO = 'GO', | |
OK = 'OK', | |
SIGN = 'SIGN', | |
LZERO = 'LZERO', | |
INT = 'INT', | |
FRAC = 'FRAC', | |
FDIG = 'FDIG', | |
EXP = 'EXP', | |
XSIGN = 'XSIGN', | |
EDIG = 'EDIG', |
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 stream = require("fake-stream-lib"), | |
Emitter = require("events").EventEmitter, | |
util = require("util"); | |
// Today... | |
function Device( opts ) { | |
this.value = null; |
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
local floor = require('math').floor | |
local table = require 'table' | |
-- For encoding numbers using modified base 64 for compact etags | |
local digits = { | |
"0", "1", "2", "3", "4", "5", "6", "7", | |
"8", "9", "A", "B", "C", "D", "E", "F", | |
"G", "H", "I", "J", "K", "L", "M", "N", | |
"O", "P", "Q", "R", "S", "T", "U", "V", | |
"W", "X", "Y", "Z", "a", "b", "c", "d", |
OlderNewer