This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove specific file from git cache | |
git rm --cached filename | |
# remove all files from git cache | |
git rm -r --cached . | |
git add . | |
git commit -m ".gitignore is now working" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# xcode-build-bump.sh | |
# @desc Auto-increment the build number every time the project is run. | |
# @usage | |
# 1. Select: your Target in Xcode | |
# 2. Select: Build Phases Tab | |
# 3. Select: Add Build Phase -> Add Run Script | |
# 4. Paste code below in to new "Run Script" section | |
# 5. Drag the "Run Script" below "Link Binaries With Libraries" | |
# 6. Insure that your starting build number is set to a whole integer and not a float (e.g. 1, not 1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://stackoverflow.com/questions/5714372/how-to-empty-caches-and-clean-all-targets-xcode-4 | |
Command-Option-Shift-K to clean out the build folder. Even better, quit Xcode and clean out ~/Library/Developer/Xcode/DerivedData manually. | |
Remove all its contents because there's a bug where Xcode will run an old version of your project that's in there somewhere. | |
(Xcode 4.2 will show you the Derived Data folder: choose Window > Organizer and switch to the Projects tab. Click the right-arrow to the right of the Derived Data folder name.) | |
In the simulator, choose iOS Simulator > Reset Content and Settings. | |
Finally, for completeness, you can delete the contents of /var/folders; some caching happens there too. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# although StackOverflow has this answer http://stackoverflow.com/a/1128583 | |
# but that code is unreadable, thus I have this (also based on a SO anower: http://stackoverflow.com/a/1128721 ) | |
# get the name of the branch we are on | |
_git_repo_name() { | |
gittopdir=$(git rev-parse --git-dir 2> /dev/null) | |
if [[ "foo$gittopdir" == "foo.git" ]]; then | |
echo `basename $(pwd)` | |
elif [[ "foo$gittopdir" != "foo" ]]; then | |
echo `dirname $gittopdir | xargs basename` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
whitelist="master|main|dev|develop" | |
git fetch --prune | |
if [ -z "$1" ]; then | |
list=$(git branch --merged | egrep -v "(^\*|$whitelist)") && | |
cmd='echo "$list" | xargs -n 1 git branch -d' | |
else | |
list=$(git branch -r --merged | grep "$1" | egrep -v "(>|$whitelist)") && | |
cmd='echo "$list" | cut -d'/' -f2- | xargs -n 1 git push "$1" --delete' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// MakeTransparentHoleOnOverlayView.swift | |
// | |
// Created by James Laurenstin on 2015-04-10. | |
// Copyright (c) 2015 Aldo Group Inc. All rights reserved. | |
// | |
import UIKit | |
class MakeTransparentHoleOnOverlayView: UIView { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sources="https://github.com/CocoaPods/Specs.git" | |
podRepo="INSERT YOUR PRIVATE POD REPO HERE" | |
echo "--------tag list--------" | |
git tag -l | |
echo "--------tag list--------" | |