Skip to content

Instantly share code, notes, and snippets.

#!/bin/sh
# Some things taken 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'
green='\033[0;32m'
# OSX for Hackers (Mavericks/Yosemite)
#
# Source: https://gist.github.com/brandonb927/3195465
#!/bin/sh
# Some things taken from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Ask for the administrator password upfront
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@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
#
#
# Uncrustify Configuration File
# File Created With UncrustifyX 0.2 (140)
#
# Alignment
# ---------
## Alignment
@eran3d
eran3d / README.md
Last active August 29, 2015 14:22 — forked from hofmannsven/README.md

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 / 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
@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 / 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"
}