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>Demo Overherd</title> | |
<script type="text/javascript" src="http://stampede-corporate-2012.tb.nonwebdev.com/javascripts/jquery-1.5.1.min.js"></script> | |
</head> | |
<body> | |
<link href="http://ymssz4ew.frozencdn.net/stylesheets/live.css" rel="stylesheet" type="text/css" media="screen" /> | |
<script type="text/javascript" src="/jquery.overherd.js"></script> | |
<script type="text/javascript"> |
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
class Comment < ActiveRecord::Base | |
default_scope :order => 'created_at DESC' | |
belongs_to :marked_entry | |
belongs_to :user | |
has_many :participants, :through => :marked_entry | |
def self.reply_copy | |
'## Reply above this line in order to comment via email ##' | |
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
jQuery -> | |
getFeeds = -> | |
keywordId = $("#keyword").attr("data-id") | |
$.get("/keywords/#{keywordId}/feeds.html", (data)-> | |
if jQuery.isEmptyObject(data) | |
setTimeout(getFeeds, 5000) | |
else | |
$('#feeds').html(data) | |
) | |
$ -> setTimeout(getFeeds, 1000) |
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
class Widget | |
attr_accessor :circumference | |
attr_accessor :colour | |
attr_accessor :mass | |
def initialize(attributes) | |
attributes.each do |key, value| | |
m = "#{key}=".to_sym | |
self.send(m, value) if self.respond_to?(m) | |
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
railsonfire new | |
Creating new Railsonfire Project | |
/Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/lib/railsonfire-gem.rb:150:in `readline': end of file reached (EOFError) | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/lib/railsonfire-gem.rb:150:in `block in get_railsonfire_credentials' | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/lib/railsonfire-gem.rb:150:in `open' | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/lib/railsonfire-gem.rb:150:in `get_railsonfire_credentials' | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/lib/railsonfire-gem.rb:45:in `create_new' | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/lib/railsonfire-gem.rb:24:in `run' | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/gems/railsonfire-0.1.4/bin/railsonfire:16:in `<top (required)>' | |
from /Users/jody/.rvm/gems/ruby-1.9.2-p180/bin/railsonfire:19:in `load' |
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
ruby-1.9.2-p180 :007 > AdminUser.where(:id => 1).class | |
=> ActiveRecord::Relation | |
ruby-1.9.2-p180 :008 > AdminUser.where(:id => 1).first.class | |
AdminUser Load (0.2ms) SELECT "admin_users".* FROM "admin_users" WHERE "admin_users"."id" = 1 LIMIT 1 | |
=> AdminUser(id: integer, email: string, encrypted_password: string, reset_password_token: string, reset_password_sent_at: datetime, remember_created_at: datetime, sign_in_count: integer, current_sign_in_at: datetime, last_sign_in_at: datetime, current_sign_in_ip: string, last_sign_in_ip: string, created_at: datetime, updated_at: datetime) | |
ruby-1.9.2-p180 :009 > AdminUser.limit(1).class | |
=> ActiveRecord::Relation |
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 "rexml/document" | |
doc = REXML::Document.new(link_entry.atom) | |
doc.write($stdout, 2) |
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
Nokogiri::XML(link_entry.atom,&:noblanks).to_xhtml( indent:3, indent_text:"." ) |
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
Relevant Gemfile: | |
gem 'rails', '3.1.0' | |
group :assets do | |
gem 'coffee-rails', "~> 3.1.0" | |
gem 'uglifier' | |
gem 'twitter-bootstrap-rails', :git => 'http://github.com/seyhunak/twitter-bootstrap-rails.git' | |
end | |
gem 'simple_form', :git => 'git://github.com/plataformatec/simple_form.git' |
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
Started POST "/incoming_mails" for 75.101.174.33 at 2011-09-16 11:44:50 -0700 | |
Processing by IncomingMailsController#create as HTML | |
Parameters: {"to"=>"<[email protected]>", "disposable"=>"", "from"=>"[email protected]", "subject"=>"test", "message"=>"Received: by wyh11 with SMTP id 11so4116107wyh.36\r\n for <[email protected]>; Fri, 16 Sep 2011 11:44:46 -0700 (PDT)\r\nReceived: by 10.227.200.147 with SMTP id ew19mr1896356wbb.38.1316198686329;\r\n Fri, 16 Sep 2011 11:44:46 -0700 (PDT)\r\nReturn-Path: <[email protected]>\r\nReceived: from Steve-Smiths-MacBook-Pro.local ([46.208.75.144])\r\n by mx.google.com with ESMTPS id p8sm10467322wbo.20.2011.09.16.11.44.44\r\n (version=SSLv3 cipher=OTHER);\r\n Fri, 16 Sep 2011 11:44:45 -0700 (PDT)\r\nMessage-ID: <[email protected]>\r\nDate: Fri, 16 Sep 2011 19:44:42 +0100\r\nFrom: Steve Smith <[email protected]>\r\nUser-Agent: Postbox 2.5.2 (Macintosh/20110802)\r\nMIM |