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 player1 = {name: "yoda", power: "jedi", age: 900}; | |
var player2 = {name: "luke"} | |
var players = [player1, player2]; | |
var jump = function(player) { | |
console.log(player.name + " jumps!"); | |
} |
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
// introduction | |
// a game with two rooms | |
// walk to next room | |
// grab an item | |
// (something good or bad happens) | |
var room1 = { | |
description: "A dark room full of holographic clowns" | |
} |
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
<html> | |
<head> | |
<script src='http://cdn.html5quintus.com/v0.2.0/quintus-all.js'></script> | |
<style> | |
canvas { background-color: black; } | |
</style> | |
</head> | |
<body> | |
<script> | |
// This game uses images from: |
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
return Backbone.Marionette.ItemView.extend({ | |
// Pass model to view because template 'this' is not current view. | |
// based on: https://github.com/marionettejs/backbone.marionette/blob/master/docs/marionette.view.md#basic-example | |
// | |
templateHelpers: function() { | |
return { model: this.model }; | |
} | |
}); |
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 Mizu | |
# getter setters for instance variables | |
attr_accessor :name, :is_coding | |
attr_accessor :bite_count | |
attr_accessor :zombie_stats | |
attr_reader :werewolfness | |
@@people_bitten_by_vampires = [] | |
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 HistoryResultRow | |
def initialize | |
700.times do |number| | |
self.class.send :define_method, "Col#{number}" do | |
instance_variable_get "@col#{number}" | |
end | |
self.class.send :define_method, "Col#{number}=" do |value| | |
instance_variable_set "@col#{number}", value | |
end |
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
#!/bin/bash | |
# modified by https://github.com/zeroeth for clarity, commit count, committer list | |
# original from https://gist.github.com/Gabro/5883819 | |
# based on http://stackoverflow.com/questions/17359370/git-show-last-commit-date-and-message-for-each-file-in-directory-like-github | |
# | |
# Prints out git statistics for each folder similar to githubs file listing, example: | |
# | |
# build_osx.sh -- 11 days ago b865716 Notes for intalling devil (Kevin Alford) | |
# main.cpp -- 10 months ago dc06f98 No fullscreen (Kevin Alford) | |
# main.h -- 10 months ago c16c2f3 sdl open include helper and change number of blobs (Kevin Alford) |
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
A | |
B | |
A | |
B | |
A | |
B | |
A | |
B | |
A | |
B |
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
{ | |
"name": "flare", | |
"children": [ | |
{ | |
"name": "analytics", | |
"children": [ | |
{ | |
"name": "cluster", | |
"children": [ | |
{"name": "AgglomerativeCluster", "size": 3938}, |
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 Oven | |
def bake item | |
item.to_cookie | |
end | |
end | |
class PorkMooncake | |
def to_cookie | |
PorkCookie.new | |
end |
OlderNewer