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 / 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

installer -pkg /Packages/OSInstall.mpkg -target /Volumes/MyDisk
#!/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'
@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"
- (UIImage*)getImageFromWindow:(UIWindow*)aWindow {
UIGraphicsBeginImageContext(aWindow.bounds.size);
[aWindow.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
@drunknbass
drunknbass / gist:986295
Created May 23, 2011 05:59
Fix for discarded touch events on iOS
while( CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01f, FALSE) ==
     kCFRunLoopRunHandledSource);
@drunknbass
drunknbass / hack.sh
Created April 1, 2012 00:23 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@drunknbass
drunknbass / gist:2872648
Created June 5, 2012 04:31
iCloud cheat sheet
via http://infinite-labs.net/bp/#icloud
dancing the sweet sync tango
Mon 4th
iCloud file sync is in my opinion not adopted enough. It may be that the docs are long. Here is iCloud in a couple of useful nuggets:
Turn on iCloud in your entitlements. In Xcode, you can find 'em in your target, under the Summary tab, at the bottom. Turn on 'Enable Entitlements' and press + on the iCloud Containers list.
You get a folder. Stuff in it gets synchronized around. This is the easy part. You can use the -[NSFileManager URLForUbiquityContainerIdentifier:] call to find out where the container is.
@drunknbass
drunknbass / SpringBoardServices_DUMP_6.0
Created June 15, 2012 05:13
SpringBoard Services 6.0 dump
/SpringBoardServices:
(__TEXT,__text) section
_SBAppWillOrderInContext:
30bf0428 b590 push {r4, r7, lr}
30bf042a af01 add r7, sp, #4
30bf042c b08e sub sp, #56
30bf042e f64134ca movw r4, 0x1bca
30bf0432 f10d0c2c add.w ip, sp, #44 @ 0x2c
30bf0436 f6c0044f movt r4, 0x84f
30bf043a 447c add r4, pc
@drunknbass
drunknbass / gist:3016703
Created June 29, 2012 08:42
Springboard stuff
// Taken from http://www.opensource.apple.com/source/lldb/lldb-69/tools/debugserver/source/RNBServices.cpp
RNBServices.cpp [plain text]
//===-- RNBServices.cpp -----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.