This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"basics": { | |
"name": "Geoff Crittenden", | |
"label": "Software Engineer", | |
"image": "", | |
"email": "[email protected]", | |
"phone": "(312) 485-6300", | |
"url": "https://geoffcrittenden.com", | |
"summary": "Experienced Lead Software Engineer, Decorated Combat Aviator, & Proven Leader", | |
"location": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired by Matt Parker's Frog Problem video | |
# https://www.youtube.com/watch?v=ZLTyX4zL2Fc | |
module Froggie | |
class << self | |
def calculate_average_jumps(n_frogs = 10_000, n_spots = 10) | |
total_jumps = 0.0 | |
n_frogs.times { total_jumps += Frog.new(n_spots).jump! } | |
total_jumps / n_frogs | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gem install faker | |
# more on faker: https://github.com/stympy/faker | |
require 'faker' | |
def fake_word | |
Faker::Lorem.word.capitalize | |
end | |
def dinosaur_suffix | |
%w[saurus opteryx ceratops mimus iraptor opod odon yonyx].sample |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sum = (1..999).select { |x| x % 3 == 0 || x % 5 == 0 }.inject(:+) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
function Animal() { | |
this.name = "Kangaroo"; | |
}; | |
Animal.prototype.identify = function() { | |
return "I am a Human with 2 legs."; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// shorthand for $(document).ready(); | |
$(function(){ | |
//Your code... | |
var regexEmail = /.+@.+\..{2,}/ | |
var regexPassLength = /.{8,}/ | |
var regexPassCap = /[A-Z]+/ | |
var regexPassNum = /\d+/ | |
$('form').on('submit', function(e) { | |
e.preventDefault(); | |
var email = regexEmail.exec(this[0].value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player | |
def initialize | |
@health = 20 | |
@wall = 0 | |
end | |
def play_turn(warrior) | |
if warrior.feel.wall? then warrior.pivot! | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Player | |
def initialize | |
@health = 20 | |
@wall = 0 | |
end | |
def play_turn(warrior) | |
if @health >= warrior.health | |
if warrior.feel.enemy? then warrior.attack! |