Skip to content

Instantly share code, notes, and snippets.

POST /api/v1/analytics_events HTTP/1.1
Host: staging.hoteltonight.com
Accept-Language: en, fr, de, ja, nl, it, es, pt, pt-PT, da, fi, nb, sv, ko, zh-Hans, zh-Hant, ru, pl, tr, uk, ar, hr, cs, el, he, ro, sk, th, id, ms, en-GB, ca, hu, vi, en-us;q=0.8
User-Agent: HT Test/4.2.3 (iPhone Simulator; iOS 6.0; Scale/2.00)
Accept: application/json
X-App-Country: US
Content-Type: application/x-www-form-urlencoded; charset=utf-8
X-App-Platform: iOS;iPhone Simulator;6.0;640x1136
Connection: keep-alive
X-App-Device: 62b68279b6505739b82d28c16bc5334100000000
GET /api/v1/settings?lat=37.6134&lng=-122.395&auth_token=Y7M8UQD3hLVdTsIDDIYW HTTP/1.1
Host: staging.hoteltonight.com
Accept-Language: en, fr, de, ja, nl, it, es, pt, pt-PT, da, fi, nb, sv, ko, zh-Hans, zh-Hant, ru, pl, tr, uk, ar, hr, cs, el, he, ro, sk, th, id, ms, en-GB, ca, hu, vi, en-us;q=0.8
User-Agent: HT Test/4.2.2 (iPhone Simulator; iOS 6.0; Scale/2.00)
Accept: application/json
X-App-Country: GB
Content-Type: application/json
X-App-Platform: iOS;iPhone Simulator;6.0;640x1136
Connection: keep-alive
X-App-Device: 62b68279b6505739b82d28c16bc5334100000000
#!/bin/sh
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
(lldb) po [NSThread callStackSymbols]
(id) $2 = 0x0f485710 <_NSCallStackArray 0xf485710>(
0 ??? 0x124fc39f 0x0 + 307217311,
1 UIKit 0x01a8ffbf -[UIViewController _setViewAppearState:isAnimating:] + 158,
2 UIKit 0x01a902d4 -[UIViewController __viewDidAppear:] + 136,
3 UIKit 0x01a9e907 -[UINavigationController viewDidAppear:] + 163,
4 UIKit 0x0ef46be5 -[UINavigationControllerAccessibility(SafeCategory) viewDidAppear:] + 57,
5 UIKit 0x01a8ffbf -[UIViewController _setViewAppearState:isAnimating:] + 158,
6 UIKit 0x01a902d4 -[UIViewController __viewDidAppear:] + 136,
7 UIKit 0x01a905d7 -[UIViewController _endAppearanceTransition:] + 263,
(lldb) po [NSThread callStackSymbols]
(id) $2 = 0x0f485710 <_NSCallStackArray 0xf485710>(
0 ??? 0x124fc39f 0x0 + 307217311,
1 UIKit 0x01a8ffbf -[UIViewController _setViewAppearState:isAnimating:] + 158,
2 UIKit 0x01a902d4 -[UIViewController __viewDidAppear:] + 136,
3 UIKit 0x01a9e907 -[UINavigationController viewDidAppear:] + 163,
4 UIKit 0x0ef46be5 -[UINavigationControllerAccessibility(SafeCategory) viewDidAppear:] + 57,
5 UIKit 0x01a8ffbf -[UIViewController _setViewAppearState:isAnimating:] + 158,
6 UIKit 0x01a902d4 -[UIViewController __viewDidAppear:] + 136,
7 UIKit 0x01a905d7 -[UIViewController _endAppearanceTransition:] + 263,
(lldb) po [NSThread callStackSymbols]
(id) $1 = 0x09efad00 <_NSCallStackArray 0x9efad00>(
0 ??? 0x124fc2cf 0x0 + 307217103,
1 UIKit 0x01a8ffbf -[UIViewController _setViewAppearState:isAnimating:] + 158,
2 UIKit 0x01a902d4 -[UIViewController __viewDidAppear:] + 136,
3 UIKit 0x01a9e907 -[UINavigationController viewDidAppear:] + 163,
4 UIKit 0x0ef46be5 -[UINavigationControllerAccessibility(SafeCategory) viewDidAppear:] + 57,
5 UIKit 0x01a8ffbf -[UIViewController _setViewAppearState:isAnimating:] + 158,
6 UIKit 0x01a902d4 -[UIViewController __viewDidAppear:] + 136,
7 UIKit 0x01a918c9 __64-[UIViewController viewDidMoveToWindow:shouldAppearOrDisappear:]_block_invoke_0 + 44,
http://www.sourcedrop.net/HEx95e637848b
- (NSString *)longDescription
{
NSString *dateString = [HTLongDateFormatter() stringFromDate:self.dateCreated];
NSString *description = [NSString stringWithFormat:@"%@. %@", dateString, self.description];
if (self.expirationDate)
{
NSString *expirationFormat = nil;
if ([self.expirationDate timeIntervalSinceNow] > 0)
{
NSNumberFormatter *currencyFormatter = [[NSNumberFormatter alloc] init];
[currencyFormatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[currencyFormatter setCurrencyCode:currencyCode];
[currencyFormatter setMaximumFractionDigits:0];
[currencyFormatter setRoundingMode:NSNumberFormatterRoundHalfUp];
return [currencyFormatter stringFromNumber:@(amount)];
#!/bin/sh
ORIGINALDIR="$( pwd )"
SCRIPTDIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
BASEDIR="$( cd -P $SCRIPTDIR/.. && pwd )"
COLORON='printf "`tput setaf 7`"'
COLORON2='printf "`tput setaf 5`"'
COLORONRED='printf "`tput setaf 1`"'
COLOROFF='printf "`tput sgr0`"'