Skip to content

Instantly share code, notes, and snippets.

@xaviershay
xaviershay / gccc.md
Last active August 28, 2022 00:17
Request for services - Geelong Cross Country Club Handicapping System

Request for services - Geelong Cross Country Club Handicapping System

Context

The Geelong Cross Country Club (an established non-profit running group) uses a rails application to manage race results and handicaps for members. It was written by me in 2014 and has seen sporadic maintenance and features since. The codebase is relatively standard rails running against postgres on heroku. GCCC have requested some changes that I am unable to get to in a timely manner, so they are looking to engage a (paid) contractor. The app is also due for a round of upgrades.

@xaviershay
xaviershay / check-for-fixes.rb
Created July 24, 2021 23:20
Script to find issues referenced in a repo and check whether they're fixed or not
#!/usr/bin/env ruby
require 'tmpdir'
require 'net/http'
require 'openssl'
require 'uri'
require 'json'
require 'date'
def file_cache(key)
@xaviershay
xaviershay / spec.json
Last active October 9, 2020 04:27
contribution-vs-interest
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "Plots two functions using a generated sequence.",
"width": 600,
"height": 300,
"title": "Figure out what monthly contribution is equivalent to what savings rate",
"data": [{
"name": "month",
"values": [
@xaviershay
xaviershay / spec.json
Created October 9, 2020 00:10
interest-exploration
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "Plots two functions using a generated sequence.",
"width": 600,
"height": 300,
"data": [{
"name": "month",
"values": [
],
rrffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaffaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaafaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
symbols = %w(1L 1 1R 1L1 1R1 b bL bR bL1 bR1 b2 b3 c cL cR cL1 cR1 c2)
tape = %w(1R 1R cL1)
cursor = 0
L = -1
R = +1
state = 1
@xaviershay
xaviershay / splits_io_analyzer.rb
Created April 7, 2018 21:01
Analyzing splits IO data
require 'net/http'
require 'json'
require 'fileutils'
game_id = "3414" # ori_de
def cache(key, &block)
path = "cache/key-#{key.tr("/", "-")}"
FileUtils.mkdir_p(File.dirname(path))
if File.exists?(path)
SunkenGladesRunaway
SunkenGladesNadePool
SunkenGladesNadeTree
SunkenGladesMainPool
SunkenGladesMainPoolDeep
FronkeyWalkRoof
WallJump
DeathGauntlet
WallJumpMapStone
AboveFourthHealth
### Keybase proof
I hereby claim:
* I am xaviershay on github.
* I am xshay (https://keybase.io/xshay) on keybase.
* I have a public key ASDeCNUvU5aeS2wT6D9XGzYM5ScS9DKBJL-nRjE3ETsr2Qo
To claim this, I am signing this object:
@xaviershay
xaviershay / migration_sql.rb
Created August 14, 2015 21:21
Get SQL output from a Rails migration
#!/usr/bin/env ruby
require_relative 'config/environment'
path = ARGV.shift || raise("specify migration as first argument")
require_relative path
filename = File.basename(path, ".rb")
timestamp, name = filename.split("_", 2)