Skip to content

Instantly share code, notes, and snippets.

Ashton Williams Ashton-W

Block or report user

Report or block Ashton-W

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Ashton-W
Ashton-W / Extra Logging for My Great App.mobileconfig
Created Oct 26, 2016 — forked from zwaldowski/Extra Logging for My Great App.mobileconfig
Apple Configuration Profile for Logging in iOS 10 and macOS Sierra
View Extra Logging for My Great App.mobileconfig
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<!-- iOS 10, macOS Sierra, and friends bring a new logging subsystem that's
supposed to scale from the kernel, up to frameworks, and up to apps. It defaults
to a more regimented, privacy-focused approach that large apps and complex
systems need.
It, along with Activity Tracing introduced in iOS 8 and macOS Yosemite and the
Console app in macOS Sierra, hope to help you graduate from caveman debugging to
@Ashton-W
Ashton-W / RemoveATSExceptions.sh
Last active Sep 9, 2018
Xcode Build Phase Script to remove NSAppTransportSecurity from the Info.plist based on the custom REMOVE_ATS_EXCEPTIONS build setting.
View RemoveATSExceptions.sh
#!/usr/bin/env bash
# Build Phase Script for removing NSAppTransportSecurity exceptions from Info.plist
# https://gist.github.com/Ashton-W/07654259322e43a2b6a50bb289e72627
set -o errexit
set -o nounset
if [[ -z "${REMOVE_ATS_EXCEPTIONS+SET}" ]]; then
echo "error: User Defined Build Setting REMOVE_ATS_EXCEPTIONS must be set"
exit 1
@Ashton-W
Ashton-W / pi.fish
Created Jul 13, 2016
CocoaPods Fish Functions
View pi.fish
function pi --description 'pod install'
if test -e Gemfile
command bundle exec pod install --no-repo-update
else
command pod install --no-repo-update
end
end
@Ashton-W
Ashton-W / Issue.md
Last active Nov 7, 2019
GitHub Markdown toggle code block
View Issue.md
Click to toggle contents of `code` ``` CODE! ```
Click to toggle contents of other `code` ```
@Ashton-W
Ashton-W / .lldbinit
Created Apr 19, 2016
LLDB sim_location command (lldbinit)
View .lldbinit
command alias sim_location expr (void)NSLog(@"Printing Simulator App Paths:\n\nBundle:\n%@\n\nDocuments:\n%@\n\n", [[NSBundle mainBundle] resourcePath], [[[[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask] lastObject] resourceSpecifier]);
@Ashton-W
Ashton-W / ExpectationDelegateProxy.h
Last active Oct 10, 2017
Implementation of an XCTestExpectation for delegate calls. More here http://www.ashton-w.net/2016/01/23/Asynchronous-Testing.html
View ExpectationDelegateProxy.h
#import <Foundation/Foundation.h>
#import <XCTest/XCTest.h>
NS_ASSUME_NONNULL_BEGIN
@interface ExpectationDelegateProxy : NSProxy
@property (nonatomic) SEL selector;
@property (nonatomic) Protocol *protocol;
@property (nonatomic) XCTestExpectation *expectation;
@Ashton-W
Ashton-W / RevealBuildPhase.sh
Last active Aug 3, 2018
Build Phase Script for copying and signing libReveal in Debug Configuration
View RevealBuildPhase.sh
#!/usr/bin/env bash
# Build Phase Script for copying and signing libReveal based on Configuration
# https://gist.github.com/Ashton-W/6db611ac93be2f8bad7f
set -o errexit
set -o nounset
LIBREVEAL_PATH="/Applications/Reveal.app/Contents/SharedSupport/iOS-Libraries/libReveal.dylib"
INJECT_REVEAL="${INJECT_REVEAL:-NO}"
@Ashton-W
Ashton-W / WWDC Video Transcripts No Scroll.user.js
Created Oct 13, 2015
User script that removes max-height of WWDC video transcripts, no more scrolls
View WWDC Video Transcripts No Scroll.user.js
// ==UserScript==
// @name WWDC Video Transcripts No Scroll
// @namespace http://wwdc/
// @version 0.1
// @description removes max-height of WWDC video transcripts, no more scrolls
// @author You
// @include https://developer.apple.com/videos/play/*
// @grant GM_addStyle
// ==/UserScript==
@Ashton-W
Ashton-W / CopyConfigurationResources.sh
Last active Apr 1, 2018
CopyConfigurationResources Xcode Build Phase Script
View CopyConfigurationResources.sh
#!/usr/bin/env bash
# Build Phase Script for use in Xcode
# Copy Resources based on Configuration
#
# https://gist.github.com/Ashton-W/a47ec8b128ecbe470632
set -o nounset
# From Build Environment
View osx-for-hackers.sh
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
You can’t perform that action at this time.