This file contains hidden or 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
[user] | |
email = ahmetabdi@gmail.com | |
name = Ahmet Abdi | |
[alias] | |
br = branch | |
; Example: g ch master...staging | |
ch = log --cherry --pretty=format:\"%C(auto)%h (%ar) %an: %s\" --date-order --reverse | |
ci = commit | |
co = checkout |
This file contains hidden or 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
### Show stack trace for 500 errors | |
### (adapted from https://gist.github.com/1079020) | |
# Given an application, yield to a block to handle exceptions | |
class ExceptionRaiserApp | |
def initialize(app) | |
@app = app | |
end | |
def call(env) |
This file contains hidden or 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
# ================================= | |
# = Warped shadow for any CGLayer = | |
# ================================= | |
def warpShadow(rect, offset) | |
size = rect.size | |
path = UIBezierPath.bezierPath | |
# Top/Right: ````| | |
path.moveToPoint([offset, offset]) | |
path.addLineToPoint([size.width - offset, offset]) |