This file contains hidden or 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
commit 2111cdc41fbd683e43b33a38a7f4b60670b3013b | |
Author: wbailey <[email protected]> | |
Date: Fri Feb 25 09:50:40 2011 -0800 | |
model change event is now just "changed" | |
diff --git a/src/binding.js b/src/binding.js | |
index 668c9a9..dafbee1 100644 | |
--- a/src/binding.js | |
+++ b/src/binding.js |
This file contains hidden or 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 "open-uri" | |
def bet(bet) | |
win = false; winnings = 0 | |
until win | |
win = open("http://roulette.engineyard.com").read.match(/13/) | |
winnings += (win ? bet * 35 : -bet) | |
end | |
winnings | |
end |
This file contains hidden or 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
- (UIImage*)tintedImageWithColor:(UIColor*)tint { | |
CGSize size = self.size; | |
CGRect imageBounds; | |
if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && | |
[[UIScreen mainScreen] scale] == 2) { | |
imageBounds = CGRectMake(0, 0, size.width * 2, size.height * 2); | |
} else { | |
imageBounds = CGRectMake(0, 0, size.width, size.height); | |
} | |
This file contains hidden or 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 jsonToXMLString = function(data){ | |
var carrier = DOM.create('carrier'); | |
var convert = function(data, currentNode) { | |
keys(data).each(function(k) { | |
var v = data[k]; | |
if (is_scalar(v)) { | |
currentNode.setAttribute(k, v); | |
} else if (hasArrayNature(v)) { | |
v.each(function(vv){ | |
var node = DOM.create(k); |
This file contains hidden or 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
#!/usr/bin/env ruby | |
require "rubygems" | |
require "highline/import" | |
require "flareshow" | |
require "erb" | |
require "time" | |
require "open-uri" | |
class ShareflowExporter | |
This file contains hidden or 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
cart = (function(){ | |
return { | |
// windows to update | |
windowsToUpdate : function(){ | |
var windowsToUpdate = [window]; | |
if (window.opener) windowsToUpdate.push(window.opener); | |
return jQuery(windowsToUpdate); | |
}, | |
// start a timer to update the cart icon periodically |
This file contains hidden or 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
- (TTStyle*)imageThumbView:(UIControlState)state { | |
TTBoxStyle* boxStyle = [TTBoxStyle styleWithMargin:UIEdgeInsetsMake(4, 4, 4, 4) next:nil]; | |
TTStyle* imageStyle = [TTImageStyle styleWithImageURL:nil | |
defaultImage:nil | |
contentMode:UIViewContentModeScaleAspectFit | |
size:CGSizeZero next:boxStyle]; | |
TTPartStyle* imagePart = [TTPartStyle styleWithName:@"image" style:imageStyle next:nil]; | |
TTStyle* contentStyle = [TTContentStyle styleWithNext:imagePart]; | |
TTStyle* fillStyle = [TTSolidFillStyle styleWithColor:hexColor(0xcccccc) next:contentStyle]; | |
TTStyle* whiteBorder = [TTSolidBorderStyle styleWithColor:hexColor(0xffffff) width:2 next:fillStyle]; |
This file contains hidden or 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
PShape bigMap; | |
PShape districtShape; | |
//PFont f; | |
import de.bezier.data.*; | |
XlsReader reader; | |
void setup() { | |
//basics |
This file contains hidden or 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 'em-proxy' | |
require 'ruby-debug' | |
require 'cgi' | |
puts "starting" | |
puts "\n\n\n\n" | |
Proxy.start(:host => "192.168.1.113", :port => 3000) do |conn| | |
conn.server :srv, :host => "mail.yahooapis.com", :port => 80 | |
This file contains hidden or 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 "SFFlow.h" | |
@implementation SFFlow | |
// Custom logic goes here. | |
#pragma mark common managed object methods | |
+ (id *)upsert:(NSDictionary *)data | |
{ | |
NSEntityDescription *entityDescription = [[self class] entityInManagedObjectContext:[[self class] _moc]]; |