Skip to content

Instantly share code, notes, and snippets.

View TomK32's full-sized avatar

Thomas R. Koll TomK32

View GitHub Profile
@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 / 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 / frozen.rb
Created September 1, 2011 07:51 — forked from dbackeus/frozen.rb
Referenced document frozen on childs after_destroy callback
class Parent
include Mongoid::Document
field :something, :type => String
has_many :children
after_create :create_child
private
def create_child
children.create
end