Skip to content

Instantly share code, notes, and snippets.

View noqcks's full-sized avatar
🏠
Working from home

Benji Visser noqcks

🏠
Working from home
View GitHub Profile
def to_roman(num)
numerals = {1000 => "M",
500 => "D",
100 => "C",
50 => "L",
10 => "X",
5 => "V",
1 => "I"
}
Ben Visser theodore.r.visser@gmail.com
Marlon Kenny marlonkenny@gmail.com
Brandon Lee blee298@gmail.com
Shannon McDonald shannon.mcdonald46@gmail.com
Marly Guha marlyguha@gmail.com
Eric Leong eleong95@gmail.com
Chris Reid chronic88@gmail.com
Eric Yee erizye@gmail.com
Derek Hendricks derek.m.hendricks@gmail.com
Kieran Cormack kcormack91@gmail.com
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 January 2, 2024 15:46
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