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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.atlassian.stash.plugin.webook; | |
import com.atlassian.stash.event.pull.PullRequestRescopedEvent; | |
import com.atlassian.stash.hook.repository.AsyncPostReceiveRepositoryHook; | |
import com.atlassian.stash.hook.repository.RepositoryHookContext; | |
import com.atlassian.stash.nav.NavBuilder; | |
import com.atlassian.stash.pull.PullRequestRef; | |
import com.atlassian.stash.repository.RefChange; | |
import com.atlassian.stash.repository.RefChangeType; | |
import com.atlassian.stash.repository.Repository; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rack/request' | |
require 'rack/response' | |
class App | |
attr_accessor :provider | |
# This constructor DI is not possible in Sinatra(?), since the framework | |
# creates the new instance for you. | |
def initialize(provider) | |
@provider = provider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'tmpdir' | |
require 'net/http' | |
require 'openssl' | |
require 'uri' | |
require 'json' | |
require 'date' | |
def file_cache(key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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": [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$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": [ | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -ex | |
mkdir -p /tmp/repro-1489 | |
cd /tmp/repro-1489 | |
bundle env | |
# Bundler 1.3.5 | |
# Ruby 2.0.0 (2013-06-27 patchlevel 247) [x86_64-darwin12.4.0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe '#transform_hash' do | |
it 'transforms a single entry hash' do | |
transform_hash(a: [1, 0]).should == [[1], [0]] | |
end | |
it 'transforms a double entry hash' do | |
transform_hash(a: [1, 0], b: [0, 1]).should == [[1, 0], [0, 1]] | |
end | |
it 'transforms a multiple entry hash' do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'integration_helper' | |
require 'rack' | |
require 'rack/handler/webrick' | |
describe HttpClient do | |
before :all do | |
@server = WEBrick::HTTPServer.new( | |
:Port => 9293, | |
:Logger => Rails.logger, | |
:AccessLog => Rails.logger |
NewerOlder