Skip to content

Instantly share code, notes, and snippets.

njero - http://neverlet.be
sutto - http://blog.ninjahideout.com
zapnap - http://blog.zerosum.org
tpope - http://tpope.net
reinh - http://reinh.com
bryanl - http://smartic.us
linoj - http://www.vaporbase.com
technicalpickles - http://technicalpickles.com
MaD15 - enlightsolutions.com/
qrush - http://litanyagainstfear.com/
@viking
viking / gist:975493
Created May 16, 2011 22:10
Combo breaker!
[17:07] <viking> the cake is a LIE
[17:07] <wlll> the cake is a PIE
[17:07] <viking> the cake is a PIG
[17:08] <wlll> the cake is a PEG
[17:08] <viking> the cake is a PUG
[17:08] <wlll> the cake is a MUG
[17:08] <context> the cake is a MAG
[17:08] <context> the cake is a VAG
[17:08] <context> :x i had to
[17:09] <wlll> COMBO BREAKER!
@viking
viking / i3-shell.sh
Last active March 25, 2024 16:25
Bash script for i3 to run a terminal in the same working directory as the current focused application
#!/bin/bash
# i3 thread: https://faq.i3wm.org/question/150/how-to-launch-a-terminal-from-here/?answer=152#post-id-152
CMD=xterm
CWD=''
# Get window ID
ID=$(xdpyinfo | grep focus | cut -f4 -d " ")
# Get PID of process whose window this is
@viking
viking / wavepot.js
Created June 19, 2014 22:06
wavepot song
var pitches = {
'C4': 262,
'C#4': 278,
'D4': 294,
'D#4': 311,
'E4': 330,
'F4': 349,
'F#4': 370,
'G4': 392,
'G#4': 415,
@viking
viking / mario-kart.js
Last active August 29, 2015 14:02
Mario Kart wavepot song
var pitches = {
'B2': 123,
'C3': 131,
'C#3': 139,
'D3': 147,
'D#3': 156,
'E3': 165,
'F3': 175,
'F#3': 185,
'G3': 196,
@viking
viking / ffx-lightning.sh
Created October 18, 2014 12:56
Script for sound notifications on when to dodge lightning in Final Fantasy X
#!/bin/bash
quick() {
sleep 1
afplay /System/Library/Sounds/Morse.aiff &
sleep 1
afplay /System/Library/Sounds/Morse.aiff &
sleep 1
afplay /System/Library/Sounds/Ping.aiff &
}
@viking
viking / coda-feed.rb
Last active October 1, 2020 15:32
Script to download songs by coda
require 'rss'
require 'uri'
url = 'http://coda.s3m.us/feed/'
URI.open(url) do |rss|
feed = RSS::Parser.parse(rss, false)
feed.items.each do |item|
if item.enclosure
url = URI.parse(item.enclosure.url)
filename = File.basename(url.path)
target="beef"; i=0; msg=`git log -1 --pretty="%B"`; while true; do hash=`git rev-parse HEAD`; if [[ $hash == "$target"* ]]; then break; fi; git commit --amend -q -m "$msg$i"; i=$((i+1)); echo $i; if [ $((i % 10000)) -eq 9999 ]; then echo "Cleaning up..."; git gc; fi; done
@viking
viking / compo.sh
Created September 30, 2016 20:24
Download and extract tracker files from s3m competitions
#!/bin/bash
num=$1
wget --content-disposition https://s3m.it/pack/$num
file=`ls -t | head -n 1`
dir=`echo "$file" | sed 's/\.7z$//'`
mkdir "$dir"
cd "$dir"
7z x "../$file"
cd -

Keybase proof

I hereby claim:

  • I am viking on github.
  • I am kindlyviking (https://keybase.io/kindlyviking) on keybase.
  • I have a public key whose fingerprint is 2F1C B90A 31C6 0CE5 91DF 9C1B CB5A 9B0C F299 379C

To claim this, I am signing this object: