Skip to content

Instantly share code, notes, and snippets.

@scott-recker
scott-recker / KeyboardTableView.swift
Created January 11, 2019 17:48 — forked from douglashill/KeyboardTableView.swift
A UITableView that allows navigation and selection using a hardware keyboard.
// Douglas Hill, December 2018
// Made for https://douglashill.co/reading-app/
import UIKit
/// A table view that allows navigation and selection using a hardware keyboard.
/// Only supports a single section.
class KeyboardTableView: UITableView {
// These properties may be set or overridden to provide discoverability titles for key commands.
var selectAboveDiscoverabilityTitle: String?
@scott-recker
scott-recker / bundle_id.py
Created June 15, 2018 18:51
Returns the bundle id
import lldb
import commands
# Source: https://medium.com/itty-bitty-apps/scripting-lldb-with-python-31718eb4e501
def GetBundleIdentifier(debugger, command, result, internal_dict):
target = debugger.GetSelectedTarget()
process = target.GetProcess()
mainThread = process.GetThreadAtIndex(0)
currentFrame = mainThread.GetSelectedFrame()
@scott-recker
scott-recker / ppdb.py
Created June 15, 2018 18:48
Pretty print the app debug description while UI testing
import lldb
import commands
# To be able to use this tool run the following from the lldb command line
# or add the line to your .lldbinit file
# command script import <path to this file>/ppdb.py
def PrettyPrint(debugger, command, result, internal_dict):
target = debugger.GetSelectedTarget()
process = target.GetProcess()
@scott-recker
scott-recker / remove_Xcode.sh
Created February 9, 2018 23:32
Uninstall Xcode
echo "=======Uninstalling Existing Xcode==========="
rm -rf /Applications/Xcode.app
rm -rf /Library/Preferences/com.apple.dt.Xcode.plist
rm -rf ~/Library/Preferences/com.apple.dt.Xcode.plist
rm -rf ~/Library/Caches/com.apple.dt.Xcode
rm -rf ~/Library/Application Support/Xcode
rm -rf ~/Library/Developer/
rm -rf ~/Library/Developer/CoreSimulator
rm -rf /Library/Developer/CommandLineTools
- (void)testCompleteEnrollment {
BNRemoteDepositStartViewController *const startController = [BNRemoteDepositStartViewController new];
__block UIAlertController *alertController;
BNValidateBlock validator = extractArgTo(alertController);
id mockController = OCMPartialMock(startController);
[mockController setExpectationOrderMatters:YES];
OCMExpect([mockController setShouldShowSignUpSubmitted:YES]);
@scott-recker
scott-recker / brew-perms.sh
Created June 9, 2016 20:05 — forked from jaibeee/brew-perms.sh
Configure homebrew permissions to allow multiple users on MAC OSX. Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
#!/bin/sh
# Configure homebrew permissions to allow multiple users on MAC OSX.
# Any user from the admin group will be able to manage the homebrew and cask installation on the machine.
# allow admins to manage homebrew's local install directory
chgrp -R admin /usr/local
chmod -R g+w /usr/local
# allow admins to homebrew's local cache of formulae and source files
chgrp -R admin /Library/Caches/Homebrew