Skip to content

Instantly share code, notes, and snippets.

View RubyBrewsday's full-sized avatar

Michael Poage RubyBrewsday

View GitHub Profile
@RubyBrewsday
RubyBrewsday / test.css
Created January 29, 2019 17:46
Testing out broken CSS
#nprogress {
pointer-events: none
}
#nprogress .bar {
background: #a68735;
position: fixed;
z-index: 100;
top: 0;
left: 0;
@RubyBrewsday
RubyBrewsday / eye-of-tiger.rb
Created February 7, 2017 16:17
Cause we all got it
class Tiger
def initialize
@eyes = Eye.new(2)
end
def eye
@eyes.count > 1 ? 1 : 0
end
end
@RubyBrewsday
RubyBrewsday / fedora-notifications.js
Last active October 1, 2015 15:42
Cause I'm a boss.
var good = "Lets see if this shit really does work.";
alert(good);
@RubyBrewsday
RubyBrewsday / minesweeper
Last active August 29, 2015 14:03
Minesweeper in ruby
class MinesweeperMap
def initialize(difficulty)
@difficulty = difficulty
case difficulty
when 1
grid_size = 4
when 2
grid_size = 7
when 3
Bonus: subsets
Attempt this after you have the other two problems working.
Write a method that, given an array of unique items, finds all the subsets of items:
subsets(["a", "b", "c"]) == [
[], # note that the empty set counts!
["a"], ["a", "b"], ["a", "b", "c"], ["a", "c"]
["b"], ["b", "c"],