Skip to content

Instantly share code, notes, and snippets.

View cliss's full-sized avatar

Casey Liss cliss

View GitHub Profile
@cliss
cliss / TackyLights.html
Created December 9, 2013 20:10
Tacky Lights Navigator. This small bit of HTML & Javascript takes a series of addresses, and converts that into an ordered list. Each item in the list is an Apple Maps navigation link from [Your Current Location] to [That House]. This file is designed to be hosted in Dropbox and then added to your home screen on your iPhone.
<html>
<head>
<title>Tacky Lights</title>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<meta name="viewport" content="width=device-width" />
<!--<link rel="apple-touch-icon-precomposed" sizes="120x120" href="put-your-holiday-icon-here" />-->
</head>
<body>
<ol id="list"></ol>
<script type="text/javascript">
(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 / DebugTimer.cs
Created February 2, 2015 19:07
C# Debug Timer
public class DebugTimer : IDisposable
{
private readonly System.Diagnostics.Stopwatch _watch;
private readonly string _blockName;
/// <summary>
/// Creates a timer.
/// </summary>
/// <param name="blockName">Name of the block that's being timed</param>
public DebugTimer(string blockName)
@cliss
cliss / Playground.swift
Created March 16, 2016 23:17
Doing bad things with delegation
import UIKit
import CoreLocation
import XCPlayground
XCPlayground.XCPlaygroundPage.currentPage.needsIndefiniteExecution = true
class LocationDelegate: NSObject, CLLocationManagerDelegate {
override var description: String {
get {
return "LocationDelegate"
@cliss
cliss / RxUIWebViewDelegateProxy.swift
Created March 29, 2016 13:48
Reactive Extensions for UIWebView
//
// RxUIWebViewDelegateProxy.swift
//
// Created by Casey Liss on 24/3/16.
// Copyright © 2016 Casey Liss. All rights reserved.
//
import Foundation
import RxSwift
import RxCocoa
+--------+---------+-------------------------+
| Series | Episode | Description |
+--------+---------+-------------------------+
| 7 | 7 | Winter Olympics |
| 0 | 12 | Polar Challenge |
| 9 | 3 | Southeast America |
| 10 | 4 | Botswana |
| 12 | 8 | Vietnam |
| 14 | 6 | Bolivia |
| 0 | 33 | Northeast America |
@cliss
cliss / SearchController.swift
Last active June 2, 2017 18:07 — forked from irace/SearchController.swift
UISearchController replacement. Relies on a couple of internal categories, helpers, etc.
//
// SearchController.swift
// Prefer
//
// Created by Bryan Irace on 5/31/17.
// Copyright © 2017 Prefer. All rights reserved.
//
import RxSwift
import RxCocoa
@cliss
cliss / Brewfile
Last active April 12, 2024 01:38
Casey Liss's Brewfile, as of 31 October 2021
cask_args appdir: "/Applications"
tap "homebrew/cask-fonts"
brew "mas"
#### LAPTOPS ####
#cask "tripmode"
#### LAPTOPS ####
mas "Boop", id: 1518425043