Skip to content

Instantly share code, notes, and snippets.

@thomassross
thomassross / COMPILING.md
Last active May 13, 2016 01:08 — forked from Eiyeron/LLT.c
Long Line Theory with the PulseAudio API. Not very nice/friendly code here.

Compile with:

g++ LongLineTheory.cpp -lpulse-simple -o LongLineTheory

Run with:

./LongLineTheory

Strip with:

@thomassross
thomassross / imgur-uploader
Last active September 21, 2016 23:42 — forked from codecat/imgur-uploader
xfce4-screenshooter to imgur
#!/bin/bash
# Keyboard settings shortcut:
# xfce4-screenshooter -r -o "bash /path/to/script.sh"
CLIENT_ID=
URL=https://api.imgur.com/3/image
RESPONSE=$(curl -s -H "Authorization: Client-ID $CLIENT_ID" -F "image=@$1" $URL)
echo "$RESPONSE" | perl -ne "print /\"link\"\:\"(.*.(?:png|jpg|jpeg))\"/;" | sed "s/\\\//g" | xclip -selection c