Skip to content

Instantly share code, notes, and snippets.

View eduardo's full-sized avatar

Edu Fernández eduardo

View GitHub Profile
require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
<% iterations.each do |iteration| %>
<h2 id='Sprint_<%= iteration.number %>' style='display:inline'>Sprint <%= iteration.number %></h2><i> - ends <%= iteration.finish.strftime("%Y-%m-%d") %></i><a href='#Sprint_<%= iteration.number %>' class='anchor'>&nbsp;&para;</a>
<ul>
<% iteration.stories.each do |story| %>
<li class='story'><h3 style='display:inline'><i>Story <%= story.id %> (<%= story.current_state %>)</i></h3>
<small class='taskCount'><i><%= " - #{story.tasks.size} tasks defined" if story.respond_to?(:tasks) %></i></small>
<p class='storyDescription'><span class="storyIngress"><%= story.name%></span><br><span class="storyRest" style="color:grey"></span></p>
<% end %>
</ul>
<% end %>
This example shows how to setup an environment running Rails 3 beta under 1.9.1 with a 'rails3' gem set.
∴ rvm update --head
# ((Open a new shell)) or do 'rvm reload'
# If you do not already have the ruby interpreter installed, install it:
∴ rvm install 1.9.1
# Switch to 1.9.1 and gemset rails3, create if it doesn't exist.
∴ rvm --create use 1.9.1@rails3
http://www.refinerycms.com/
http://www.intridea.com/2009/9/22/tweetstream-ruby-access-to-the-twitter-streaming-api?blog=development
http://developingwithstyle.com/articles/2009/09/23/railings-a-full-featured-ruby-on-rails-template.html
http://www.braintreepaymentsolutions.com/
http://www.youtube.com/watch?v=fb9Rzyi8b90&hl=es
http://gilesbowkett.blogspot.com/2009/09/theres-no-such-thing-as-good-client.html
http://almosteffortless.com/2009/09/11/static-a-super-simple-rails-cms-for-heroku/
http://blog.moove-it.com/using-facebooker-to-make-a-rails-site-with-facebook-connect-part-1/
http://themacbox.co.uk/tweetmymac/
http://blog.moove-it.com/using-facebooker-to-make-a-rails-site-with-facebook-connect-part-1/
@eduardo
eduardo / gist:192604
Created September 24, 2009 08:10 — forked from ddollar/gist:107308
* keep people working on internal projects, assign and schedule the work
* dont look desperate, dont have immediate availability
* can tell a client you can 'shuffle internal projects' to accomodate them
* online ads dont work well
* referrals instead
* do a great job every single time
* voice calls important
* when people call you call them back
edu@snowdrop /usr/local/Cellar/mysql/5.1.37/bin
$ ./mysql_install_db
Installing MySQL system tables...
090914 0:23:15 [Warning] Forcing shutdown of 1 plugins
OK
Filling help tables...
090914 0:23:15 [Warning] Forcing shutdown of 1 plugins
OK
To start mysqld at boot time you have to copy
require 'yaml'
def yacss(data)
YAML.load(data).map do |item|
item.map do |selector, properties|
"#{selector} {\n" +
properties.map do |property, value|
" #{property}: #{value};\n"
end.join +
"}\n"
class GitosisCofigGenerator
def initialize
@config = {}
end
def add_group(name, options = {})
@config.store(name, {:writable => options[:writable], :readonly => options[:readonly], :members => options[:members]})
end
require 'prawn'
require 'prawn/layout'
Prawn::Document.generate("table-test2.pdf") do
headers = ["Course", "Grade", "Comments"]
data = []
10.times { |i| data << ["Home Room", "A+", "Great work!"]}
def make_table(headers, data)
table(
require 'rubygems'
require 'couchrest'
SERVER = CouchRest.new
DB = SERVER.database!('contact-manager')
class Contact < CouchRest::ExtendedDocument
use_database DB
property :first_name