Skip to content

Instantly share code, notes, and snippets.

@chtk
chtk / cvimrc
Last active December 22, 2016 09:58
set numerichints
set typelinkhints
set smoothscroll
let blacklists = ["https://roundcube.xs4all.nl/*","http://project.convenient.nl/*","*://inbox.google.com/*","http://jira.convenient.nl/*","http://www.timegamers.com/*","http://127.0.0.1/*","https://www.reddit.com/*"]
@chtk
chtk / gist:5fa3e963c3770f5ef239
Created March 12, 2015 10:42
[bash] squashroot
function squashroot () {
if [[ $1 != "" ]]; then
dir=$(realpath "$1")
if [ -d $dir ]; then
find $dir -depth \( -type f -regex "$dir/.+/.+" -exec mv -v '{}' "$dir" \; \) -or \( -type d -regex "$dir/.+" -exec rmdir -v '{}' \; \)
fi
else
echo 'Usage: squashroot [path]'
fi
}

Keybase proof

I hereby claim:

  • I am chtk on github.
  • I am chtk (https://keybase.io/chtk) on keybase.
  • I have a public key whose fingerprint is D73E D480 C980 A149 A40F 125A B5C9 3213 BC6C 0C75

To claim this, I am signing this object:

;#`::
; Click
;Return
#MaxThreadsPerHotkey 3
#z:: ; Win+Z hotkey (change this hotkey to suit your preferences).
#MaxThreadsPerHotkey 1
if KeepWinZRunning ; This means an underlying thread is already running the loop below.
{
KeepWinZRunning := false ; Signal that thread's loop to stop.
@chtk
chtk / machine.js
Last active March 9, 2020 17:30
Generated by XState Viz: https://xstate.js.org/viz
const formulierStatusMachine = Machine({
id: "afrondenMachine",
initial: "aangeboden",
context: {
error: undefined
},
states: {
aangeboden: {
on: {