Skip to content

Instantly share code, notes, and snippets.


Soheil Rashidi soheilpro

View GitHub Profile
View PieView.h
#import <UIKit/UIKit.h>
@interface PieView : UIView
@property (nonatomic) double value;
soheilpro /
Created Mar 25, 2014
Change Git authors and committers.
git filter-branch -f --env-filter '
export GIT_AUTHOR_NAME="";
' --tag-name-filter cat -- --all
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[])
NSString* name = @"PERSON'S NAME";
NSDateComponents* birthDate = [[NSDateComponents alloc] init];
soheilpro / csvparser.js
Last active Aug 29, 2015
CSV Parser in JS
View csvparser.js
function ValueToken(value) {
this.value = value;
function CommaToken() {
function NewLineToken() {
soheilpro / example
Created Jul 12, 2015
Convert JavaScript object to JSON
View example
echo '{name: "soheil", age: 123}' | tojson
# Output:
# {"name":"soheil","age":123}
soheilpro /
Created Jul 29, 2015
Simple web site monitoring script.
#!/usr/bin/env bash
DATE=$(TZ=Asia/Tehran date +"%Y-%m-%d %H:%M")
TIMESTAMP=$(TZ=Asia/Tehran date +"%Y%m%d%H%M")
# URLs
git config --global alias.fu = "!f() { git commit --fixup $1; EDITOR=cat git rebase --interactive --autosquash $1~; }; f"

Keybase proof

I hereby claim:

  • I am soheilpro on github.
  • I am soheilpro ( on keybase.
  • I have a public key whose fingerprint is EEA6 88EB 1846 D21A 94FE 61BC 5CD3 FD19 5F77 2375

To claim this, I am signing this object:

View bars.json
"time": 1438415960000,
"open": 2570,
"high": 2630,
"low": 2513,
"close": 2522,
"volume": 1336207
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;
You can’t perform that action at this time.