Skip to content

Instantly share code, notes, and snippets.

We'll get there

Brittan McGinnis konamax123

We'll get there
Block or report user

Report or block konamax123

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
konamax123 / can't share
Created Sep 15, 2013
publickey description
View can't share
OpenSSH_5.9p1, OpenSSL 0.9.8x 10 May 2012
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: Connecting to [] port 22.
debug1: Connection established.
debug1: identity file /Users/brittmcginnis/.ssh/id_rsa type -1
debug1: identity file /Users/brittmcginnis/.ssh/id_rsa-cert type -1
debug1: identity file /Users/brittmcginnis/.ssh/id_dsa type -1
debug1: identity file /Users/brittmcginnis/.ssh/id_dsa-cert type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_5.9p1 Debian-5ubuntu1+github5
View gist:7764627
def grab_ssn(string)
ssn = /\d{3}-\d{2}-\d{4}/.match(string).to_s
if string.include?(ssn)
return ssn
return nil
konamax123 / Die
Created Dec 6, 2013
Implement a basic Die class which can be initialized with some number of sides. We can then roll the die, returning a random number. It should work like this: die = die.sides # returns 6 die.roll # returns a random number between 1 and 6 If we pass a number less than 1, we should raise an ArgumentError. This is done using the …
View Die
class Die
def initialize(sides)
# code goes here
@sides = sides
if sides < 1
raise"Please input a number 1 or larger.")
def sides
konamax123 / gist:7884072
Created Dec 10, 2013
The code from my 1.2 pairing with Zohar and Maria.
View gist:7884072
# Compare Fibonacci!
# At this point you should be good at refactoring your code to make it better,
# but do you feel comfortable determining "good" vs. "bad" code? In this exercise
# you will evaluate four different solutions to the same challenge and evaluate
# their clarity, effectiveness, and overall "good"ness.
# By the end of this challenge, you should be able to:
# 1) Confidently read other people's code and figure out how it works
# 2) Recognize good and not so good practices
# 3) Consider ways to improve solutions
konamax123 / Credit Card class
Created Dec 13, 2013
Not quite sure why this will not raise an error when the number passed in is > or < 16.
View Credit Card class
class CreditCard
def initialize(nums)
@nums = nums
def check_card
raise ArgumentError unless @nums.length == 16
s1 = s2 = 0
@nums.to_s.reverse.chars.each_slice(2) do |odd, even|
s1 += odd.to_i
konamax123 / Die class2
Last active Dec 31, 2015
This should return any random number or letter passed into the array. It does from what I can tell but it doesn't pass the specs.
View Die class2
class Die
def initialize(labels)
if labels.empty?
raise ArgumentError
@labels = labels
def sides
View 0.2.1-boggle_class_from_methods.rb
class BoggleBoard
def initialize
@dice_grid = [["b", "r", "a", "e"],
["i", "o", "d", "t"],
["e", "c", "l", "r"],
["t", "a", "k", "e"]]
def words(*coords)
konamax123 / shopping.rb
Last active Jan 1, 2016
Shopping list app
View shopping.rb
class List
def initialize
@items = []
def add_item(*var)
View gist:8515583
var terah = {
name: "Terah",
age: 32,
height: 66,
weight: 130,
hairColor: "brown",
eyeColor: "brown"
konamax123 / votes.js
Created Feb 3, 2014
This script goes through the votes object and it's nested object and counts the number of times that each candidate is voted for and then tallies them in a separate object. Then we need to somehow return a winner for each category.
View votes.js
In this challenge you will work with the following JavaScript objects.
Do not alter these objects here.
// I need to go through the votes object and look at each string which contains it's own object, then I need to go through
// each nested object and count how many times a canidites name comes up for each category in the votes count object and assign it
// to that object. We need to look at each property inside the nested objects and count how many times that value occurs.
You can’t perform that action at this time.