gem install rails --pre
rails new my_app -T
--- | |
gemhome: /home/USERNAME/.gems | |
gempath: | |
- /home/USERNAME/.gems | |
- /usr/lib/ruby/gems/1.8 |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:fb="http://www.facebook.com/2008/fbml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> | |
<title>New Graph api & Javascript Base FBConnect Tutorial | Thinkdiff.net</title> | |
</head> | |
<body> | |
<div id="fb-root"></div> | |
<script type="text/javascript"> |
<html> | |
<head> | |
<style type="text/css"> | |
#container { | |
width:600px; | |
margin-left:auto; | |
margin-right:auto; | |
border:1px solid red; | |
padding:0px 20px 20px 20px; | |
/** | |
* $.parseParams - parse query string paramaters into an object. | |
*/ | |
(function($) { | |
var re = /([^&=]+)=?([^&]*)/g; | |
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space | |
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );}; | |
$.parseParams = function(query) { | |
var params = {}, e; | |
while ( e = re.exec(query) ) { |
The following document is a written account of the Code School screencasting framework. It should be used as a reference of the accompanying screencast on the topic.
You're probably aren't going to take the time to read this screencast if you're not interested, but there are a lot of nice side effects caused by learning how to create quality screencasts.
#!/usr/bin/env ruby | |
# A simply utility to show character counts for each line of input and | |
# highlight lines longer than 80 characters. | |
# | |
# Written as an example for http://jstorimer.com/2011/12/12/writing-ruby-scripts-that-respect-pipelines.html | |
# | |
# Examples: | |
# | |
# $ hilong Gemfile |
I'm a fan of MiniTest::Spec. It strikes a nice balance between the simplicity of TestUnit and the readable syntax of RSpec. When I first switched from RSpec to MiniTest::Spec, one thing I was worried I would miss was the ability to add matchers. (A note in terminology: "matchers" in MiniTest::Spec refer to something completely different than "matchers" in RSpec. I won't get into it, but from now on, let's use the proper term: "expectations").
Let's take a look in the code (I'm specifically referring to the gem, not the standard library that's built into Ruby 1.9):
# minitest/spec.rb
module MiniTest::Expectations
See https://en.bitcoin.it/wiki/BIP_0070 for the latest version of this document; I'll keep this document so the process of discussion/revision isn't lost.
This document proposes protocol buffer-based formats for a simple payment protocol between a customer's bitcoin client software and a merchant.