Skip to content

Instantly share code, notes, and snippets.

class DrawShape
def line(user_num=9)
"*" * user_num
end
def number_line(input)
input.times do |number|
print number unless number == 0
end
end
@mdorrance
mdorrance / war in terminal
Created June 10, 2013 15:25
Cardcame War to be played in terminal
#This is the card game War. It consists of two players and one deck of 52 playing cards.
#The card deck is shuffled and all cards are dealt to the two players.
#Player 1 goes first and lays down the top card.
#Player 2 then lays down their top card.
#The player with the highest card wins both cards and then the next round continues.
#If both players play a card of the same value then they go to War.
#The players each lay down the next two cards face down and then expose the last card.
#The player with the highest card value wins all of the cards unless it is a tie.
#War continues until a player wins.
# The game is won when one player collects all of the other players cards.
@mdorrance
mdorrance / wireframing.md
Last active August 29, 2015 14:25
Wireframing Class

##Breaking down problems with wireframes

####Gain an understanding of the REAL user stories

  • What did your read?
  • What did your client say?
  • What does your client want?
  • What will a wirefram solve?

####Introduce wireframing tools and techniques

  • Paper
@mdorrance
mdorrance / Bootstrap Basics.md
Last active August 29, 2015 14:26
Intro to Bootstrap

#Bootstrap Basics

Gain an understanding of what Bootstrap is Introduce "Mobile First" design, the grid and components of Bootstrap Workshop: Importing Bootstrap into a Rails Project Workshop: Transferring a wireframe to html and css using Bootstrap

Frameworks

@mdorrance
mdorrance / gist:bf8e1a0e7736669e8206
Last active September 2, 2015 19:41 — forked from ryansobol/gist:5252653
15 Questions to Ask During a Ruby Interview

Originally published in June 2008

When hiring Ruby on Rails programmers, knowing the right questions to ask during an interview was a real challenge for me at first. In 30 minutes or less, it's difficult to get a solid read on a candidate's skill set without looking at code they've previously written. And in the corporate/enterprise world, I often don't have access to their previous work.

To ensure we hired competent ruby developers at my last job, I created a list of 15 ruby questions -- a ruby measuring stick if you will -- to select the cream of the crop that walked through our doors.

What to expect

Candidates will typically give you a range of responses based on their experience and personality. So it's up to you to decide the correctness of their answer.

@mdorrance
mdorrance / gist:6e3c9ba403c00b97e4fd
Last active September 3, 2015 22:19
Exploring HTML5 Mobile Apps with Ionic
@mdorrance
mdorrance / echo1.js
Last active October 13, 2015 15:33
Echo Challenge
function logElements(element) {
console.log(element)
}
function echo(x) {
x.forEach(logElements)
}
// dynamic answer for any input
function echo(array) {