Skip to content

Instantly share code, notes, and snippets.

@mgriffin
mgriffin / commands.sh
Created June 15, 2021 09:38
testing translations
$ cd ~/Desktop
$ ls -la
total 1016
-rw-r--r--@ 1 bugs acme 81252 3 Jun 16:23 image.png
-rw-r--r--@ 1 bugs acme 104497 3 Jun 16:24 image2.png
-rw-r--r--@ 1 bugs acme 298313 10 Jun 22:31 image3.png
@mgriffin
mgriffin / christmas.md
Last active August 29, 2015 14:10
Christmas list
@mgriffin
mgriffin / keybase.md
Last active May 11, 2016 19:02
Keybase proof

Keybase proof

I hereby claim:

  • I am mgriffin on github.
  • I am mikegriffin (https://keybase.io/mikegriffin) on keybase.
  • I have a public key ASDq_KOlHTrrJl2kjdXuEHgyknmSxkkweQNbUCU38eTYugo

To claim this, I am signing this object:

@mgriffin
mgriffin / leapcard_macro
Created December 19, 2013 11:36
A vim macro to take the text copied from the leapcard site and turn it into a format that I can use in ledger
:%s#\v(\d+)/(\d+)/(\d+) #\3/\2/\1 *#
:sort
:%s/\v(Dublin Bus) Travel Credit Deduction €-(\d+\.\d+).+/\1\r Expenses:Travel:Bus €\2\r Assets:Travel:Leapcard\r/
:%s/\v Travel Credit Top-Up (€\d+\.\d+).+/\r Assets:Travel:Leapcard \1\r Assets:Current\r/
:%s/\v(Luas) Travel Credit Deduction €-(\d+\.\d+).+/\1\r Expenses:Travel:Luas €\2/
:%s/\v(Irish Rail) Travel Credit Deduction €-(\d+\.\d+).+/\1\r Expenses:Travel:Train €\2/
:%s/\v.+Travel Credit Returned €(\d+\.\d+).+/\1\r Assets:Travel:Leapcard\r/
:%s/\v(\d+\.\d+)\n(\d+\.\d+)/\1 \2/
:%s/\v(\d+)\.(\d+) (\d+)\.(\d+)/\1\2 \3\4/
:%s/\v(\d+) (\d+)/\=(submatch(1) - submatch(2))/
@mgriffin
mgriffin / gist:5830665
Created June 21, 2013 11:40
A macro to take a GPX file and convert it to geojson. Then upload it to github and hey presto, a map!
:set ft=json
:v/<trkpt lon/d
:%s/ \+<trkpt lon="/[/
:%s/" lat="/, /
:%s/">/],/
ggO{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
@mgriffin
mgriffin / gist:5618534
Created May 21, 2013 09:18
Debug log when running `bundle exec vagrant up` with a Win7 host and Win2k8 server VM
teleporterport=0
teleporteraddress=""
teleporterpassword=""
tracing-enabled="off"
tracing-allow-vm-access="off"
tracing-config=""
autostart-enabled="off"
autostart-delay=0
storagecontrollername0="IDE"
storagecontrollertype0="PIIX4"