Skip to content

Instantly share code, notes, and snippets.

@flipjorge
flipjorge / Directory.h
Created June 8, 2012 21:18
iOS Directories paths helper
#import <Foundation/Foundation.h>
@interface Directory : NSObject
+(NSString*)documents;
+(NSString*)temp;
+(NSString*)library;
+(NSString*)bundle;
+(NSString*)cache;
+(NSString*)preferences;
@leviathan
leviathan / UICustomTableViewController.m
Created December 5, 2013 07:29
UITableViewCell scaling animation
- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
// setup initial state (e.g. before animation)
cell.layer.shadowColor = [[UIColor blackColor] CGColor];
cell.layer.shadowOffset = CGSizeMake(10, 10);
cell.alpha = 0;
cell.layer.transform = CATransform3DMakeScale(0.5, 0.5, 0.5);
cell.layer.anchorPoint = CGPointMake(0, 0.5);
// define final state (e.g. after animation) & commit animation
[UIView beginAnimations:@"scaleTableViewCellAnimationID" context:NULL];
@strayer
strayer / second_skype.sh
Created June 21, 2014 07:25
Run a secondary instance of Skype on Mac OS X
#!/bin/bash
rm ~/Library/Application\ Support/Skype/Skype.pid
sleep 1
open -n "/Applications/Skype.app"