Skip to content

Instantly share code, notes, and snippets.

View kpj's full-sized avatar
🐙
🌊🌊

Kim kpj

🐙
🌊🌊
View GitHub Profile
@kpj
kpj / build.sh
Last active October 8, 2020 10:46
Compiling tmux from scratch
#!/usr/bin/env bash
set -euo pipefail
# (Loosely) based on https://gist.github.com/mbreese/b0630195e57874c87ef3611d059d1bc2
# clean up
rm -rf bin _build _install
@kpj
kpj / build.sh
Last active July 2, 2019 07:28
Compile and install the latest version of python-igraph
set -eu
#https://github.com/igraph/python-igraph/issues/157
#https://github.com/Homebrew/homebrew-core/blob/master/Formula/igraph.rb
#https://github.com/gephi/gephi/wiki/GraphStreaming#Server_Module
wd="tmp"
rm -rf "$wd" && mkdir "$wd"
cd "$wd"
@kpj
kpj / build_graphtool.sh
Last active January 28, 2019 14:08
Building graph-tool on macOS
#!/usr/bin/env bash
# https://git.skewed.de/count0/graph-tool/wikis/installation-instructions#manual-compilation
set -e
# get source
rm -rf graph-tool-source
git clone https://git.skewed.de/count0/graph-tool.git graph-tool-source
cd graph-tool-source
@kpj
kpj / gist:8272359
Last active January 2, 2016 07:49
Non-working test
# requires ffmpeg, mpgtx
import sys, os, os.path, datetime
import numpy
from scipy.io.wavfile import read
# adjust this!
save_for_plot = False
volume_threshold = 250
myClass = "sdfigasdfisdf";
function getStyle() {
return 'letter-spacing: 2px; float: left;-webkit-transform: rotate(' + Math.floor(Math.random()*360) + 'deg);';
}
function setStyle(ele) {
if(typeof ele == "object") {
ele.style['letter-spacing'] = '2px';
ele.style['float'] = 'left';
ele.style['-webkit-transform'] = 'rotate(' + Math.floor(Math.random()*360) + 'deg)';
function colors(i) {
pad.notifyChangeColor(Math.floor(Math.random()*32));
setTimeout(colors, i);
}