Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View drunknbass's full-sized avatar
🏠
Working from home

Aaron Alexander drunknbass

🏠
Working from home
View GitHub Profile
@drunknbass
drunknbass / toggledarkmode.command
Last active March 25, 2020 23:33
Toggle dark mode on currently running simulator
#! /bin/sh
booted_uuids=`xcrun simctl list devices | \
grep "(Booted)" | \
grep -E -o -i "([0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12})"`
all_uuids=($(echo $booted_uuids | tr ";" "\n"))
last_uuid=${all_uuids[${#all_uuids[@]}-1]}
exit_cleanly() {
@drunknbass
drunknbass / gist:6bba2c6b787c2426432342b54cbb8ed2
Created September 20, 2017 06:13
iOS Simulator Video Utils
brew install gifsicle
brew install xquartz
brew install ffmpeg
gifType=".gif"
movType=".m4v"
timestring=`date +"%m_%d_%Y"`
capturePath=~/Desktop/ScreenRecording_$timestring
displayDialog () {
@drunknbass
drunknbass / EnvConfig.swift
Created June 17, 2016 04:05
Firebase stage + Prod config
import Foundation
@objc(EnvConfig)
class EnvConfig: NSObject {
#if ENVConfigStaging
class var isProduction:Bool {
return false
}
@drunknbass
drunknbass / Foundation.py
Created January 13, 2016 00:57 — forked from steventroughtonsmith/Foundation.py
UIKit+UIFoundation & Foundation for Pythonista - autoconverted from SDK tbd (includes non-public SPI)
# coding: utf-8
from objc_util import *
NSAKDeserializer = ObjCClass('NSAKDeserializer')
NSAKDeserializerStream = ObjCClass('NSAKDeserializerStream')
NSAKSerializer = ObjCClass('NSAKSerializer')
NSAKSerializerStream = ObjCClass('NSAKSerializerStream')
NSAbstractLayoutGuide = ObjCClass('NSAbstractLayoutGuide')
NSAddressCheckingResult = ObjCClass('NSAddressCheckingResult')
NSAffineTransform = ObjCClass('NSAffineTransform')
@drunknbass
drunknbass / ios_imperatives_for_approval.md
Last active August 28, 2015 20:04 — forked from nickbauman/ios_imperatives_for_approval.md
Condensed iOS Human Interface Guidelines, formulated as imperatives.

Condensed iOS Human Interface Guidelines

Imperatives for AppStore approval

For iPhone app developers. Emphasis on getting the fastest app store approval. Everything stated as suggestion made into an imperative. When "violating" these imperatives, you can check for yourself what the caveats are. Generally speaking, deviating will more likely cause you app to be hung up in approval.

You can read this entire document in about 20 minutes. This is faster than reading and understanding the entire Human Interface Guidelines.

Overview

@drunknbass
drunknbass / docker-machine.rb
Last active August 29, 2015 14:16
/usr/local/Library/Formula/docker-machine.rb
class DockerMachine < Formula
homepage "https://github.com/docker/machine"
version "0.0.2"
## Version 0.0.2 doesn't build, so we install a downloaded binary
## unless this is a HEAD build.
# url "https://github.com/docker/machine/archive/0.0.2.tar.gz"
# sha1 "adcc7128abdbaae60ba3c58d6485df939c7e5510"
url "https://github.com/docker/machine/releases/download/0.0.2/machine_darwin_amd64"
sha1 "daecfe7e86a7c6a8dc444e03c5527f9db36b9c3e"
head "https://github.com/docker/machine.git"
#!/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'
installer -pkg /Packages/OSInstall.mpkg -target /Volumes/MyDisk
@drunknbass
drunknbass / gist:7775421
Created December 3, 2013 19:02
Pass list to Xcode via command line build (IPA)
# Usage:
# cd to dir with xcode.pbxproj and execute.
ARCHIVE_PATH='output.ipa'
BAR='\"B:A:R\"'
xcodebuild -scheme "My Scheme" -configuration "Enterprise" GCC_PREPROCESSOR_DEFINITIONS='FOO='$BAR'' archive -archivePath $ARCHIVE_PATH || { echo Enterprise BUILD failed"; exit 1; }
// The purpose of this gist is to provide examples of many real life date computations
// This is uploaded as a gist so that it can be copy and pasted into either a OS X or
// iOS project. You can either take it all "[Cmd]+[A], [Cmd]+[C]" or just a small piece.
// The results are fairly well formattes as log output and I recommend that you run this
// code to see the actual results yourself. Change some of the values and see what happens.
#pragma mark - Setup
NSString *line = @"–––––––––––––––––––––––––––––––––––––––––––––––––––––––";