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
NSArray *suffixes = [NSArray arrayWithObjects:@"th", @"st", @"nd", @"rd", nil]; | |
NSString *suffix = nil; | |
NSInteger birthday = [[goal valueForKey:@"beforeBirthday"] intValue]; | |
NSInteger offset = birthday % 10; | |
offset = (offset % 100) > 10 && (offset % 100) < 20 ? 0 : offset; | |
if (birthday > 0) { | |
suffix = offset > 3 ? @"th" : [suffixes objectAtIndex:offset]; | |
} else { | |
suffix = @""; |
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
Interval Since Last Panic Report: 9356825 sec | |
Panics Since Last Report: 1 | |
Anonymous UUID: DACAD640-50CA-4728-9F8B-6B39CDB98D5C | |
Wed Oct 27 18:10:35 2010 | |
panic(cpu 0 caller 0x2a8ab2): Kernel trap at 0x0046d801, type 14=page fault, registers: | |
CR0: 0x80010033, CR2: 0x00000018, CR3: 0x00100000, CR4: 0x000006e0 | |
EAX: 0x08bf0a9c, EBX: 0x08bf0a9c, ECX: 0x136cfe68, EDX: 0x00000000 | |
CR2: 0x00000018, EBP: 0x5c77bd08, ESI: 0x136cfe68, EDI: 0x0a61f968 | |
EFL: 0x00010293, EIP: 0x0046d801, CS: 0x00000008, DS: 0x022d0010 |
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 'openid/store/interface' | |
module OpenID::Store | |
class Association | |
include Mongoid::Document | |
field :secret, :type => Binary | |
def from_record | |
OpenID::Association.new(handle, secret.to_s, issued, lifetime, assoc_type) | |
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
var sys = require('sys'); | |
var dom = [ | |
{ tag: 'p', innerHTML: 'Test 1', color: 'green' }, | |
{ tag: 'p', innerHTML: 'Test 2', color: 'black' }, | |
{ tag: 'p', innerHTML: 'Test 3', color: 'red' }, | |
{ tag: 'div', innerHTML: 'Name: Bob' } | |
]; | |
function fakeQuery(selector) { |
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
// Asynchronously recursively reads files | |
function RecursiveReader(pathName, callback) { | |
this.filesLeft = 1; | |
this.pathName = pathName; | |
this.callback = callback; | |
this.data = ''; | |
this.readAll(this.pathName); | |
} | |
RecursiveReader.prototype = { |
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
{"collections":{"today":["1280937181443"],"project_tasks_1280937193983":["1280937189535"],"project_tasks_1280937163391":["1280937195297","1280937216932"],"projects":["1280937163391","1280937193983"],"inbox":["1280937240988"],"next":[]},"projects":{"1280937193983":{"name":"Project 2","id":"1280937193983","user_id":"4c597681a13071226100000a"},"1280937163391":{"name":"Project 1","notes":null,"id":"1280937163391","tags":"tag1 tag2 tag3","user_id":"4c597681a13071226100000a"}},"tasks":{"1280937189535":{"name":"Example task 3","project_id":"1280937193983","archived":false,"id":"1280937189535","user_id":"4c597681a13071226100000a"},"1280937181443":{"name":"Example task to do today","project_id":null,"archived":false,"done":false,"id":"1280937181443","user_id":"4c597681a13071226100000a"},"1280937216932":{"name":"Example task","project_id":"1280937163391","archived":false,"done":false,"id":"1280937216932","user_id":"4c597681a13071226100000a"},"1280937195297":{"name":"Example task 2","project_id":"1280937163391","archive |
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
_________________________________________ | |
( It is so very hard to be an ) | |
( on-your-own-take-care-of-yourself-becau ) | |
( se-there-is-no-one-else-to-do-it-for-yo ) | |
( u grown-up. ) | |
----------------------------------------- | |
o ^__^ | |
o (**)\_______ | |
(__)\ )\/\ | |
U ||----w | |
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
* When forcing the user to see settings for the first time, set firstResponder on email | |
* First login should automatically sync | |
* Font size buttons | |
* Sync should show progress instead of the big blank screen | |
* Folders with spaces | |
* Search should be inline instead of an icon | |
* New document dialog should go away (like Mail compose) | |
* Lazy loading | |
* Refresh table should only load changed documents | |
* Editor font setting |
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
alias g='git status' | |
alias gc='git commit -a' | |
alias gl='git log --pretty=format:"[%h] %ae, %ar: %s" --stat' | |
alias gp='git push' | |
alias gpl='git pull' | |
alias gpo='git pull origin master' | |
alias gpu='git push origin master' |
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 SprocketsController < ActionController::Base | |
caches_page :show, :if => Proc.new { SprocketsApplication.use_page_caching } | |
def show | |
render :text => minify(SprocketsApplication.source), :content_type => "text/javascript" | |
end | |
private | |
def minify(source) |