Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
montage -tile x1 -geometry '1x1+0+0<' -alpha On -background "rgba(0,0,0,0.0)" -quality 100 frames.gif sprite.gif |
@implementation MySharedThing | |
+ (id)sharedInstance | |
{ | |
DEFINE_SHARED_INSTANCE_USING_BLOCK(^{ | |
return [[self alloc] init]; | |
}); | |
} | |
@end |
#!/opt/local/bin/perl | |
use Test::More; | |
use Test::Varnish; | |
$url = 'FIXME'; | |
$num_runs = 10; | |
plan tests => $num_runs; | |
my $tv = Test::Varnish->new({verbose => 1}); |
require 'sinatra/base' | |
require 'cgi' | |
module Sinatra | |
# http://code.percentmobile.com/snippet/ruby_on_rails/percent_mobile/lib/percent_mobile_helper.rb | |
module PercentMobileHelper | |
PERCENT_MOBILE_COOKIE_PATH="/" | |
PERCENT_MOBILE_VISIT_DURATION=60*60 |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
# Xcode 4.3.3 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix | |
# Xcode 4.3.2 | |
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn) | |
Target: x86_64-apple-darwin11.4.0 | |
Thread model: posix |
#define EMKStringableEnum(ENUM_NAME, ENUM_VALUES...) \ | |
\ | |
typedef enum { \ | |
ENUM_VALUES \ | |
} ENUM_NAME; \ | |
\ | |
\ | |
\ | |
static NSString * ENUM_NAME##ToString(int enumValue) { \ | |
static NSString *enumDescription = @"" #ENUM_VALUES; \ |
You're about to start a library or open-source thing that you want to be available to any iOS project. This is a handy guide for how to get set up.
#Setup
Ok, project exists. What now? Let's rip out all that boilerplate Xcode so graciously gave us.
Note: "Forked" from Latency Numbers Every Programmer Should Know
Event | Nanoseconds | Microseconds | Milliseconds | Comparison |
---|---|---|---|---|
L1 cache reference | 0.5 | - | - | - |
Branch mispredict | 5.0 | - | - | - |
L2 cache reference | 7.0 | - | - | 14x L1 cache |
Mutex lock/unlock | 25.0 | - | - | - |