Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Thing.

Oisín Hurley oisin

💭
Thing.
View GitHub Profile
@oisin
oisin / keybase.md
Created Aug 11, 2018
Keybase reidentify
View keybase.md

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:

View scab.rb
#!/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
View gist:883fd4482ed087edb7d1da66fa0a5942
Verifying my Blockstack ID is secured with the address 1BqH9KWi9b125Bd9wTnNenv9j4GmfXciow https://explorer.blockstack.org/address/1BqH9KWi9b125Bd9wTnNenv9j4GmfXciow
View gist:9fe1857358122308376555f7cb8e17dc
Verifying my Blockstack ID is secured with the address 1MvGXvWZq5xemHGHBeYuWy7oCephHcZSeo https://explorer.blockstack.org/address/1MvGXvWZq5xemHGHBeYuWy7oCephHcZSeo
View onename.txt
Verifying that +oisinhurley is my blockchain ID. https://onename.com/oisinhurley
@oisin
oisin / throw.rb
Created Feb 27, 2016
Compute odds of receiving N instances of symbol Y in a throw of M dice with SYMBOLS faces
View throw.rb
# Compute odds of occurrence of N symbol Y in M dice
#
symbols = ARGV[0].split(",") # ["s", "ss", "sss", "h", "b", "f"]
m = ARGV[1].to_i
n = ARGV[2].to_i
y = ARGV[3]
def to_radix(int, radix)
@oisin
oisin / Log Requests
Last active Aug 29, 2015
HTTP Server that will print the JSON arriving from a client.
View Log Requests
Simple server which just formats and prints JSON requests.
@oisin
oisin / Dockerfile
Last active Jan 29, 2019
Dockerfile snippet for Ruby API Server setup experiment
View Dockerfile
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"
View pool.rb
require 'thread'
module Alert
def self.yikes(msg)
# Use this to log/trigger monitor
puts msg
end
end
# See http://burgestrand.se/code/ruby-thread-pool/
View codereview.md

This is a summary of an original prose piece

Author

  • Patches to be kept as small as practicable
  • Patches to be explained clearly

Reviewer

  • What is the intent of the patch?