Skip to content

Instantly share code, notes, and snippets.

View elmoswelt's full-sized avatar

Elmar Tampe elmoswelt

View GitHub Profile
@elmoswelt
elmoswelt / unusedImages.sh
Created July 29, 2012 16:10 — forked from vibrazy/unusedImages.sh
How to find unused images in an XCode project?
#!/bin/sh
# -------
# Usage sh unusedImages.sh (jpg|png|gif)
# -------
# Caveat
# 1 -
# NSString *imageName = [NSString stringWithFormat:@"image_%d.png", 1];
# This script would incorrectly list these images as unreferenced. For example, you might have
# This script will incorrectly think image_1.png is unreferenced.
# 2 - If you have a method, or variable with the same name as the image it won't pick it up
# define ALog(format, ...) NSLog((@"%s [L%d] " format), __PRETTY_FUNCTION__, __LINE__, ##__VA_ARGS__);
# ifdef DEBUG
# define DLog(format, ...) ALog(format, ##__VA_ARGS__);
# else
# define DLog(...)
# endif
@elmoswelt
elmoswelt / hack.sh
Created April 1, 2012 12:27 — 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
#
@elmoswelt
elmoswelt / removeRemote.sh
Created February 29, 2012 21:30 — forked from larsxschneider/removeRemote.sh
Remove all merged branches on a Github
git branch -a --merged | grep "remotes/origin/" | grep -v "remotes/origin/HEAD" | grep -v "remotes/origin/master" | xargs -n 1 basename | xargs -n 1 -I {} sh -c 'echo "Deleting" {}; git branch -d {}; git push --delete origin {}; git branch -dr {}'