Skip to content

Instantly share code, notes, and snippets.

View cliss's full-sized avatar

Casey Liss cliss

View GitHub Profile
(lldb) po [[[UIApplication sharedApplication] keyWindow] recursiveDescription]
<UIWindow: 0x10c569ec0; frame = (0 0; 320 568); opaque = NO; autoresize = W+H; gestureRecognizers = <NSArray: 0x10c56ac60>; layer = <UIWindowLayer: 0x10c56a1f0>>
| <UILayoutContainerView: 0x10c033570; frame = (0 0; 320 568); autoresize = W+H; gestureRecognizers = <NSArray: 0x10c045e40>; layer = <CALayer: 0x10c0340d0>>
| | <UINavigationTransitionView: 0x10c02f890; frame = (0 0; 320 568); clipsToBounds = YES; autoresize = W+H; layer = <CALayer: 0x10c0427e0>>
| | | <UIViewControllerWrapperView: 0x10c586540; frame = (0 0; 320 568); autoresize = W+H; layer = <CALayer: 0x10c584a10>>
| | | | <UIView: 0x10c0514b0; frame = (0 91; 320 386); autoresize = W+H; layer = <CALayer: 0x10c051570>>
| | | | | <TextViewWithPlaceholder: 0x10c04c400; baseClass = UITextView; frame = (0 0; 320 386); text = ''; clipsToBounds = YES; autoresize = W+H; gestureRecognizers = <NSArray: 0x10c04e1c0>; layer = <CALayer: 0
@cliss
cliss / gist:95771f78a664954a03b3
Created June 26, 2014 01:11
Accidentalbot Death
2014-06-26T01:10:17.378902+00:00 app[web.1]: events.js:74
2014-06-26T01:10:17.378536+00:00 app[web.1]:
2014-06-26T01:10:17.379267+00:00 app[web.1]: throw TypeError('Uncaught, unspecified "error" event.');
2014-06-26T01:10:17.379276+00:00 app[web.1]: ^
2014-06-26T01:10:17.381818+00:00 app[web.1]: TypeError: Uncaught, unspecified "error" event.
2014-06-26T01:10:17.381821+00:00 app[web.1]: at TypeError (<anonymous>)
2014-06-26T01:10:17.381823+00:00 app[web.1]: at WebSocket.emit (events.js:74:15)
2014-06-26T01:10:17.381825+00:00 app[web.1]: at Receiver.self._receiver.onerror (/app/node_modules/ws/lib/WebSocket.js:719:10)
2014-06-26T01:10:17.381827+00:00 app[web.1]: at Receiver.error (/app/node_modules/ws/lib/Receiver.js:301:8)
2014-06-26T01:10:17.381828+00:00 app[web.1]: at Receiver.processPacket (/app/node_modules/ws/lib/Receiver.js:187:10)
@cliss
cliss / gist:c618e3e20f9539f69568
Created July 1, 2014 02:43
Accidental Bot Death Again
2014-07-01T02:42:51.132915+00:00 app[web.1]: /app/node_modules/ws/lib/WebSocket.js:187
2014-07-01T02:42:51.132453+00:00 app[web.1]:
2014-07-01T02:42:51.133218+00:00 app[web.1]: else throw new Error('not opened');
2014-07-01T02:42:51.133233+00:00 app[web.1]: ^
2014-07-01T02:42:51.135282+00:00 app[web.1]: Error: not opened
2014-07-01T02:42:51.135285+00:00 app[web.1]: at WebSocket.send (/app/node_modules/ws/lib/WebSocket.js:187:16)
2014-07-01T02:42:51.135287+00:00 app[web.1]: at /app/accidentalbot.js:17:20
2014-07-01T02:42:51.135288+00:00 app[web.1]: at Array.forEach (native)
2014-07-01T02:42:51.135290+00:00 app[web.1]: at sendToAll (/app/accidentalbot.js:16:17)
2014-07-01T02:42:51.135292+00:00 app[web.1]: at WebSocket.<anonymous> (/app/accidentalbot.js:266:21)
@cliss
cliss / gist:2954118
Created June 19, 2012 13:19
June 2012 MacBook Options
+---------------+------------------+------------------+------------------------+
| | 13" MacBook Air | 15" MacBook Pro | 15" Retina MacBook Pro |
| | $2199 | $2999 | $2999 |
+---------------+------------------+------------------+------------------------+
| CPU | 2.0 Dual Core i7 | 2.3 Quad Core i7 | 2.6 Quad Core i7 |
| RAM | 8 GB | 8 GB | 16 GB |
| HD Size/Style | 512 GB SSD | 512 GB SSD | 512 GB SSD |
| Display Res | 1440x900 | 1680x1050 | 1440x900 effective |
| | | | 2880x1800 actual |
| Availability* | Now | Now | 3-4 weeks |
@cliss
cliss / gist:2959813
Created June 20, 2012 13:07
2012 MacBook Options on $2700 Budget
+---------------+--------------------------+-------------------------+------------------------+
| | 13" MacBook Air | 15" MacBook Pro | 15" Retina MacBook Pro |
| | $2450 | $2790 | $2750 |
+===============+==========================+=========================+========================+
| CPU | 2.0 Dual Core i7 $1500 | 2.3 Quad Core i7 $1800 | 2.3 Quad Core i7 $2200 |
+---------------+--------------------------+-------------------------+------------------------+
| RAM | 8 GB $100 | 16 GB (OWC) $170 | 16 GB $200 |
+---------------+--------------------------+-------------------------+------------------------+
| HD Size/Style | 512 GB SSD $500 | 120 GB SSD (OWC) $140 | 256 GB SSD |
| | | 750 GB 7200 RPM $150 | |
@cliss
cliss / NSURL+QueryAttributes.m
Created June 29, 2012 12:05 — forked from AdamSwinden/NSURL+QueryAttributes.m
NSURL Query Attributes
//
// NSURL+QueryAttributes.m
//
// Created by Adam Swinden on 29/06/2012.
// Copyright (c) 2012 The OTHER Media. All rights reserved.
//
#import "NSURL+QueryAttributes.h"
@implementation NSURL (QueryAttributes)
@cliss
cliss / mtnlion.sh
Created July 25, 2012 11:26
Mountain Lion Availability Checker
#!/bin/sh
#
# Modified source from here: http://pastie.org/4328940
# As linked to from here: http://www.tuaw.com/2012/07/24/maniacally-cuckoo-for-mountain-lion-app-store-checker-shell-scr/
#
# REQUIRES growl notify, available here: http://growl.info/downloads
#
##########################################
URL='http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewMultiRoom?fcId=489264329&mt=12'
@cliss
cliss / ParseOrDefault.cs
Last active October 11, 2015 07:07
ParseOrDefault<T>
#region Fields
private static Dictionary<Type, MethodInfo> _tryParseMethods = new Dictionary<Type, MethodInfo>();
#endregion Fields
#region Methods
/// <summary>
/// Invokes a TryParse(string, out T) method on the given input.
@cliss
cliss / gist:4505625
Last active December 10, 2015 22:58 — forked from twobitlabs/gist:4226365
// block typedef:
typedef void(^Block)();
typedef void(^ConditionalBlock)(BOOL);
typedef NSString*(^BlockThatReturnsString)();
typedef NSString*(^ConditionalBlockThatReturnsString)(BOOL);
// block property with typedef:
@property(copy)Block theBlock;
@cliss
cliss / NSArray+CLinq.h
Last active December 11, 2015 00:39
NSArray category that extends it with abilities inspired by Microsoft LINQ. See Readme.md below. Update 13/1/13: Heavily modified as per @jamiepinkham's recommendations. Thanks!
//
// NSArray+CLinq.h
//
// Created by Casey Liss on 12/1/13.
// Copyright (c) 2013 Casey Liss. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef id(^CLSelector)(id source);