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 'httparty' | |
module Shack | |
class Comment | |
attr_reader :username, :body, :preview, :comment_id | |
def initialize comment | |
@username = comment["author"] | |
@preview = comment["preview"].gsub("\n", ' ') |
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
sidekick:groupy jordanisip$ git pull --rebase | |
remote: Counting objects: 175, done. | |
remote: Compressing objects: 100% (86/86), done. | |
remote: Total 133 (delta 58), reused 113 (delta 42) | |
Receiving objects: 100% (133/133), 22.99 KiB, done. | |
Resolving deltas: 100% (58/58), completed with 9 local objects. | |
From [email protected]:joevandyk/groupy | |
d01dfa2..8c0bfd7 master -> origin/master | |
First, rewinding head to replay your work on top of it... | |
HEAD is now at 8c0bfd7... Subdomains should work now. (be sure to add them to /etc/localhost when developing!) |
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 FeedController < ApplicationController | |
after_filter :remember_cache | |
before_filter :check_for_cache | |
def blog | |
@blogs = Blog.last_few_blogs 10 | |
response.headers["Content-Type" ] = "text/xml;" | |
render :layout => false | |
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
def initialize hsh={} | |
hsh.each do |key, value| | |
instance_variable_set "@#{key}", value | |
end | |
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
=> #<Bj::Table::Job bj_job_id: 7581, command: "cat /etc/passwd", state: "finished", priority: 0, tag: "", is_restartable: 1, submitter: "ey03-s00372", runner: "ey03-s00372", pid: 5371, submitted_at: "2008-08-22 17:08:26", started_at: "2008-08-22 17:08:51", finished_at: "2008-08-22 17:08:51", env: nil, stdin: nil, stdout: "root:x:0:0:root:/root:/bin/bash\nbin:x:1:1:bin:/bin:...", stderr: "", exit_status: 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
def create_activerecord_class table_name | |
Class.new(ActiveRecord::Base) do | |
set_table_name table_name | |
end | |
end | |
# I already have a users db table | |
# So in the console... | |
>> AnotherUser = create_activerecord_class(:users) | |
=> AnotherUser(id: integer, first_name: string, last_name: string, ...... ) |
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
# Install WhiteList plugin from http://svn.techno-weenie.net/projects/plugins/white_list/ | |
class ApplicationController < ActionController::Base | |
before_filter :strip_naughty_stuff_from_forms | |
private | |
def strip_naughty_stuff_from_forms | |
strip_naughty_stuff_from_hash(params) | |
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
# Install WhiteList plugin from http://svn.techno-weenie.net/projects/plugins/white_list/ | |
class ApplicationController < ActionController::Base | |
before_filter :strip_naughty_stuff_from_forms | |
private | |
def strip_naughty_stuff_from_forms | |
strip_naughty_stuff_from_hash(params) | |
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
JOE VAN DYK | |
CONTACT INFORMATION | |
============================= | |
[email protected] | |
http://fixieconsulting.com | |
http://github.com/joevandyk | |
http://www.workingwithrails.com/recommendation/for/person/7469-joe-van-dyk | |
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
-----Original Message----- | |
From: Mail Delivery System [mailto:[email protected]] | |
Sent: Tuesday, September 09, 2008 11:23 AM | |
To: Eric Schinfeld | |
Subject: Mail delivery failed: returning message to sender | |
This message was created automatically by mail delivery software. | |
A message that you sent could not be delivered to one or more of its | |
recipients. This is a permanent error. The following address(es) failed: |
OlderNewer