Skip to content

Instantly share code, notes, and snippets.

View alexyoung's full-sized avatar
💤

Alex Young alexyoung

💤
View GitHub Profile
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
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) {
// 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 = {
{"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
_________________________________________
( 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 |
* 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
<!DOCTYPE HTML>
<html>
<head>
<title>DailyJS Boomerang Example</title>
</head>
<body>
<h1>Boomerang Test</h1>
<div id="results">
</div>
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'
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)
var evalR = function(x, expr) {
var expr = expr.replace(/\br\b/g,"arguments[0]");
return eval(expr);
}
var express = function(expr) {
return function() {
return evalR(arguments[0], expr);
}
}