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
<?php | |
function gsa_theme_page() { | |
if (isset($_POST['info_update'])){ | |
if ( isset($_POST['headerimage']) ) { | |
if ( '' == $_REQUEST['headerimage'] ) | |
delete_option('gsa_header_image'); | |
else { | |
update_option('gsa_header_image', $_REQUEST['headerimage']); | |
} |
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 |
OlderNewer