Skip to content

Instantly share code, notes, and snippets.

View evadne's full-sized avatar
🎣
gone fishing

Evadne Wu evadne

🎣
gone fishing
View GitHub Profile
var f = {}
> undefined
f.hasOwnProperty = ["F"]
> ["F"]
f.hasOwnProperty
> ["F"]
f.hasOwnProperty("hasOwnProperty")
@evadne
evadne / reflect-issues.rb
Created April 11, 2011 18:51
List all the open issues in a GitHub repo, then mail it to people. Assumptions: fast network.
#!/usr/bin/env ruby
# encoding: UTF-8
# GitHub issues reflection
# Evadne Wu at Iridia Productions, 2011
# everything is hardcoded to a certain degree and it requires a lot of gems to work. one can only hack and avoid doing this repeatedly if things are just not going to work out as intended.
require 'optparse'
require 'pp'
@evadne
evadne / EGPlanning.h
Created April 16, 2011 23:27
Momentum / Experimental
// Edge
#ifndef __EdgeDefines__
#define __EdgeDefines__
typedef BOOL(^)(id recognizer /* maybe gets recognizer.history */ , id anEvent) EGRecognitionHandler;
#endif
@evadne
evadne / Log.txt
Created May 10, 2011 19:28
Shared instances for all
2011-05-11 03:25:07.462 GlobalSingletonSupportTest[63618:1803] irSharedInstance instance NSObject 15f980, 181511 ns
2011-05-11 03:25:07.465 GlobalSingletonSupportTest[63618:5303] irSharedInstance instance NSObject 15f980, 614 ns
2011-05-11 03:25:07.465 GlobalSingletonSupportTest[63618:5403] irSharedInstance instance NSObject 15f980, 584 ns
2011-05-11 03:25:07.464 GlobalSingletonSupportTest[63618:a0f] irSharedInstance instance NSObject 15f980, 1546 ns
2011-05-11 03:25:07.466 GlobalSingletonSupportTest[63618:a0f] irSharedInstance instance NSObject 15f980, 1545 ns
//
// TAPaginatedView.h
// Tarotie
//
// Created by Evadne Wu on 4/17/11.
// Copyright 2011 Iridia Productions. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "Foundation+IRAdditions.h"
@evadne
evadne / gist:1517894
Created December 24, 2011 17:37
Capturing Default iOS Keyboard Rect & Image
anImageView.image = ((^ (CGRect *outKeyboardRect){
[CATransaction begin];
UIWindow *tempWindow = [[[UIWindow alloc] initWithFrame:[UIScreen mainScreen].applicationFrame] autorelease];
[tempWindow makeKeyAndVisible];
UITextField *fauxTextField = [[[UITextField alloc] initWithFrame:(CGRect){ 0, 0, 128, 128 }] autorelease];
[tempWindow addSubview:fauxTextField];
- (void) longPressGestureRecognizerChanged:(UILongPressGestureRecognizer *)gr {
static UIGestureRecognizerState lastState = UIGestureRecognizerStatePossible; // or in ivar
if (gr.state == UIGestureRecognizerStatePossible)
if (lastState == UIGestureRecognizerStateChanged) {
// do something
}
@evadne
evadne / gist:3048023
Created July 4, 2012 15:54
PostgreSQL not cooperating
Last login: Wed Jul 4 23:21:56 on ttys000
evadne ~ $ sudo brew install postgres --no-ossp-uuid
Password:
==> Downloading http://ftp.postgresql.org/pub/source/v9.1.2/postgresql-9.1.2.tar.bz2
File already downloaded in /Library/Caches/Homebrew
==> ./configure --disable-debug --prefix=/usr/local/Cellar/postgresql/9.1.2 --datadir=/usr/local/Cellar/postgresql/9.1.2/share/postgresql --docdir=/usr/local/Cellar/p
==> make install-world
make -C doc install
make -C src install
@evadne
evadne / LWHangDetector.h
Created October 27, 2012 06:16 — forked from evanlong/LWHangDetector.h
Simple Hang Detection
/**
Copyright (C) 2011 Evan Long
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@evadne
evadne / RAPageViewController.h
Created November 8, 2012 14:52
RAPageViewController
//
// RAPageViewController.h
// PagingTest
//
// Created by Evadne Wu on 11/8/12.
// Copyright (c) 2012 Radius. All rights reserved.
//
#import <UIKit/UIKit.h>