Skip to content

Instantly share code, notes, and snippets.

@jacobhak
jacobhak / keybase.md
Last active September 14, 2019 11:25

Keybase proof

I hereby claim:

  • I am jacobhak on github.
  • I am jacobhak (https://keybase.io/jacobhak) on keybase.
  • I have a public key ASCSY7bWf3KdsHq8e23Qaoq_AvzD-iU5nKgG4MXNh2Mw2Ao

To claim this, I am signing this object:

@jacobhak
jacobhak / .emacs
Last active January 4, 2016 18:09
My .emacs
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(custom-enabled-themes (quote (wombat)))
'(display-battery-mode t)
'(electric-indent-mode t)
'(electric-pair-mode t)
@jacobhak
jacobhak / evernote-speech2text.scpt
Created April 25, 2013 22:58
Applescript which takes an audio recording from Evernote and runs speech2text on it.
tell application "Evernote"
set notel to find notes "db"
set theNote to notel's first item
set att to get attachments of theNote
set theAtt to att's first item
set filepath to "Macintosh HD:Users:jacob:kod:speech2text-test:test.wav"
write theAtt to filepath
set s2t to do shell script "/bin/bash -lc 'speech2text /Users/jacob/kod/speech2text-test/test.wav'"
set s2t to characters 5 thru -2 of s2t as string
append theNote text s2t
@jacobhak
jacobhak / gist:4996785
Last active December 14, 2015 00:09
ruby script for Pushover, called from rtorrent on download complete, expects torrent name as first argument
require "net/https"
url = URI.parse("https://api.pushover.net/1/messages")
req = Net::HTTP::Post.new(url.path)
req.set_form_data({
:token => "application_api_key", #replace with your api key
:user => "the_user_key", #replace with your user key
:message => "Torrent finished: "+ARGV[0],
})
res = Net::HTTP.new(url.host, url.port)
@jacobhak
jacobhak / gist:4743181
Created February 9, 2013 00:29
A simple python script which categorizes and copies a file from the first command line argument. Excellent to use with xbmc or Plex for some automation. Written by Walter Nordström, walter.nordstrom@gmail.com
#coding=latin-1
import sys
import shutil
import os
import re
# Paths
drive = '/Path/To/Drive/'
movies = 'MovieDirOnDrive/'
tv = 'TVDirOnDrive/'