if err != nil {
return
}
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
/** | |
* class which allows 'private' (just non-enumerable prototype object) methods and variables | |
*/ | |
macro class { | |
case $className { constructor $constParam { $constBodyStatement... } public var {$public_vars ...} private var $private_vars $rest ... } => { | |
var $className = (function() { | |
function $className $constParam { | |
$public_vars ... Object.defineProperty(this, '_private_vars', { configurable: true, enumerable: false, value: $private_vars, writable: 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
//author: Sun, Junyi (weibo.com/treapdb) | |
//usage: node --nouse-idle-notification --expose-gc --max-old-space-size=8192 memcached.js | |
var config ={ | |
port: 11211, | |
max_memory: 100 // default 100M bytes | |
} | |
var net = require('net'); | |
var LRU = function (max) { // this LRU implementaion is based on https://github.com/chriso/lru |
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
# NAT interface routing | |
*nat | |
# Setup | |
:PREROUTING ACCEPT [0:0] | |
:INPUT ACCEPT [2:128] | |
:OUTPUT ACCEPT [2:120] | |
:POSTROUTING ACCEPT [2:120] | |
# Redirect port 80 to port 8080 |
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 registry = require('./registry'); | |
console.log('Analyzing ' + registry.total_rows + ' rows'); | |
var haveGithub = 0; | |
registry.rows.forEach(function (row) { | |
var doc = row.doc; | |
if (!doc['dist-tags'] || !doc['dist-tags'].latest) { | |
return console.error(doc.name + ' has no dist-tags'); |
A metric for determining the depth of understanding required to be a subject mater expert within a particular field software engineering.
When a person speaks about a subject with authority, how can we determine the legitimacy of that authority? Perhaps a metric can be applied that will be both fair and flexible. Consider the following tangible accomplishments and the requirements for the depth of understanding behind each one.
100
Did you conceive/invent the subject60
Core contributor to the subject
This is what happens when I try to pick a language.
Note: If I didn't think it was possible to create a development environment without any of these issues (which I consider "major" for the most part), I would not have written this list.
- NOTHNX.
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
.highlight { background-color: #ffffcc } | |
.highlight .c { color: #586E75 } /* Comment */ | |
.highlight .err { color: #93A1A1 } /* Error */ | |
.highlight .g { color: #93A1A1 } /* Generic */ | |
.highlight .k { color: #859900 } /* Keyword */ | |
.highlight .l { color: #93A1A1 } /* Literal */ | |
.highlight .n { color: #93A1A1 } /* Name */ | |
.highlight .o { color: #859900 } /* Operator */ | |
.highlight .x { color: #CB4B16 } /* Other */ | |
.highlight .p { color: #93A1A1 } /* Punctuation */ |