Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# Bash Helper Parameters
set -o errexit # Exit on uncaught errors
set -o nounset # Don't allow unset variables
set -o pipefail # Fail pipe on first error
# Variables
xcodegen_yaml="https://gist.githubusercontent.com/eran3d/61018abb8d7736a0a380fa9fda20c6f9/raw/project.yml?cachebust=xxx"
@eran3d
eran3d / project.yml
Last active February 6, 2019 22:47
xcodegen template
name: "${project_name}"
options:
bundleIdPrefix: ink.jal
targets:
"${project_name}":
type: application
platform: iOS
deploymentTarget: "10.0"
sources: [Sources]
settings:
@eran3d
eran3d / JiraOmniFocus.py
Created April 7, 2017 12:51 — forked from adammorris/JiraOmniFocus.py
Example snippet on how to sync from JIRA to OmniFocus.
"""
Example snippet on how to sync from JIRA to omnifocus.
The main function is OmniFocus.sync_jira_to_omnifocus().
OmniFocus.process_jira_data() is customized to filter projects based on my own needs and will need updating.
"""
from applescript import AppleScript, ScriptError
from datetime import datetime
from json import JSONDecoder
from logging import getLogger
@eran3d
eran3d / uiimage_check.sh
Created January 23, 2017 09:59 — forked from vdugnist/uiimage_check.sh
Check if UIImage exists in assets
#!/bin/bash
function show_code {
ERROR_LOCATION=$(grep -Ron "\[UIImage imageNamed:\s*@\"$1\"\s*\]" $PROJECT_NAME)
if [[ -z $ERROR_LOCATION ]]; then
ERROR_LOCATION=$(grep -Ron "UIImage(named\:\s*\"$1\"\s*)" $PROJECT_NAME)
fi
ERROR_LOCATION=$(echo $ERROR_LOCATION | cut -d ':' -f 1,2)
echo "$ERROR_LOCATION: error: Missing imageset with name $1"
}
@eran3d
eran3d / iOS 7 dynamic font mappings
Created October 24, 2016 11:59 — forked from nuthatch/iOS 7 dynamic font mappings
What is UIFontTextStyleHeadline *really*? Dump out preferredFontForTextStyle for UIFontTextStyleHeadline, UIFontTextStyleSubheadline, UIFontTextStyleBody, UIFontTextStyleFootnote, UIFontTextStyleCaption1, UIFontTextStyleCaption2 to examine the font name, weight, and point size.
+ (void)describePreferredFonts
{
static NSArray *textStyles;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
textStyles = @[UIFontTextStyleHeadline,
UIFontTextStyleSubheadline,
UIFontTextStyleBody,
UIFontTextStyleFootnote,
UIFontTextStyleCaption1,
@eran3d
eran3d / update xcode plugins
Created December 15, 2015 08:04
Run this script when xcode plugins fail to load
xcodePath=`xcode-select -p`
xcodeUUID=`defaults read "$xcodePath/../../Contents/Info.plist" DVTPlugInCompatibilityUUID`
echo $xcodeUUID
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add $xcodeUUID

Mac OSX 10.10 Yosemite Development Install

THIS IS A WORK IN PROGRESS USING THE YOSEMITE BETA - DO NOT RELY ON IT!

Fresh Install

Install OSX on a fresh drive. I recommend using Disk Utility to repartition the entire drive as 1 partition, as this clears any hidden volumes.

Once the initial install is complete, the OSX Setup Assistant will create your first adminstrator account.

@eran3d
eran3d / README.md
Last active August 29, 2015 14:22 — forked from hofmannsven/README.md
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment
@eran3d
eran3d / .gitignore
Last active August 29, 2015 14:14 — forked from adamgit/.gitignore
#########################
# .gitignore file for Xcode4 and Xcode5 Source projects
#
# Apple bugs, waiting for Apple to fix/respond:
#
# 15564624 - what does the xccheckout file in Xcode5 do? Where's the documentation?
#
# Version 2.3
# For latest version, see: http://stackoverflow.com/questions/49478/git-ignore-file-for-xcode-projects
#