Public Gists by tjweir

Gravatar
Wed Nov 11 10:41:28 -0800 2009
1
2
3
// Clojure's rep
implicit def addRepSyntax[A](a: =>A) = new {
  def rep = {
Gravatar
Wed Oct 28 07:04:45 -0700 2009
1
2
3
     LiftRules.exceptionHandler.prepend {
       case (Props.RunModes.Production, r, e) => {
         Log.error("IMPORTANT IMPORTANT IMPORTANT: Unhandeled error occoured!!",e)
Gravatar
Sun Oct 25 12:51:26 -0700 2009
1
2
3
// From: http://parmanoir.com/8_ways_to_use_Blocks_in_Snow_Leopard
 
// Sorting
Gravatar
Sat Oct 24 06:11:32 -0700 2009
1
2
3
module Rack
  class ZombieShotgun
    
Gravatar
Tue Oct 20 05:23:34 -0700 2009
1
2
3
package sandbox
 
import actors.Actor
Gravatar
Sat Oct 17 10:10:17 -0700 2009
1
2
3
// OLD
 
- (NSDictionary *)parsePerks:(NSArray *)perks {
Gravatar
Tue Oct 13 09:00:40 -0700 2009
1
2
3
enum Sections {
    kHeaderSection = 0,
 
Gravatar
Tue Oct 06 17:27:32 -0700 2009
1
2
3
(ns alandipert.minihttpd
  (:use [clojure.contrib.duck-streams :only (reader writer read-lines spit to-byte-array)]
        [clojure.contrib.str-utils :only (re-split str-join)])
Gravatar
Tue Oct 06 17:22:20 -0700 2009

      
Gravatar
Mon Oct 05 14:19:27 -0700 2009
1
2
3
// Talking to Tumblr from the iPhone
 
NSString *email = @"example@email.com";
Gravatar
Sun Oct 04 18:50:46 -0700 2009
1
2
3
object Packet extends Packet with LongKeyedMetaMapper[Packet] {
        override def dbTableName = "packets" // define the DB table name
        /* register callback to send the new packet */
Gravatar
Mon Sep 28 06:40:18 -0700 2009
1
2
3
// http://debasishg.blogspot.com/2009/09/thrush-combinator-in-scala.html [+]
 
// base
Gravatar
Thu Sep 24 14:30:54 -0700 2009
1
2
3
// http://www.slideshare.net/nkpart/taming-errors-with-functionalkit
 
@interface MyApi : NSObject
Gravatar
Thu Sep 24 14:26:46 -0700 2009
1
2
3
// http://www.slideshare.net/nkpart/taming-errors-with-functionalkit
 
@interface Map : NSObject
Gravatar
Wed Sep 16 17:42:04 -0700 2009
1
2
3
//
// NSObject+BlockObservation.h
// Version 1.0
Gravatar
Sat Sep 12 07:59:32 -0700 2009
1
2
3
// http://www.mikeash.com/?page=pyblog/friday-qa-2009-08-28-intro-to-grand-central-dispatch-part-i-basics-and-dispatch-queues.html
 
// do a thing that takes a long time, dispatched async, update the UI using the main Queue.
Gravatar
Sat Sep 12 07:44:43 -0700 2009
1
2
3
//http://www.mikeash.com/?page=pyblog/friday-qa-2009-08-14-practical-blocks.html
 
// NSURLConnection
Gravatar
Sat Sep 12 07:41:58 -0700 2009
1
2
3
// http://www.mikeash.com/?page=pyblog/friday-qa-2009-08-14-practical-blocks.html
 
// 1. Crappy Pattern!
Gravatar
Sat Sep 12 07:35:52 -0700 2009
1
2
3
//from http://www.mikeash.com/?page=pyblog/friday-qa-2009-08-14-practical-blocks.html
 
// 1. convenience!
Gravatar
Sat Sep 05 14:38:30 -0700 2009
1
2
3
import net.liftweb._
import http._
import util._