Skip to content

Instantly share code, notes, and snippets.

View TomK32's full-sized avatar

Thomas R. Koll TomK32

View GitHub Profile
@TomK32
TomK32 / ledger-envelope-generator.rb
Last active December 27, 2022 19:51
create ledger entries for repeating transactions
#!/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'
// 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:
@TomK32
TomK32 / currency_convert.sh
Last active October 13, 2017 18:55 — forked from hasantayyar/currency_convert.sh
cli currency_convert
# 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';
}
@TomK32
TomK32 / keybase.md
Last active September 19, 2017 21:21

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:

Sehr geehrte Damen und Herren,
Bezugnehmend auf einen Artikel[0] des WKO Vize Fritz Amann möchte ich meine Zwangsmitgliedschaft bei der Wirtschaftskammer kündigen.
Es tut mir sehr leid dass ich als kleiner selbstständiger Softwareentwickler den richtigen Unternehmern in der WKO zur Last gefallen bin. Allerdings hat man mir das nicht schon früher mitgeteilt, sonst wäre ich ja auch schon früher aus der WKO ausgetreten. Herr Amann hat durchaus recht mit seinem Vorwurf der Scheinselbstständigkeit, seit vier Jahren bin ich nur noch für den einen sehr zufriedenen Klienten in Amerika tätig, aber bringen Sie denen Mal bei wie man trans-atlantisch Mitarbeiter anstellt. Ich muss aber auch sagen dass mir die Freiheit meiner selbstständigen Tätigkeit sehr gefällt, welcher Angestellte kann, wie ich, sich mit dem Laptop in die Natur setzen und dort arbeiten? Letztes Jahr war ich sogar drei Wochen Campen ohne dass es meinem Klienten aufgefallen wäre. Wenn ich jetzt im Frühling auf meinem Bankerl in der Linzer Altstadt si
@TomK32
TomK32 / extract-from-aperture.rb
Created April 24, 2017 08:00
move images from aperture lib into a clean directory structure
#!/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]
@TomK32
TomK32 / gnucashsqlite2ledger.rb
Created December 16, 2015 11:02
Convert from GnuCash Sqlite format to ledger/hledger format
#!/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(
@TomK32
TomK32 / gpgwot
Last active December 27, 2015 09:09 — forked from dtgay/gpgwot
#!/bin/bash
gpg --list-sigs --keyring ~/.gnupg/pubring.gpg | sig2dot > ~/.gnupg/pubring.dot
neato -Tpng ~/.gnupg/pubring.dot > ~/.gnupg/pubring.png
@TomK32
TomK32 / Park-Miller-Carta.lua
Last active December 17, 2015 23:29
Park-Miller-Carta PNRG
--[[
Copyright (c) 2009 Michael Baczynski, http://www.polygonal.de
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions: