Skip to content

Instantly share code, notes, and snippets.

View goopi's full-sized avatar

Gustavo Leguizamon goopi

  • Buenos Aires, Argentina
View GitHub Profile
afconvert -d LEI16 -f 'caff' input.wav output.caf
@goopi
goopi / nsarray-slice.m
Last active December 29, 2015 18:09 — forked from mikeash/test.m
// clang -framework Foundation -fobjc-arc -O3 test.m
#import <Foundation/Foundation.h>
@interface Slice : NSObject
@property NSInteger start;
@property NSInteger length;
@end
@implementation Slice
@goopi
goopi / png2favicon.md
Created September 13, 2013 17:02
favicon.ico from png files

$ png2ico favicon.ico favicon-16.png favicon-32.png favicon-64.png

@goopi
goopi / tumblrproxy
Created September 4, 2013 17:17
An example of proxying a Tumblr blog as a subdirectory in nginx (w/o regexs)
server {
# ...
location / {
proxy_set_header Accept-Encoding '';
proxy_pass http://<NAME>.tumblr.com/;
sub_filter http://<NAME>.tumblr.com/post /post;
sub_filter_once off;
}

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/
  Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'

UIActivityIndicatorView

@goopi
goopi / cd-debug.md
Created August 26, 2013 23:21
Core Data Debugging Fetching

Core Data Debugging Fetching

Pass the following as an argument to the application:

-com.apple.CoreData.SQLDebug 1
@goopi
goopi / del-remote-git-tag.md
Created August 26, 2013 14:33
Delete a remote Git tag #git
$ git tag -d v1.0
$ git push origin :refs/tags/v1.0
require('crypto').randomBytes(48).toString('hex');
@goopi
goopi / tmux-cp-fix.md
Created July 25, 2013 17:11
Tmux copy & paste on OSX

Tmux copy & paste on OSX

Setup

$ brew install reattach-to-user-namespace

Add the following to ~/.tmux.conf

@goopi
goopi / vim-brew.sh
Created July 17, 2013 17:34
Install vim with brew #vim
$ brew install mercurial
$ brew install vim
# if /usr/bin is before /usr/local/bin in your $PATH,
# hide the system Vim so the new version is found first
$ sudo mv /usr/bin/vim /usr/bin/vim72