- install vagrant docker-machine with windows
# Mac:
brew cask install vagrant
# Linux (Debian):
apt-get install vagrant
function watch_change() { | |
local stat | |
local oldstat | |
local lasttime | |
lasttime=$SECONDS | |
while true; do | |
stat="$(eval "$@")" | |
if [[ "$stat" != "$oldstat" ]]; then | |
oldstat="$stat" | |
diff=$((SECONDS-lasttime)) |
example generated commandline:
pandoc -t beamer -f markdown -o "presentation.pdf" "document.md"
pandoc -s --katex -t html5 -f markdown --css ../pandoc.css \
--pdf-engine-opt='--print-media-type' \
/** | |
* I used to have this code configured in Eclipse (and later IntelliJ) as a custom display function for ByteBuffers. | |
* It's fairly useful for debugging binary protocol decoders that make heavy use of ByteBuffers. | |
*/ | |
ByteBuffer d = this; | |
StringBuffer sb = new StringBuffer(); | |
for (int i = 0; i < d.limit; i++) { | |
sb.append(String.format(" %02x", d.array()[i])); | |
} | |
sb.append("\n"); |
inspired by https://gitlab.com/freifunkks/mirror-scripts
This can be used, for example, to clone a repository living on github over to GitLab in order to run CI
.gitlab-ci.yml
replace MY_REPO
with your repo namex () { | |
while [ -f "$1" ]; do | |
case "$1" in | |
*.tar.bz2) ;& | |
*.tar.xz) ;& | |
*.tar.gz) ;& | |
*.tar) ;& | |
*.tbz2) ;& | |
*.tgz) ;& | |
*.txz) |
Note: | |
I wrote this in 2018 as part of a Hackathon for https://github.com/anuejn/muzikilo.js. | |
Upon reviewing just now, there seems to be a bug in the Decay-logic which makes every note work only once. | |
It's up to the reader to find and fix this bug ;) | |
If you do, please e-mail me the fix! |
import threading | |
import time | |
import mido | |
callbacks = [] | |
particles = [] | |
particles_lock = threading.Lock() | |
def clamp(v, min, max): |
// https://github.com/anuejn/muzikilo.js | |
const {sin, PI, round, pow, abs, floor, exp} = Math | |
this.t += 1/44100 | |
const sine = (name, f) => { | |
let phi = this[name] += 1/44100 * 2 * PI * f * saw(name+10000,f*0.5) | |
this[name] %= 2*PI | |
return sin(phi) | |
} |
pkgbase = ncurses | |
pkgdesc = System V Release 4.0 curses emulation library | |
pkgver = 6.0 | |
pkgrel = 0 | |
url = http://invisible-island.net/ncurses/ncurses.html | |
arch = i686 | |
arch = x86_64 | |
license = MIT | |
depends = glibc | |
depends = gcc-libs |