Skip to content

Instantly share code, notes, and snippets.

View SietsevanderMolen's full-sized avatar

Sietse van der Molen SietsevanderMolen

  • Oslo area, Norway
View GitHub Profile

Keybase proof

I hereby claim:

  • I am sietsevandermolen on github.
  • I am sietse (https://keybase.io/sietse) on keybase.
  • I have a public key ASDW_nz_cKGeKyOPJfOK5MyOnMrFFlUG17Y7dFpm08EptAo

To claim this, I am signing this object:

@SietsevanderMolen
SietsevanderMolen / qubes_domain_terminal.sh
Last active May 28, 2023 08:54
Opens a terminal in the domain belonging to the current active winow
#!/bin/bash
run_terminal='
for t in $TERMINAL urxvt rxvt terminator Eterm aterm xterm gnome-terminal roxterm xfce4-terminal; do
which $t > /dev/null 2>&1 && exec $t;
done
'
get_id() {
local id=$(xprop -root _NET_ACTIVE_WINDOW)
@SietsevanderMolen
SietsevanderMolen / qubes_autostart_xdg.sh
Created May 22, 2016 10:52
Start all entries in xdg autostart dir
autostart_etc=${XDG_CONFIG_DIRS-/etc/xdg}/autostart
autostart_home=${XDG_CONFIG_HOME-~/.config}/autostart
shopt -s nullglob
for i in $autostart_etc/*.desktop $autostart_home/*.desktop; do
if ! grep -q "OnlyShowIn=" "$i"; then
$(grep "Exec=" "$i" | sed 's/Exec=//') &
fi
done
@SietsevanderMolen
SietsevanderMolen / qubes_i3status.sh
Last active May 15, 2023 17:13
Feeds i3bar with current Qubes system status
#!/bin/bash
# By @minad and @SietsevanderMolen
WIFI_VM="sys-net"
json() {
if [[ -n "$3" ]]; then
echo -n "{\"name\":\"$1\",\"color\":\"$3\",\"full_text\":\"$2\"},"
else
echo -n "{\"name\":\"$1\",\"full_text\":\"$2\"},"

Keybase proof

I hereby claim:

  • I am SietsevanderMolen on github.
  • I am sietse (https://keybase.io/sietse) on keybase.
  • I have a public key whose fingerprint is A903 667B E09B 57F5 6071 1833 8BF7 F172 13A5 01AC

To claim this, I am signing this object:

@SietsevanderMolen
SietsevanderMolen / fuckyou.plugin.zsh
Created February 22, 2014 07:55
Fuck you. Rage quit support for zsh.
function swagdatstring() {
local chars=" -_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"
local flipped=" -_ɐqɔpǝɟɓɥıɾʞlɯuodbɹsʇnʌʍxʎz∀𐐒ƆᗡƎℲ⅁HIſ⋊⅂WNOԀΌᴚS⊥∩ΛMX⅄Z⇂ᄅƐㄣގ9ㄥ860"
local newstring=''
for ((i = ${#1}; i > 0; i--)); do
newstring+=${flipped[${chars[(i)${1[$i]}*]}]}
done
echo $newstring
}
d=''.join(map(chr, range(34, 126)))
q="Q#$%&q()*}w'e[0123456789ZzW]E{@ANIHDYUJGCVPMLSRXO:KF><BT?-\=^\"`anihdyujgcvpmlsrxo;kf.,bt/_|+']"
print(''.join(q[d.find(c)] if d.find(c)!=-1 else c for c in input()))