Skip to content

Instantly share code, notes, and snippets.

View oisin's full-sized avatar
💭
Thing.

Oisín Hurley oisin

💭
Thing.
View GitHub Profile
@oisin
oisin / ttdl.py
Created October 2, 2020 21:08
Get the tide times for Dun Laoghaire
#!/usr/bin/env python
#
# ttdl -- tide times for dun laoghaire
#
import certifi
import urllib3
import re
http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
r = http.request('GET', 'https://www.tidetimes.org.uk/deal-tide-times.js')
@oisin
oisin / awsbill.rb
Created August 12, 2020 13:22
Some ruby for breaking up AWS bills in XLSX form.
#!/usr/bin/env ruby
require 'creek'
fname = ARGV[0]
abort("Please supply file name") if fname.nil?
book = Creek::Book.new fname, with_headers: true
allocations = book.sheets[0]
rowid = 0
allocations.simple_rows.each { |r|
@oisin
oisin / swusage.py
Last active March 25, 2020 22:19
Merge multiple usage CSV files to produce per-app MAU timelines
#!/usr/bin/env python
#
# usage: swusage.py [-h] [-k KPI] [-o FILE] [-v] [-c COMPANY] [-gt NUMBER]
#
# Create per-app CSV timeseries for a single KPI from Dashboard usage reports.
#
# optional arguments:
# -h, --help show this help message and exit
# -k KPI Name of column/kpi in usage report to be put in timeseries, this
# defaults to month_cmu
@oisin
oisin / oscillo-tray.scad
Last active July 13, 2019 13:10
My First 3D Design -- tray for tiny oscilloscope
// $fn = 24; // uncomment for production
// set to true for production -- this prevents hex render which takes
// a couple minutes
use_hex_base = false;
module tab(ringw=6.5, stemh=20, stemw=8, thick=3) {
cube([stemw, thick, stemh]);
translate([stemw / 2, 0, stemh + ringw]){
@oisin
oisin / ttdl.py
Last active November 4, 2018 19:57
Tide Times for Dun Laoghaire
#!/usr/bin/env python
#
# ttdl -- tide times for dun laoghaire
#
import certifi
import urllib3
import re
http = urllib3.PoolManager(cert_reqs='CERT_REQUIRED', ca_certs=certifi.where())
r = http.request('GET', 'https://www.tidetimes.org.uk/deal-tide-times.js')
@oisin
oisin / keybase.md
Created August 11, 2018 15:54
Keybase reidentify

Keybase proof

I hereby claim:

  • I am oisin on github.
  • I am oisin (https://keybase.io/oisin) on keybase.
  • I have a public key ASC0A_zoL86v3jnllvUERjixJcTYfUOCnK9gXpCUnkgVzwo

To claim this, I am signing this object:

#!/usr/bin/env ruby
require 'gems'
require 'bundler/setup'
require 'json'
require 'rubygems'
# Find the current version of a gem you are using, then find the latest
# version of the gem and put in a reminder that theres been updates.
#
# gemnasium used to do this but then they got bought and that service is
Verifying my Blockstack ID is secured with the address 1BqH9KWi9b125Bd9wTnNenv9j4GmfXciow https://explorer.blockstack.org/address/1BqH9KWi9b125Bd9wTnNenv9j4GmfXciow
Verifying my Blockstack ID is secured with the address 1MvGXvWZq5xemHGHBeYuWy7oCephHcZSeo https://explorer.blockstack.org/address/1MvGXvWZq5xemHGHBeYuWy7oCephHcZSeo
@oisin
oisin / onename.txt
Created March 1, 2016 19:26
Something
Verifying that +oisinhurley is my blockchain ID. https://onename.com/oisinhurley