Skip to content

Instantly share code, notes, and snippets.

@ardarda
ardarda / gist:abd60e6595be2b719000efdafff4f29e
Created February 5, 2018 11:12
Provisioning profiles folder
~/Library/MobileDevice/Provisioning\ Profiles/
@ynechaev
ynechaev / gist:8123997
Last active June 9, 2017 23:18
UITableViewCell popular animation (flipping around Y axis, depending on scroll direction)
@interface YourViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
UIImageOrientation scrollOrientation;
CGPoint lastPos;
}
- (void) tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
if (tableView.isDragging) {
UIView *myView = cell.contentView;
CALayer *layer = myView.layer;
CATransform3D rotationAndPerspectiveTransform = CATransform3DIdentity;
@zflat
zflat / pg_migrate_steps.sh
Last active March 17, 2022 04:51
Migrate pg dump from Heroku to local sqlite3 development (and beyond)
# Export the Heroku PG database to a local dump file
# https://devcenter.heroku.com/articles/heroku-postgres-import-export#export
heroku pgbackups:capture
curl -o latest.dump `heroku pgbackups:url`
# Install postregs & Setup password
# https://help.ubuntu.com/community/PostgreSQL
# List databases
sudo -u postgres psql -l
@demigod19892012
demigod19892012 / [iOS] List Files In A Directory And Subdirectories.m
Created April 5, 2013 02:26
[iOS] List Files In A Directory And Subdirectories
NSFileManager *fileMgr;
NSString *entry;
NSString *documentsDir;
NSDirectoryEnumerator *enumerator;
BOOL isDirectory;
// Create file manager
fileMgr = [NSFileManager defaultManager];
// Path to documents directory