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
# views/resources/new.html.haml | |
= form_for @resource do |form| | |
= form.fields_for :fields do |field_form| | |
render :partial => "field_template", :locals => { :form => field_form } | |
= link_to "Add new resource field", empty_field_resources_path, :remote => true | |
# controllers/resources_controller.rb | |
class ResourcesController < ApplicationController | |
def empty_field | |
respond_with do |format| |
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
wetimetrack steffoz$ bundle exec cucumber --backtrace | |
Using the default profile... | |
DEPRECATION WARNING: railtie_name is deprecated and has no effect. (called from require at /Library/Ruby/Gems/1.8/gems/bundler-1.0.0/lib/bundler/runtime.rb:64) | |
F------F | |
Failing Scenarios: | |
cucumber features/sign_up.feature:6 # Scenario: User signs up with valid data | |
1 scenario (1 failed) | |
6 steps (6 skipped) |
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
snippet bgaf | |
:background-attachment fixed$0 | |
snippet bga | |
:background-attachment fixed$0 | |
snippet bgas | |
:background-attachment scroll$0 | |
snippet bga | |
:background-attachment scroll$0 | |
snippet bgc | |
:background-color #${1:ddd}$0 |
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 'formula' | |
class Sphinx < Formula | |
url 'http://sphinxsearch.com/downloads/sphinx-0.9.9.tar.gz' | |
homepage 'http://www.sphinxsearch.com' | |
md5 '7b9b618cb9b378f949bb1b91ddcc4f54' | |
head 'http://sphinxsearch.googlecode.com/svn/trunk/' | |
fails_with_llvm "fails with: ld: rel32 out of range in _GetPrivateProfileString from /usr/lib/libodbc.a(SQLGetPrivateProfileString.o)" |
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
%w(sinatra grit).each { |gem| require gem } | |
mime_type :binary, 'binary/octet-stream' | |
set :repo, Grit::Repo.new('/Users/steffoz/dev/richcomments') | |
before %r{^/(\w+)} do | |
commit_id = params[:captures].first[0..10] | |
@commit = settings.repo.commits(commit_id).first | |
halt "No commit exists with id #{commit_id}" if @commit.nil? | |
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
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Name | Lines | LOC | Classes | Methods | M/C | LOC/M | | |
+----------------------+-------+-------+---------+---------+-----+-------+ | |
| Controllers | 157 | 133 | 13 | 14 | 1 | 7 | | |
| Helpers | 142 | 125 | 0 | 13 | 0 | 7 | | |
| Models | 1344 | 1045 | 37 | 98 | 2 | 8 | | |
| Model specs | 1328 | 1107 | 0 | 0 | 0 | 0 | | |
| Controller specs | 112 | 88 | 0 | 0 | 0 | 0 | | |
| Helper specs | 22 | 9 | 0 | 0 | 0 | 0 | | |
| Mailer specs | 27 | 19 | 0 | 0 | 0 | 0 | |
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
App.Choice = SC.Record.extend({ | |
label: SC.Record.attr(String, { | |
isRequired: YES | |
}), | |
question: SC.Record.toOne("App.Question", { | |
isMaster: NO | |
}), | |
isSelected: NO | |
}); | |
App.Question = SC.Record.extend({ |
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
# -*- encoding : utf-8 -*- | |
class Invoice < ActiveRecord::Base | |
paginates_per 15 | |
belongs_to :campaign | |
has_and_belongs_to_many :tasks | |
has_many :expense_notes | |
validates_presence_of :campaign | |
validates_presence_of :start_date |
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 'twitter' | |
require 'yaml' | |
Twitter.configure do |config| | |
config.consumer_key = "XXX" | |
config.consumer_secret = "XXX" | |
config.oauth_token = "XXX" | |
config.oauth_token_secret = "XXX" | |
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
<matjack> dio che palle la vita | |
<ju> sai che... | |
<steffoz> guardate qui: http//bufferapp.com | |
<macchiato> [ you can now mention http//bufferapp.com as @bufferapp ] | |
<steffoz> niente male no? scrivi su @bufferapp i tweet e lui te li posta piano piano, solo in determinati orari #twitter #marketing | |
<ju> ..stanotte ho fatto un sogno assurdo? | |
<matjack> @bufferapp carino! #readlater | |
<c1p8> @bufferapp bello, ma è più bello questo: http//saituilcazzo.com | |
<macchiato> [ you can now mention http//saituilcazzo.com as @saituilcazzo ] | |
<c1p8> ed in più @saituilcazzo è pure self-hostable, costa pochissimo |