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
#!/usr/bin/env ruby | |
require 'test/unit' | |
class TestSums < Test::Unit::TestCase | |
def setup | |
@a = [2, 5, 18, 27] | |
@sum = 0 | |
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
#!/usr/bin/env ruby | |
require 'sinatra' | |
require 'redis' | |
require 'enumerator' | |
configure do | |
REDIS = Redis.new | |
REDIS.setnx 'next', 10 * 36 ** 3 | |
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
#!/usr/bin/env ruby | |
require 'sinatra' | |
require 'redis' | |
configure do | |
REDIS = Redis.new | |
end | |
get '/' do |
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>Hello</title> | |
</head> | |
<body> | |
<h1>Hi, tell us a little about yourself</h1> | |
<form method="POST" action="/response"> | |
<p> | |
Name: <input type="text" name="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
$ rvm use 1.9.2@railstutorial | |
$ rails new movies | |
$ cd movies | |
$ bundle install --local | |
$ rails generate scaffold Movie title:string rated:string | |
$ rails generate scaffold Category name:string | |
$ rails generate migration create_categories_movies | |
db/migrate/*_create_categories_movies.rb: |
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
#!/usr/bin/env ruby | |
require 'sinatra' | |
require 'redis' | |
configure do | |
REDIS = Redis.new | |
end | |
get '/' do |
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 createTextArchive = (function() { | |
var root; | |
function enumerate(e, callback) { | |
while (e.hasMoreElements()) { | |
callback(e.nextElement()); | |
} | |
} | |
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
XML NAMESPACES | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans | |
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> | |
<!--Bean declarations go here--> |
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/sh | |
$HOME/google_appengine/dev_appserver.py \ | |
--address=0.0.0.0 \ | |
--high_replication \ | |
--use_sqlite \ | |
$* |
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
tab.size=4 | |
indent.size=4 | |
use.tabs=0 | |
tab.indents=1 | |
backspace.unindents=1 |
OlderNewer