Skip to content

Instantly share code, notes, and snippets.

@mikecroucher
mikecroucher / 0_reuse_code.js
Created July 12, 2017 12:35
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
execve("/usr/bin/make", ["make"], [/* 17 vars */]) = 0
brk(NULL) = 0xa2e000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fdfbd430000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=23785, ...}) = 0
mmap(NULL, 23785, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7fdfbd437000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
@mikecroucher
mikecroucher / gist:5a37c402d74774de15f015c3efd77139
Last active March 7, 2017 12:16
failed build of SageMath on WSL
After the First failure (below), I run `make` again and get
```
make
make build/make/Makefile
make[1]: Entering directory `/home/walkingrandomly/github/sagemath/sage-7.5.1'
make[1]: `build/make/Makefile' is up to date.
make[1]: Leaving directory `/home/walkingrandomly/github/sagemath/sage-7.5.1'
build/bin/sage-logger \
"cd build/make && ./install 'all'" logs/install.log
@mikecroucher
mikecroucher / toree_on_ubuntu_16.04.md
Last active December 30, 2018 13:59
Installing Toree+Spark 2.1 on Ubuntu 16.04

Installing Toree+Spark 2.1 on Ubuntu 16.04

## 23rd January 2017

At the time of writing, the pip install of toree is not compatible with spark 2.x. We need to use the master branch from git.

Requirements

sudo apt install openjdk-8-jdk-headless

Average CPU job: 4900 seconds

$ awk -F: '{print $35, $37}' 1percent | awk '{a+=$2};END{print a/NR}'
4852.23

Average number of cores, per CPU second

awk -F: '{print $35, $37}' 1percent | awk '{p+=$1*$2;a+=$2}; END {print p/a}'