Skip to content

Instantly share code, notes, and snippets.

View tithonium's full-sized avatar
😩

Martin Tithonium tithonium

😩
View GitHub Profile
@tithonium
tithonium / download-all-kindle-docs.js
Created May 5, 2020 03:52
Download all kindle books
rows = $('div.contentTableListRow_myx')
idx = 0
dorow = function(){
if(idx >= rows.length) {
console.log("Done!!!")
return
}
var row = rows[idx]
idx = idx + 1
if(row.textContent.match(/ Sample /)) {
@tithonium
tithonium / .aliases
Created August 11, 2017 17:30
Aliases
alias ..="cd .."
alias cd..="cd .."
edit() {
$EDITOR $*
}
alias ff="find . -type f | grep -vF .git | grep -vF .DS_Store | grep -vF .keep | grep -vF /node_modules/"
alias faf="find . -type f"
alias fd="find . -type d | grep -vF .git"
@tithonium
tithonium / spinner.rb
Last active May 13, 2022 17:11
Spinner - I had a long-running process that I didn't want to make spammy, but wanted to know it was /going/. So...
SPINNER = ("\u2800".."\u28ff").to_a.shuffle
def spinner
if @spinstep.nil?
@spinstep = 0
else
return if (Time.now - @spintime) < 0.1
STDOUT.print "\b \b"
end
@spintime = Time.now
STDOUT.print SPINNER[(@spinstep += 1) % SPINNER.length]

Keybase proof

I hereby claim:

  • I am tithonium on github.
  • I am tithonium (https://keybase.io/tithonium) on keybase.
  • I have a public key whose fingerprint is 920B B4E4 DBA9 9563 E8CB 1256 0133 3D07 AB4F 2BE2

To claim this, I am signing this object: