Skip to content

Instantly share code, notes, and snippets.

View yeliu84's full-sized avatar

Ye Liu yeliu84

View GitHub Profile
@yeliu84
yeliu84 / 0_reuse_code.js
Created June 3, 2014 15:52
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@yeliu84
yeliu84 / cpus.sh
Last active August 29, 2015 14:21 — forked from jj1bdx/cpus.sh
#!/bin/sh
# Originally from:
# https://github.com/blankpage/e5UNIXBuilder/blob/master/build-akili.sh
# Linux and similar...
CPUS=`getconf _NPROCESSORS_ONLN 2>/dev/null`
# FreeBSD and similar...
[ -z "$CPUS" ] && CPUS=`getconf NPROCESSORS_ONLN`
# Solaris and similar...
[ -z "$CPUS" ] && CPUS=`ksh93 -c 'getconf NPROCESSORS_ONLN'`