Skip to content

Instantly share code, notes, and snippets.

🌴
sudo ./build

Soheil Rashidi soheilpro

🌴
sudo ./build
Block or report user

Report or block soheilpro

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@soheilpro
soheilpro / main.m
Created Mar 30, 2014
Adds calendar event for Persian birthdays.
View main.m
#import <EventKit/EventKit.h>
#import <Foundation/Foundation.h>
int main(int argc, const char* argv[])
{
@autoreleasepool
{
NSString* name = @"PERSON'S NAME";
NSDateComponents* birthDate = [[NSDateComponents alloc] init];
View PieView.h
#import <UIKit/UIKit.h>
@interface PieView : UIView
@property (nonatomic) double value;
@end
@soheilpro
soheilpro / gitreplace.sh
Created Mar 25, 2014
Replace string in all Git history.
View gitreplace.sh
git filter-branch --tree-filter "find . -name '*.*' -exec sed -i '' -e 's/OLDSTRING/NEWSTRING/g' {} \;" -f
@soheilpro
soheilpro / gitchangename.sh
Created Mar 25, 2014
Change Git authors and committers.
View gitchangename.sh
git filter-branch -f --env-filter '
export GIT_COMMITTER_NAME="";
export GIT_AUTHOR_NAME="";
export GIT_COMMITTER_EMAIL="";
export GIT_AUTHOR_EMAIL="";
' --tag-name-filter cat -- --all
@soheilpro
soheilpro / NSObject+Retry.h
Created May 24, 2013
A simple Objective-C category for retrying a block for n number of times.
View NSObject+Retry.h
@interface NSObject (Retry)
- (void)for:(NSInteger)times timesTryBlock:(void(^)(void(^)(NSError*)))block;
- (void)for:(NSInteger)times timesTryBlock:(void(^)(void(^)(NSError*)))block callback:(void(^)(NSError* error))callback;
@end
You can’t perform that action at this time.