Skip to content

Instantly share code, notes, and snippets.

View jtreanor's full-sized avatar

James Treanor jtreanor

  • Intercom
  • Dublin, Ireland
View GitHub Profile
@jtreanor
jtreanor / 0.20.3.txt
Last active January 11, 2017 14:23
Calabash performance: 0.20.3 vs 0.20.4
➜ CalSmokeApp git:(BenchmarkQuery-0.20.3) bundle exec cucumber -t ~@clear_text
Using the default, simulator and common profiles...
@alerts
Feature: Alerts
In order to demonstrate interactions with alerts
As a Calabash maintainer
I want some Scenarios that show Calabash working with alerts
INFO: query 'tabBarButton' took 718.1481709994841 milliseconds
INFO: query '* marked:'special page'' took 1144.5110730128363 milliseconds
@jtreanor
jtreanor / SRWebSocketCloser.h
Created November 15, 2015 19:28
This simple class takes a SRWebsocket, closes it and retains it until it has been closed. It should prevent https://github.com/square/SocketRocket/pull/169 and other issues.
@import Foundation;
@class SRWebSocket;
/**
This simple class takes a SRWebsocket, closes it and retains it until it has been closed.
*/
@interface SRWebSocketCloser : NSObject
+ (instancetype)sharedInstance;
- (void)addWebSocket:(SRWebSocket *)socket;

Keybase proof

I hereby claim:

  • I am jtreanor on github.
  • I am jtreanor (https://keybase.io/jtreanor) on keybase.
  • I have a public key whose fingerprint is C6E2 31B0 7208 1996 4F88 B37F BF5E 4F98 BD5F DECE

To claim this, I am signing this object:

@jtreanor
jtreanor / sim_reset.py
Last active August 29, 2015 14:10
This scipt finds and resets all your iOS simulators. Xcode 6+
#!/usr/bin/python
import subprocess, re
process = subprocess.Popen("xcrun simctl list".split(), stdout=subprocess.PIPE)
sim_list = process.communicate()[0]
re_uuid = re.compile("[0-F]{8}-[0-F]{4}-[0-F]{4}-[0-F]{4}-[0-F]{12}", re.I)
uuids = re_uuid.findall(sim_list)