Skip to content

Instantly share code, notes, and snippets.

View gist:9127491 do |m| = 'MapBox'
m.version = '0.5.2'
m.summary = 'Open source alternative to MapKit.'
m.description = 'Open source alternative to MapKit supporting custom tile sources, offline use, and complete cache control.'
m.homepage = ''
m.license = 'BSD' = { 'Justin R. Miller' => '' }


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2


View AMPNavigationBar.m
// .h
@interface AMPNavigationBar : UINavigationBar
@property (nonatomic, assign) CGFloat extraColorLayerOpacity UI_APPEARANCE_SELECTOR;
// .m
View redis_install_centos.txt
BTW yum has last Redis too, remi repository at least.
$ sudo -i
$ yum list redis
$ redis.x86_64 2.6.13-1.el6.remi remi
But today we want compile redis from source (see
$ yum install make gcc tcl
$ cd /usr/local/src
View redis-server
# redis - this script starts and stops the redis-server daemon
# chkconfig: - 85 15
# description: Redis is a persistent key-value database
# processname: redis-server
# config: /etc/redis/redis.conf
# config: /etc/sysconfig/redis
# pidfile: /var/run/
# This script was written by Jay Graves for the 360iDev Conference.
# You can find the full slides available at
# This script requires Xcode and s3cmd
# You will need your own Amazon S3 account to upload files.
# Put your distribution certificates and keys in the System Keychain
# otherwise you will need to use security unlock-keychain



Install the two dependencies, ImageMagick and Ghostscript.

$ brew install imagemagick
$ brew install ghostscript
skeeet /
Created Jul 14, 2015
Update XCode build and version, based on git info
# Evgeny Aleksandrov
COMMITS_COUNT=`git rev-list develop | wc -l | tr -d ' '`
skeeet / pre-commit-clang-format
Last active Aug 29, 2015 — forked from wangkuiyi/pre-commit-clang-format
Git pre-commit hook that invokes clang-format to reformat C/C++/Objective-C source code.
View pre-commit-clang-format
# git pre-commit hook that runs an clang-format stylecheck.
# Features:
# - abort commit when commit does not comply with the style guidelines
# - create a patch of the proposed style changes
# modifications for clang-format by
# This file is part of a set of unofficial pre-commit hooks available
# at github.
skeeet /
Created Feb 10, 2012 — forked from wearhere/
Keep your current source file open in Xcode after a run completes (a.k.a don't die in main.m)
#! /bin/sh
# On alternate invocations, this script
# saves the path of the source file currently open in Xcode
# and restores the file at that path in Xcode.
# By setting Xcode (in Behaviors) to run this script when "Run Starts"
# and when "Run Completes", you can prevent it from switching to main.m
# when a run finishes.
# See