View currency_convert.sh
# seen on https://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know/answer/Jostein-Austvik-Jacobsen?__snids__=1567875257&__nsrc__=4
# usage currency_convert 14.99 eur usd
# output 14.9900 EUR = 16.7019 USD
currency_convert() {
wget -qO- "http://finance.google.com/finance/converter?a=$1&from=$2&to=$3" | sed '/res/!d;s/<[^>]*>//g';
}
View keybase.md

Keybase proof

I hereby claim:

  • I am TomK32 on github.
  • I am tomk32 (https://keybase.io/tomk32) on keybase.
  • I have a public key whose fingerprint is CC94 B007 90F2 EA56 9D0C F838 974B BA72 BF22 A024

To claim this, I am signing this object:

View extract-from-aperture.rb
#!/bin/env ruby
require 'pp'
require 'fileutils'
# Intended for users who don't use aperture anymore (I moved back to linux)
# and need to rescue their photo library somehow.
# Takes two argument, source and target directory
@source = ARGV[0]
View simplestesp8266clock.ino
// simplestesp8266clock.ino
//
// Libraries needed:
// Time.h & TimeLib.h: https://github.com/PaulStoffregen/Time
// Timezone.h: https://github.com/JChristensen/Timezone
// SSD1306.h & SSD1306Wire.h: https://github.com/squix78/esp8266-oled-ssd1306
// NTPClient.h: https://github.com/arduino-libraries/NTPClient
// ESP8266WiFi.h & WifiUDP.h: https://github.com/ekstrand/ESP8266wifi
//
// 128x64 OLED pinout:
View ledger-envelope-generator.rb
#!/bin/env ruby
# (C) 2015 Thomas R. Koll, <info@ananasblau.com>
# licensed under WTFPL
#
# This script generates entries for the ledger format.
# Think of it as an envelope generator
require 'highline'
require 'date'
require 'active_support/core_ext/date/calculations'
View gnucashsqlite2ledger.rb
#!/bin/env ruby
# (C) 2015 Thomas R. Koll, <info@ananasblau.com>
# Licensed under WTFPL
# In GnuCash save your file as sqlite3 and pass the filename as argument to this script
# The script only requires active_record to be installed
require 'active_record'
ActiveRecord::Base.establish_connection(
View bandcamp-extractor.rb
#!/bin/env ruby
# (C) 2015 Thomas R. Koll, <info@ananasblau.com>
# licensed under WTFPL http://www.wtfpl.net/
# Usage: Download gist, put it into your bin directory, chmod it to executable and simply pass the zip files as argument
# the export command is optionally, you might want to change it in the script
# export bandcamp_target_dir='/data/music/'; bandcamp-extractor.rb ~/Downloads/bandcamp/*zip
target_dir = ENV['bandcamp_target_dir'] || '/data/music'
ARGV.each do |filename|
View gist:c31808f9d199b475eb53
[Warning] Invalid CSS property declaration at: / (css.css, line 25)
[Warning] Invalid CSS property declaration at: / (css.css, line 68)
[Warning] Invalid CSS property declaration at: / (css.css, line 97)
[Warning] Invalid CSS property declaration at: / (css.css, line 114)
[Warning] Invalid CSS property declaration at: / (css.css, line 125)
[Warning] Invalid CSS property declaration at: / (css.css, line 126)
[Warning] Invalid CSS property declaration at: / (css.css, line 134)
[Warning] Invalid CSS property declaration at: / (css.css, line 143)
[Warning] Invalid CSS property declaration at: / (css.css, line 159)
[Warning] Invalid CSS property declaration at: / (css.css, line 161)
View gist:c310dae6af77e2d8e39a
#!/bin/bash
cmd='mosquitto_pub -h 192.168.7.2 -t led';
times=$1 || 10;
for i in `seq 1 $times`
do
$cmd -m RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
echo 'DANGER!'
sleep 1
$cmd -m X
sleep 1