Skip to content

Instantly share code, notes, and snippets.

@apisit
apisit / neo-cli-script.md
Last active March 13, 2018 06:06
Shell script to watch neo-cli process and restart it

Create launch.sh

note: change the path to your neo-cli

#!/bin/sh

ps auxw | grep neo-cli | grep -v grep > /dev/null

if [ $? != 0 ]
then
@apisit
apisit / zero_to_neo_blokchain.md
Created March 7, 2018 03:41
Zero to NEO Blockchain

Draft

From Zero to NEO blockchain

  1. What is Blockchain? Concept and fundamental overview of NEO Blockchain.
  2. Basic idea of cryptography used in NEO blockchain. Private key, public key, WIF.
  3. What type of applications that can use blockchain? Real-world applications.
  4. Story & Architecture of the application we are going to build.
  5. User Experience. UI/UX. Design.
  6. Tools and Frameworks you can use today
  7. Setting up a development environment. Private net, IDE, Compiler.
  8. Start building. Smart contract, backend ,frontend.
@apisit
apisit / gist:6073146
Created July 24, 2013 18:27
UIColor with RGBA. simply use rgba(149, 165, 166,1.0);
UIColor* rgba(CGFloat r,CGFloat g,CGFloat b,CGFloat a){
return [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a];
}
@apisit
apisit / gist:5893320
Created June 30, 2013 00:55
Remove that 1px line from UINavigationBar in iOS7
[self.navigationController.navigationBar.subviews enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) {
if ([obj isKindOfClass:NSClassFromString(@"_UINavigationBarBackground")]){
UIView* v = obj;
[[v.subviews objectAtIndex:1] removeFromSuperview];
*stop=YES;
}
}];
@apisit
apisit / gist:2970980
Created June 22, 2012 07:23
hide "Cancel" button ABPeoplePickerNavigationController and add another button performs like Cancel button.
//picker is ABPeoplePickerNavigationController
[self presentModalViewController:picker animated:YES];
UIButton* backButton= [[UIButton alloc]initWithFrame:CGRectMake(9, 25, 35, 35)];
[backButton setImage:[UIImage imageNamed:@"btnBack.png"] forState:UIControlStateNormal];
[backButton addTarget:picker.topViewController.navigationItem.rightBarButtonItem.target action:picker.topViewController.navigationItem.rightBarButtonItem.action forControlEvents:UIControlEventTouchUpInside];
[picker.navigationBar.superview addSubview:backButton];
//or you can use leftBarButtonItem instead of UIButton
//picker.topViewController.navigationItem.leftBarButtonItem= [[UIBarButtonItem alloc]initWithCustomView:backButton];
picker.topViewController.navigationItem.rightBarButtonItem=nil;