Skip to content

Instantly share code, notes, and snippets.

Thanks for the fish!

Fedor Indutny indutny

Thanks for the fish!
View GitHub Profile
joyeecheung /
Last active Jan 25, 2018
Get the results of Node.js benchmark CI
#/usr/bin/env bash
# Saves CI results to bench-$JOBID.txt
# output of compare.R to bench-$JOBID-results.txt
wget$JOBID/consoleText -O bench-$JOBID.txt
grep 'improvement' -A 10000 bench-$JOBID.txt > bench-$JOBID-results.txt
head -n 1 bench-$JOBID-results.txt > bench-$JOBID-significant.txt
grep '*' bench-$JOBID-results.txt >> bench-$JOBID-significant.txt
katemonkeys / gist:674cdc9c2f3814651a3a
Last active Apr 12, 2019
Magnetism is the best science
View gist:674cdc9c2f3814651a3a

#Magnetism is the best science #####by @katemonkeys for @indutny

Magnetism is by far (a) the coolest and (b) the most educational quantum mechanical phenomenon. It’s fabulous because it is both deep science and actual real-world applications you use every single day (computer hard drive, anyone?). Finally, it can be understood on a crazy range of length and timescales: ridiculous magnets in the National High Magnetic Field Lab that are so strong they implode on themselves, blocks that move themselves, single atoms with localized moments that have to be understood by extrapolating their single particle wave functions, whatever. I contend that learning about magnetism will give you an awesome window on the rest of QM.

Enjoy :)

##My absolute favorite books on the subject:

View gist:4294d5c212a6d2254703

From Fabrice Bellard, with minor name change (umulh):

// return the high 32 bit part of the 64 bit addition of (hi0, lo0) and (hi1, lo1)
Math.iaddh(lo0, hi0, lo1, hi1)

// return the high 32 bit part of the 64 bit subtraction of (hi0, lo0) and (hi1, lo1)
Math.isubh(lo0, hi0, lo1, hi1)

// return the high 32 bit part of the signed 64 bit product of the 32 bit numbers a and b
View stdio-2.js
In a child process, each of the stdio streams may be set to
one of the following:
1. A new file descriptor in the child, dup2'ed to the parent and
exposed to JS as a Stream object.
2. A copy of a file descriptor from the parent, with no other
added magical stuff.
3. A black hole - no pipe created.
indexzero /
Created Nov 9, 2011
The least amount of guidelines possible to maintain 150+ open source node.js modules

Guidelines for Open Source at Nodejitsu Outline

  • Header
    • Brief description (should match package.json)
  • Example (if applicable)
  • Motivation (if applicable)
  • API Documentation: This will likely vary considerably from library to library.
  • Installation
View gist:1239328
[gokmen ~ gMac] [alageek]> jitsu deploy
info: Welcome to Nodejitsu
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Authenticated as gokmen
info: Analyzing your application dependencies in app.js
warn: Local version appears to be old.
warn: Your package.json version will be incremented for you automatically.
warn: About to write /Users/gokmen/Repositories/github/alageek/alageek/package.json
View .gitconfig
name = ...
email = ...
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]