Skip to content

Instantly share code, notes, and snippets.

View obfusk's full-sized avatar
🏳️‍🌈
hacking ⇒ ¬sleeping 😸

FC (Fay) Stegerman obfusk

🏳️‍🌈
hacking ⇒ ¬sleeping 😸
View GitHub Profile
@obfusk
obfusk / t-br
Last active December 22, 2015 19:59
start gnome-terminal (80x40) in top left or bottom right
#!/bin/bash
gnome-terminal --geometry 80x40-0-0 "$@"
@obfusk
obfusk / link.bash
Last active December 22, 2015 22:58
link mp3 folders together
@obfusk
obfusk / FREEDOM.md
Last active December 23, 2015 11:39
fsfe Freiheit! flyer translated to Dutch and English

Freedom!

What Free Software and tools have in common

A comparison

Free Software gives us essential freedom that other software denies

@obfusk
obfusk / slides.md
Last active December 24, 2015 18:49
backups presentation
@obfusk
obfusk / ackrc
Last active December 25, 2015 09:49
ackrc
--type-set=clojure=.clj,.cljs
--type-set=coffeescript=.coffee
--type-set=markdown=.md,.markdown
--type-set=racket=.rkt
@obfusk
obfusk / cug
Created October 13, 2013 20:36
cug
#!/bin/bash
chromium-browser --user-data-dir="$HOME"/.chromium_ug \
--user-agent=foo --incognito --kiosk "npo.nl/embed/$1"
@obfusk
obfusk / fizzbuzz1.rb
Last active December 25, 2015 11:29
fizzbuzz
(1..100).each { |x| s=''; s+='Fizz' if x%3==0; s+= 'Buzz' if x%5==0; puts s.empty? ? x : s }
@obfusk
obfusk / reduce_mbind.coffee
Created October 20, 2013 19:06
obfusk.coffee - reduce + mbind
O = require 'obfusk'; U = require 'underscore'
f = (x) -> O.Just x + 1
g = (x) -> O.Just x * 42
h = (x) -> O.Nothing()
x = U.reduce([f,g], O.mbind, O.Just(2))
y = U.reduce([f,h,g], O.mbind, O.Just(2))
console.log O.match(x, Nothing: (-> 'too bad'), Just: ((x) -> "#{x.value}!!!"))
@obfusk
obfusk / sig.bash
Created October 20, 2013 19:10
sigusr1 + wait
ME=$$; echo "I'm $ME"
( echo $BASHPID; sleep 5; echo 1; kill -SIGUSR1 $ME ) &
( echo $BASHPID; sleep 10; echo 2; kill -SIGUSR1 $ME ) &
( echo $BASHPID; sleep 15; echo 3; kill -SIGUSR1 $ME ) &
foo () { echo "USR1 received"; }
bar () { echo "USR2 received"; }
trap foo SIGUSR1
@obfusk
obfusk / grep.sh
Created October 20, 2013 19:11
DO NOT USE "foo $@ bar" !!! only use "$@" !!!
grep -R '[^"]\$@\|\$@[^"]' --exclude-dir=.git . 2>/dev/null | grep -v Binary