Skip to content

Instantly share code, notes, and snippets.

View bryanl's full-sized avatar
🚩
Out in the streets

Bryan Liles bryanl

🚩
Out in the streets
View GitHub Profile
#!/usr/bin/env ruby
require 'rubygems'
# you can get this from the 'atom-tools' gem
require 'atom/service'
service = Atom::Service.new "http://downloadr.local/sites"
collection = service.workspaces.first.collections.first
puts collection.feed.entries.inspect
You the couchview tool, you couldn't normally build the view in view.json. There were no constructs for the index key.
What I propose is to use a configuration file to add other keys to the view.
15:01:06$ /opt/local/bin/ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i686-darwin9.5.0]
15:01:23$ /usr/bin/ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]
Now go read this:
http://www.ruby-lang.org/en/news/2008/08/08/multiple-vulnerabilities-in-ruby/#label-3
Job.new(:noncorporate => true,
:tech => :scalpel_edge,
:cause => Cause.new(:improve_healthcare,
:goodness => :noble))
class Example < ActiveRecord::Base
# includes
# associations
# named scopes
# validations
--- &id004 !ruby/object:Twitter
attributes:
updated_at: &id001 2008-12-15 03:42:33.725807 Z
term: bryanl
social_id: 14
type: Twitter
id: 13
created_at: *id001
state: submit
attributes_cache: {}
Factory.sequence :filename do |n|
"file_#{n}"
end
Factory.sequence :path do |n|
"path_#{n}"
end
Factory.define :site_path do |f|
f.name { Factory.next(:path) }
(add-to-list 'load-path (expand-file-name "~/.emacs.d"))
(add-to-list 'load-path
"~/.emacs.d/plugins")
(add-to-list 'load-path
"/usr/local/share/emacs/site-lisp")
(require 'yasnippet-bundle)
(require 'magit)
(set-face-font 'default "-apple-inconsolata-medium-r-normal--11-0-72-72-m-0-iso10646-1")
*** You have joined channel #offrails [08:31]
*** Topic for #offrails: http://ismerbrails.com/ | Rails / Merb merge:
http://yehudakatz.com/2008/12/23/rails-and-merb-merge/
*** #offrails: topic set by qrush, 18:40:21 2008/12/23
*** Users on #offrails: bryanl +timrosenblatt +wdperson +jschoolc +d2dchat
+RichGuk +sg-xdeth_ +yaroslav +leethal +naoshige +qrush +linoj +fearoffish
+_eric +keeran +tpope +Guest54999 +Chrononaut +GMFlash +iHate
+saint_cypher @ChanServ +keiki_ +tshine-afk +keiki +epitron +SuttoL +lisa
In this lesson, we'll learn about RESTful routes in ruby on rails.
The REST support in Rails consists of helper methods and enchanements
to the routing system, designed to impose a particular systle and
order and login on your controlers and, consequently, on the way the
world sees your application. The benefits of Rails' REST support fall
into two categories: Convenience and automatic best practices for you.
A REST interface to your application's services for everyone else.
REST and Rails starts with CRUD or (create -- retrieve -- update --
delete). We'll jump right in to making our application RESTful. First