Skip to content

Instantly share code, notes, and snippets.

require 'rubygems'
require 'sinatra'
require 'redis'
# To use, simply start your Redis server and boot this
# example app with:
# ruby example_note_keeping_app.rb
#
# Point your browser to http://localhost:4567 and enjoy!
#
"An article on Tuesday about Twitter’s plan to make money from advertising
omitted the name of one of its co-founders. In addition to Evan Williams and
Biz Stone, who continue to work at the company, Jack Dorsey was a co-founder
and remains as nonexecutive chairman."
The New York Times.
<http://www.nytimes.com/2010/04/13/technology/internet/13twitter.html>
And who is that 'easy to forget that he was a cofounder at twitter'? The guy
with the idea. when ev was stilling pushing odeo.
/* This is when a refactoring really pays off.
*
* In order to make your code more modular, avoid hard-coding assumptions (or refactor them away).
* The most fundamental, anti-modular assumption in Object-Oriented software is the concrete type of objects.
* Any time you write "new MyClass" in your code (or in Ruby MyClass.new) you've hardcoded
* an assumption about the concrete class of the object you're allocating. These makes it impossible, for example,
* for someone to later add logging around method invocations of that object, or timeouts, or whatever.
*
* In a very dynamic language like Ruby, open classes and method aliasing mitigate this problem, but
* they don't solve it. If you manipulate a class to add logging, all instances of that class will have
1c1,2
< AIUCEC001:17452:0
---
> ACP011:18194:15
> ACP011:18562:16
9c10,11
< ALLSTATENEYCA002:18043:0
---
> ALLSTATENEYCA002:18446:1
> ALLSTATENEYCA003:18124:0
actionmailer (2.3.2, 1.3.6)
actionpack (2.3.2, 1.13.6)
actionwebservice (1.2.6)
activerecord (2.3.2, 1.15.6)
activeresource (2.3.2)
activesupport (2.3.2, 1.4.4)
acts_as_ferret (0.4.4, 0.4.1)
addressable (2.1.0, 2.0.2)
capistrano (2.5.8, 2.0.0)
cgi_multipart_eof_fix (2.5.0)
$(document).ready(function() {
$("table").tablesorter({
headers: {
2: {
sorter: 'digit'
}
},
debug: true
});
});
def market_id_unique_to_plan?
accum = 0
plan.get_plan_market_ids.each do |current_market_id|
accum += 1 if current_market_id.sort == self.market_id.sort
end
accum < 2 ? true : false
end