Skip to content

Instantly share code, notes, and snippets.

View funky-monkey's full-sized avatar

Sidney de Koning funky-monkey

View GitHub Profile
@funky-monkey
funky-monkey / uncrustify.cfg
Created February 13, 2014 08:55
Uncrustify Xcode Code formatter configuration file - uncrustify.cfg
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.4.3 (252)
#
# Alignment
# ---------
## Alignment
@funky-monkey
funky-monkey / .gitignore
Created February 17, 2014 14:58
Xcode 5 .gitignore
# Xcode
.DS_Store
*.pbxuser
*.mode1v3
*.mode2v3
*.perspectivev3
*.xcworkspace
*.moved-aside
!default.pbxuser
!default.mode1v3
@funky-monkey
funky-monkey / warning_todo.sh
Last active January 27, 2017 18:07
Generate Xcode warnings from TODO's and FIXME's for Swift
#!/bin/bash
# Search all TODO, FIXME, ???, !!! and XXX from .swift files
# To install in Xcode and 'Build Phase' and add 'New Run Script Phase'
KEYWORDS="TODO:|FIXME:|\?\?\?:|\!\!\!:XXX:"
find "${SRCROOT}" \( -name "*.swift" \) -print0 | xargs -0 egrep --with-filename --line-number --only-matching "($KEYWORDS).*\$" | perl -p -e "s/($KEYWORDS)/ warning: \$1/"
<!--
File should live in ~/Library/Developer/Xcode/UserData/xcdebugger/Breakpoints_v2.xcbkptlist
-->
<?xml version="1.0" encoding="UTF-8"?>
<Bucket
type = "2"
version = "2.0">
<Breakpoints>
<BreakpointProxy
@funky-monkey
funky-monkey / update_settings.sh
Last active September 23, 2015 13:20
Updating Settings.bundle/Root.plist with version information. Don't forget to update the name of your App-Info.plist
GIT_COMMIT_NUM=`git log --pretty=format:'' | wc -l | tr -d ' '`
SPRINT_VERSION=`/usr/libexec/PlistBuddy -c 'Print CFBundleShortVersionString' 'App-Info.plist'`
echo "Updating the build number: $GIT_COMMIT_NUM"
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $GIT_COMMIT_NUM" "App-Info.plistt"
echo "Updating the version in Settings.plist: $SPRINT_VERSION"
echo "Updating the build in Settings.plist: $GIT_COMMIT_NUM"
@funky-monkey
funky-monkey / show_ipa_metadata.sh
Created November 30, 2015 16:09 — forked from niw/show_ipa_metadata.sh
Extract iTunesMetadata.plist from ipa file, read it and dump it.
#!/usr/bin/env bash
TEMP_PLIST=/tmp/metadata.plist
for i in "$@"; do
if unzip -p "$i" iTunesMetadata.plist >"$TEMP_PLIST"; then
name=$(/usr/libexec/PlistBuddy -c 'Print :itemName' "$TEMP_PLIST")
id=$(/usr/libexec/PlistBuddy -c 'Print :itemId' "$TEMP_PLIST")
appleid=$(/usr/libexec/PlistBuddy -c 'Print :appleId' "$TEMP_PLIST" 2>/dev/null ||
/usr/libexec/PlistBuddy -c 'Print :com.apple.iTunesStore.downloadInfo:accountInfo:AppleID' "$TEMP_PLIST" 2>/dev/null ||
@funky-monkey
funky-monkey / iTunesMetadata.plist
Last active October 11, 2021 07:48
This is the structure of a sample iTunesMetadata.plist file. If you want to secure your apps better you can use this to do a check for specific nodes so you can do jailbrake detection.
<?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">
<dict>
<key>apple-id</key>
<string>[email protected]</string>
<key>artistId</key>
<integer>000000000</integer>
<key>artistName</key>
<string>XXXXXXXX</string>
@funky-monkey
funky-monkey / gist:c597d720cedb7432d6af
Created February 17, 2016 20:32 — forked from Bouke/gist:11261620
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@funky-monkey
funky-monkey / API.md
Created April 29, 2016 08:11 — forked from iros/API.md
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

Sometimes we need to open Setting's Preferences not of our app, but of the iPhone itself. What should we do to acomplish this?

[UPDATE: Added Wallet And Apple Pay below]

[UPDATE: Changed prefs for Bluetooth]

keyboard