Skip to content

Instantly share code, notes, and snippets.

View noqcks's full-sized avatar

Benji Visser noqcks

View GitHub Profile
def to_roman(num)
numerals = {1000 => "M",
500 => "D",
100 => "C",
50 => "L",
10 => "X",
5 => "V",
1 => "I"
}
Ben Visser [email protected]
Marlon Kenny [email protected]
Brandon Lee [email protected]
Shannon McDonald [email protected]
Marly Guha [email protected]
Eric Leong [email protected]
Chris Reid [email protected]
Eric Yee [email protected]
Derek Hendricks [email protected]
Kieran Cormack [email protected]
require_relative 'spec_helper'
# A Barracks should only be able to train footmen if it has enough resources
# Introduce a new method that checks to see if there are enough resources to train one
# Of course, it should then also be leveraged by the train_footman method
describe Barracks do
subject(:barracks) { Barracks.new }
require_relative 'spec_helper'
# Since a Footman is a type of Unit, it makes sense to now make Footman inherit from Unit
# Furthermore,
# This test doesn't look for it, but there are other things that you could do at this point. Think about what else you could refactor in the Footman class, now that it is inheriting functionality (code) from the Unit class.
describe Footman do
subject(:footman) { Footman.new }
@noqcks
noqcks / gist:26ed59fd965485a2bebf
Created October 18, 2014 07:06
Bitcoin verify
Verifying that +tanq is my Bitcoin username. You can send me #bitcoin here: https://onename.io/tanq
@noqcks
noqcks / hubot-slack-heroku.md
Created October 2, 2015 15:49 — forked from trey/hubot-slack-heroku.md
Steps to Install Hubot in Slack using Heroku
var fs = require('fs')
var myNumber = undefined
function addOne(callback) {
fs.readFile('number.txt', function doneReading(err, fileContents) {
myNumber = parseInt(fileContents)
myNumber++
callback()
})
}
@noqcks
noqcks / v
Created November 7, 2016 22:54
df
@noqcks
noqcks / delete_cloudwatch_alarms.rb
Created November 28, 2016 18:16
Delete all cloudwatch alarms with insufficient data
require 'aws-sdk'
@client = Aws::CloudWatch::Client.new(region: 'us-east-1')
def cloudwatch_alarms(token=nil)
return @client.describe_alarms({
state_value: "INSUFFICIENT_DATA",
next_token: token
})
end
@noqcks
noqcks / jenkins-plugins.md
Last active May 13, 2025 18:47
How to get a complete plugin list from jenkins (with version)

I need a way to get a list of plugins so that I can use them with docker jenkins in the format <plugin>: <version>

1. get the jenkins cli.

The jenkins CLI will allow us to interact with our jenkins server from the command line. We can get it with a simple curl call.

curl 'localhost:8080/jnlpJars/jenkins-cli.jar' > jenkins-cli.jar