This file contains 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
NSURLRequest *request = [NSURLRequest requestWithURL:someURL | |
cachePolicy:NSURLRequestUseProtocolCachePolicy | |
timeoutInterval:60.0]; |
This file contains 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
objc_msgSend(robot, "moveForward:", 100); |
This file contains 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
robot.moveForward(100); | |
[robot moveForward:100]; |
This file contains 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
server { | |
listen 80; | |
server_name statusboard.danpalmer.me; | |
access_log /path/to/logs/access.log; | |
error_log /path/to/logs/error.log; | |
location / | |
{ |
This file contains 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
description "node.js server for StatusBoard GoSquared endpoint" | |
author "Dan Palmer - http://danpalmer.me/" | |
start on startup | |
stop on shutdown | |
respawn | |
respawn limit 20 5 | |
limit nofile 32768 32768 |
This file contains 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
// Transform this: | |
{ | |
visitors.total: [ | |
{ | |
timestamp: 1365548400, | |
value: 1 | |
}, | |
{ | |
timestamp: 1365548700, | |
value: 2 |
This file contains 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
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Applicative | |
import Snap.Core | |
import Snap.Util.FileServe | |
import Snap.Http.Server | |
import Data.ByteString | |
import Data.Maybe |
This file contains 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
describe(@"MyClass", ^{ | |
it(@"should do something", ^AsyncBlock { | |
MyClass *obj = [[MyClass alloc] init]; | |
[obj doSomethingInBackground:^(NSArray *results, NSError *error) { | |
expect([results count]).toNot.equal(0); | |
done(); | |
}]; | |
}); | |
}); |
This file contains 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
- (void)setupTests { | |
} | |
- (void)testFeatureFoo { | |
} | |
- (void)testFeatureBlah { | |
} | |
- (void)tearDown { |
This file contains 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
* thread #1: tid = 0x2303, 0x00007fff8ffb6250 libobjc.A.dylib`objc_msgSend + 16, stop reason = EXC_BAD_ACCESS (code=1, address=0x10) | |
frame #0: 0x00007fff8ffb6250 libobjc.A.dylib`objc_msgSend + 16 | |
frame #1: 0x00007fff88ffe708 Foundation`___NSURLConnectionWillCacheResponse_block_invoke_0 + 110 | |
frame #2: 0x00007fff88e86528 Foundation`__65-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:]_block_invoke_0 + 28 | |
frame #3: 0x00007fff88e8646c Foundation`-[NSURLConnectionInternal _withConnectionAndDelegate:onlyActive:] + 227 | |
frame #4: 0x00007fff88e86368 Foundation`-[NSURLConnectionInternal _withActiveConnectionAndDelegate:] + 63 | |
frame #5: 0x00007fff88ffda3c Foundation`_NSURLConnectionWillCacheResponse + 126 | |
frame #6: 0x00007fff879f8272 CFNetwork`___delegate_willCacheResponse_block_invoke_0 + 48 | |
frame #7: 0x00007fff87a75a7a CFNetwork`___withDelegateAsync_block_invoke_0 + 90 | |
frame #8: 0x00007fff87b062ea CFNetwork`__block_global_1 + 28 |