Skip to content

Instantly share code, notes, and snippets.

View oisin's full-sized avatar
💭
Thing.

Oisín Hurley oisin

💭
Thing.
View GitHub Profile
300g dates
50g tamarind
2tsp salt
1tsp chilli powder
2tsp coriander and cumin powder
pince of asafoetida
Remove stones from dates and chop finely, then soak in 300ml water hot water for 30 mins.
Soak tamarind in 200ml hot water for 30 mins.
Remove pulp from tamarind water.
@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 / Dockerfile
Last active January 29, 2019 20:13
Dockerfile snippet for Ruby API Server setup experiment
FROM ubuntu:14.04
MAINTAINER Oisin Hurley <oisin@nis.io>
RUN apt-get update && apt-get install -y curl wget git
RUN adduser --home /home/api_server --disabled-password --gecos '' api_server
RUN adduser api_server sudo
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
USER api_server
RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys D39DC0E3
RUN curl -sSL https://get.rvm.io | bash -s stable
RUN /bin/bash -l -c "source /home/api_server/.rvm/scripts/rvm"
@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