- mean messenger
- tyrannical overlord
- rumbling rabbit
- fireball (her first real one)
- white priest
- big spider (not real, but "giant spider"!)
- swing sword
- conjure tornado (no, but there is a card called "tornado")
This file contains 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
var dateValue = 504001800000; // Saturday, December 21st, 1985 at 3:30am EST | |
var date1 = new Date(dateValue); | |
var date2 = new Date(dateValue); | |
console.log(date1 == date2); // false (different instances) | |
console.log(date1 === date2); // false (different instances) | |
console.log(date1 > date2); // false (date1 is not later than date2) | |
console.log(date1 < date2); // false (date1 is not earlier than date2) | |
console.log(date1 >= date2); // true (rofl) | |
console.log(date1 <= date2); // true (ahahahaha) |
This file contains 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
# Directory structure | |
. | |
├── README.md | |
└── lib | |
├── a.rb | |
├── b.rb | |
└── c.rb | |
# Blob SHAs: | |
README.md's SHA is 86f7e437faa5a7fce15d1ddcb9eaeaea377667b8 |
This file contains 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
# Prevent double-clicking on things, with fix for button value | |
$(document).on 'click', '[data-disable-with]', -> | |
$element = $(this) | |
this.disabled = true | |
if disableWith = $element.attr('data-disable-with') | |
$element.html(disableWith) | |
# This is a hilarious and gross fix to get the clicked button's name and |
This file contains 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
hash = {:dog => 'woof', :cat => 'meow'} | |
without_dup = hash | |
with_dup = hash.dup | |
# BEFORE CHANGE | |
puts "hash: #{hash.inspect}" | |
puts "without_dup: #{without_dup.inspect}" | |
puts "with_dup: #{with_dup.inspect}" |
This file contains 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
# sinatra | |
get "/:arg" do | |
render my_database.send arg | |
end | |
def refactored_call_on_upcased_string(str, method_name) | |
str.upcase.send(method_name) | |
end | |
def call_on_upcased_string(str, method_name) |
This file contains 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
# Save this file as hey.rb | |
# | |
# $ ruby hey.rb | |
# HEY GURL | |
puts DATA.read.upcase | |
__END__ | |
hey gurl |
This file contains 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
<script type="text/javascript"> | |
if (self == top) { | |
var theBody = document.getElementsByTagName('body')[0]; | |
theBody.style.display = "block"; | |
} | |
else {top.location = self.location;} | |
</script> |
This file contains 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
# Prevent double-clicking on things | |
$(document).on 'click', '.js-disable-on-click', -> | |
$element = $(this) | |
$element.attr('disabled', 'disabled') | |
$element.html($element.data('disabled-text')) | |
# Disabling the button prevents the form from submitting, so we have to force | |
# the submit here. | |
$element.closest('form').submit() |
This file contains 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 Eminem | |
def spaghetti(options={}) | |
@spaghetti ||= {} | |
@spaghetti[options] ||= Spaghetti.new(options) | |
end | |
end | |
e = Eminem.new | |
e.spaghetti # Calculates |
NewerOlder