Skip to content

Instantly share code, notes, and snippets.

@kedashoe
kedashoe / gist:ef9487f73d55d7a82bde
Created November 21, 2014 00:01
nodejs flame graphs
> sudo sysctl kernel/kptr_restrict=0
> node --perf-basic-prof hello.js >hello.log &
[1] 16961
> perf record -F 997 -p 16961 -g
^C[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.034 MB perf.data (~1501 samples) ]
> perf script^C
> perf script > perf.out
> stackvis perf < perf.out > perf.html
@kedashoe
kedashoe / gist:e0184a5b91e63084299b
Last active August 29, 2015 14:15
curry with placeholders curry2 and curry3
function curry2(fn) {
return function(a, b) {
switch (arguments.length) {
case 1:
return function(B) {
return fn(a, B);
};
default:
if (a === __) {
return function(A) {
@kedashoe
kedashoe / README.md
Created July 30, 2015 20:34
linux turn on/off mouse pad