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 'rubygems' | |
require 'bundler/setup' | |
require 'rom' | |
require 'rom-sql' | |
ROM.setup(:sql, 'postgres://localhost/datsu_development') | |
class Players < ROM::Relation[:sql] | |
register_as :players | |
dataset :players |
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
yum install httpd.i386 httpd-devel.i386 libxml2-devel.i386 libxslt-devel.i386\ | |
openssl-devel.i386 pcre-devel.i386 bzip2-devel.i386 curl-devel.i386\ | |
libjpeg-devel.i386 libpng-devel.i386 freetype-devel.i386 gmp-devel.i386\ | |
libc-client-devel.i386 libmcrypt-devel.i386 mysql-devel.i386 unixODBC-devel.i386\ | |
postgresql-devel.i386 sqlite-devel.i386 aspell-devel.i386 net-snmp-devel.i386 ncurses-devel.i386 | |
#!/bin/sh | |
'./configure' \ | |
'--disable-cgi' \ |
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
Add a /etc/yum.repos.d/CentOS-Testing.repo file providing the followings: | |
# CentOS-Testing: | |
# !!!! CAUTION !!!! | |
# This repository is a proving grounds for packages on their way to CentOSPlus and CentOS Extras. | |
# They may or may not replace core CentOS packages, and are not guaranteed to function properly. | |
# These packages build and install, but are waiting for feedback from testers as to | |
# functionality and stability. Packages in this repository will come and go during the | |
# development period, so it should not be left enabled or used on production systems without due | |
# consideration. |
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
# RVM bootstrap | |
$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
require 'rvm/capistrano' | |
set :rvm_ruby_string, '1.9.2@shuffler' | |
set :rvm_type, :user | |
# bundler bootstrap | |
require 'bundler/capistrano' | |
unless Capistrano::CLI.ui.agree("Are you sure you want to redeploy? (yes/no): ") |
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
# test.coffee | |
Test = | |
print: -> | |
console.log("Test.print called") | |
if module.exports? | |
module.exports = Test | |
else | |
@Test = Test |
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 User < ActiveRecord::Base | |
include Clearance::User | |
before_create :generate_api_key | |
attr_accessible :time_zone, :email, :password | |
validates_uniqueness_of :api_key | |
private | |
def generate_api_key | |
self.api_key = Digest::SHA1.hexdigest(Time.now.to_s + rand(12341234).to_s)[1..24] |
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> | |
<title>CoffeeScript</title> | |
<script type="text/javascript" src="http://coffeescript.org/extras/coffee-script.js"></script> | |
</head> | |
<body> | |
<h1>Hello CoffeeScript!</h1> |
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
canvas = document.getElementById 'canvas' | |
canvas.width = 1024 | |
canvas.height = 700 | |
context = canvas.getContext '2d' | |
points = [] | |
isMoving = false | |
$('canvas').on 'touchstart', (event) -> onTouchStart event | |
$('canvas').on 'touchmove', (event) -> onTouchMove event |
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
Slotcars::Application.routes.draw do | |
root :to => 'tracks#index' | |
get '/tracks/:id' => 'tracks#index' | |
get '/tracks/new' => 'tracks#index' | |
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
#= require helpers/namespace | |
#= require embient/ember-routemanager | |
namespace 'slotcars' | |
slotcars.RouteManager = Ember.RouteManager.extend | |
wantsHistory: true # use html5 push state | |
delegate: null |