Skip to content

Instantly share code, notes, and snippets.

bundle exec sidekiq -d -L log/sidekiq.log -C config/sidekiq.yml -e development
@ardarda
ardarda / xcode-buildtime
Created February 21, 2018 22:54
xcode buildtime
defaults write com.apple.dt.Xcode ShowBuildOperationDuration -bool YES
@ardarda
ardarda / gist:abd60e6595be2b719000efdafff4f29e
Created February 5, 2018 11:12
Provisioning profiles folder
~/Library/MobileDevice/Provisioning\ Profiles/
@ardarda
ardarda / bash-cheatsheet.sh
Created December 4, 2016 23:44 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@ardarda
ardarda / transparent_presentation_ios
Created April 6, 2016 12:56
transparent modal view controller presentation on ios
UIViewController *walkThru = [self.storyboard instantiateViewControllerWithIdentifier:@"WalkThroughScene"];
walkThru.providesPresentationContextTransitionStyle = YES;
walkThru.definesPresentationContext = YES;
[walkThru setModalPresentationStyle:UIModalPresentationOverCurrentContext];
[self.navigationController presentViewController:walkThru animated:YES completion:nil];
@ardarda
ardarda / gist:152550460eaf87982d73
Created December 3, 2015 05:14 — forked from ynechaev/gist:8123997
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;
@ardarda
ardarda / StdQueue.h
Created November 14, 2015 08:48
StdQueue Obj.c
#import <Foundation/Foundation.h>
@interface StdQueue : NSObject
@property(nonatomic, readonly) BOOL empty;
@property(nonatomic, readonly) NSUInteger size;
@property(nonatomic, readonly) id front;
@property(nonatomic, readonly) id back;
- (void)enqueue:(id)object;
@ardarda
ardarda / findUnusedPngFiles.sh
Created August 31, 2015 14:19
Finds unused png files in xcode when pasted into run shell script
#!/bin/sh
PROJ=`find . -name '*.xib' -o -name '*.[mh]'`
for png in `find . -name '*.png'`
do
name=`basename $png`
if ! grep -q $name $PROJ; then
echo "$png is not referenced"
fi
done
(•_•)
<) )/
./ \.
(•_•)
\( (>
./ \.
(•_•)
<) )~
@ardarda
ardarda / gist:67f8154645ebf3ee5a56
Created May 28, 2015 15:37
HTTP Basic Authentication AFNetworking 2.0
AFHTTPRequestOperationManager *manager = [[AFHTTPRequestOperationManager alloc] initWithBaseURL:[NSURL URLWithString:@"http://examplewebsite.com"]];
manager.requestSerializer = [AFHTTPRequestSerializer serializer];
[manager.requestSerializer setAuthorizationHeaderFieldWithUsername:@"userName" password:@"password"];