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
GameRouter = new Backbone.Router.extend | |
routes: | |
"start": "start" | |
"draw": "draw" | |
start: -> | |
this.navigate('/draw') | |
draw: -> | |
$('#sketchpad .front > div').hide() | |
$('#draw').show() |
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
gem 'sinatra' | |
gem 'omniauth', '~> 1.0.0.alpha', :git => 'git://github.com/intridea/omniauth.git' | |
gem 'omniauth-oauth', '~> 1.0.0.alpha', :git => 'git://github.com/intridea/omniauth-oauth.git' | |
gem 'omniauth-contrib', '~> 1.0.0.alpha', :git => 'git://github.com/intridea/omniauth-contrib.git' |
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
Gemfile.lock |
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 API < Grape::API | |
version '1' | |
end | |
Rack::Builder.new do | |
use Rack::Cors do |config| | |
config.allow do |allow| | |
allow.origins '*' | |
allow.resource '*', :headers => :any | |
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
MyClass | |
This class is a simple class that does things. Notice that I'm | |
just using it as an example for potential documentation style. | |
.class_method | |
Does something at the class level. | |
@param options [Hash] A hash of options | |
.new | |
Creates a new instance of MyClass |
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
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-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
module Bouncy | |
def self.mappings | |
@@mappings ||= [] | |
end | |
def self.bounce! | |
mappings.each(&:bounce!) | |
end | |
def self.runner(const_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
<!doctype html> | |
<html> | |
<head> | |
<title>Divshot Welcome - Welcome to Divshot (Divshot Prototype)</title> | |
<meta http-equiv="content-type" content="text/html;charset=UTF-8" /> | |
<script type='text/javascript' src='http://divshot.dev/assets/preview.js'></script> | |
<link rel='stylesheet' href='http://divshot.dev/assets/preview.css' /> | |
</head> | |
<body> | |
<div class='container-fluid'> |
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
require 'multi_json' | |
require 'base64' | |
require 'openssl' | |
require 'faraday' | |
now = Time.now.utc.to_i | |
def encode(hash) | |
Base64.urlsafe_encode64(MultiJson.dump(hash)) | |
end |