Skip to content

Instantly share code, notes, and snippets.

View RainMonster's full-sized avatar

R Jezek RainMonster

  • Asheville, NC, USA
View GitHub Profile
$(document).ready(function () {
$('form').submit( function(e) {
e.preventDefault();
var value = Math.floor(Math.random() * 6 + 1);
console.log('the client side value was: ' + value);
var request = $.ajax({
url: this.action,
/* Here is your chance to take over Socrates!
Spend 10 minutes on each of the following hacks to the socrates website.
Enter them in the console to make sure it works and then save
your results here.
Choose a new pair for each. Add your names to the section you complete.
*/
class Vehicle
attr_accessor :status, :magical_creature
attr_reader :color, :wheels
def initialize(args)
@color = args[:color]
@status = 'stopped'
@wheels = args[:wheels]
@magical_creature = false
end
@RainMonster
RainMonster / Continent Exercise
Created May 22, 2013 01:21
Modified continent exercise from Chris Pine's "How to Program"
M = 'land'
o = 'water'
world = [[o,o,o,o,M,o,o,o,o,o,o],
[o,o,o,o,M,M,o,o,o,o,o],
[o,o,o,M,o,o,o,o,M,M,o],
[o,o,o,M,o,o,o,o,o,M,o],
[o,o,o,M,o,M,M,o,o,o,M],
[o,o,o,o,M,M,M,M,o,o,M],
[M,M,M,M,M,M,M,M,M,M,M],