Skip to content

Instantly share code, notes, and snippets.

Luke Arduini luk-

Block or report user

Report or block luk-

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View npm languages.md
  • German
  • French
  • Spanish
  • Japanese
  • Chinese (which?)
  • Korean
  • Russian
  • Italian
  • Arabic
View out.sh
writing "1234567890abcdef" 100 times
native : 4ms (25000 ops/s)
multilevel direct : 17ms (5882 ops/s)
stream.js:94
throw er; // Unhandled stream error in pipe.
^
stream.js:94
View master.js
var cluster = require('cluster')
var multilevel = require('multilevel')
var levelup = require('levelup')
var db = levelup('./data')
cluster.setupMaster({
exec: 'worker.js'
})
cluster.fork()
View gist:5365959
var record = {
id: idgen(20) ,
data: {
ip: parts[0],
agent: parts[1],
url: parts[2],
referrer: parts[3],
mobile: mobile
}
};
View responsive.css
.clearfix {
*zoom: 1;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
line-height: 0;
}
.clearfix:after {
View fragmented.md

unix is not fragmented

darwin: lsof -i | grep LISTEN

solaris: lsof -p

linux: netstat -lnp

openbsd: netstat -nat | grep LISTEN

View readFileSync-bench.js
var fs = require('fs')
var _ = require('lodash')
var Benchmark = require('benchmark').Benchmark
var suite = new Benchmark.Suite
var filter = Benchmark.filter
suite.add('readFileSync#toString', function () {
var file = fs.readFileSync('./changelog').toString()
View socks.sh
$ ssh -D 0.0.0.0:5555 user@server.whatever
@luk-
luk- / ios-safari-hide.js
Created Mar 5, 2013
hide ios safari address bar
View ios-safari-hide.js
window.addEventListener("load",function() {
setTimeout(function(){
window.scrollTo(0, 1);
}, 0);
});
@luk-
luk- / repourl.sh
Created Mar 5, 2013
view repo url and copy to clipboard
View repourl.sh
function repourl () { npm view $1 repository.url | tee >(pbcopy) ; }
You can’t perform that action at this time.