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
The Texas oilman T. Boone Pickens has now joined another high-profile McCain supporter, Arnold Schwarzenegger, in knocking the McCain nostrum that America can drill its way out of its energy crisis. Mr. Pickens, who financed the Swift-boat campaign smearing John Kerry in 2004, was thought to be a sugar daddy for similar assaults against the Democrats this year. Instead, he is underwriting nonpartisan ads promoting wind power and speaks of how he would welcome Al Gore as energy czar if there’s an Obama administration. |
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
Immutable = require('immutable') | |
immutableDiff = require("immutablediff") | |
sha = require("stable-sha1") | |
class Repository | |
constructor: (initialData) -> | |
@workingCopy = Immutable.fromJS(initialData) | |
@objectMap = {} | |
@author = "mrjjwright@gmail.com" |
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
import Cocoa | |
import Few | |
private func render1(component: Few.Component<()>, state: ()) -> Element { | |
return View(backgroundColor: NSColor.redColor()) | |
.direction(.Column) | |
.flex(1) | |
} |
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' | |
require 'digest' | |
USER = 'enter your username here' | |
PASS = 'Enter your password here' | |
SECRET = 'enter our secret here' | |
CLIENT = 'enter our inbox here' | |
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 self.today | |
day = Time.zone.parse(DateTime.now.to_date.to_s).utc | |
return self.find(:all, :conditions => ['created_at >= ? and created_at < ?', day, day + 86400]) | |
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 self.on(dateterm) | |
day = Time.zone.parse(Chronic.parse(dateterm).to_date.to_s) | |
return [] if day.nil? | |
day = day.utc | |
return Entry.find(:all, :conditions => ['created_at >= ? and created_at < ?', day, day + 86400]) | |
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 self.on(dateterm) | |
day = Chronic.parse(dateterm) | |
return [] if day.nil? | |
day = Time.zone.parse(day.to_date.to_s).utc | |
return Entry.find(:all, :conditions => ['created_at >= ? and created_at < ?', day, day + 86400]) | |
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 self.today | |
day = Time.zone.parse(DateTime.now.to_date.to_s).utc | |
return Entry.find(:all, :conditions => ['created_at >= ? and created_at < ?', day, day + 86400]) | |
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
named_scope :since, lambda { |dateterm| | |
day = Chronic.parse(dateterm, :context => :past) | |
day = Time.parse(dateterm) if day.nil? | |
raise "Could not parse date" if day.nil? | |
{ :conditions => ['created_at >= ?', Time.zone.parse(day.to_date.to_s).utc], :order => 'created_at asc' } | |
} | |
named_scope :on, lambda { |dateterm| | |
day = Chronic.parse(dateterm, :context => :past) | |
day = Time.parse(dateterm) if day.nil? |
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
//put this in subclass of NSTableView | |
- (void)keyDown:(NSEvent *)theEvent { | |
//if user tabs in this table, we don't want to edit (the default) | |
//instead select the next view | |
if ([theEvent keyCode] == 48) { | |
if ([[self window] firstResponder] == self) { | |
[[self window] selectNextKeyView:self]; | |
} | |
} else if ([theEvent keyCode] == 36){ | |
//the user pushed enter |
OlderNewer