This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git fetch --all | |
git reset --hard origin/master | |
git pull origin master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const IOST = require('iost') | |
const bs58 = require('bs58'); | |
const config = require("./config.dev.json") | |
/* config.dev.json like this: | |
{ | |
"rpcURL": "http://localhost:30001", | |
"privKey": "2yquS3ySrGWPEKywCPzX4RTJugqRh7kJSo5aehsLYPEWkUxBWA39oMrZ7ZxuM4fgyXYs2cPwh5n8aNNpH5x2VyK1" | |
} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const IOST = require('iost') | |
const bs58 = require('bs58'); | |
const config = require("./config.dev.json") | |
/* config.dev.json like this: | |
{ | |
"rpcURL": "http://localhost:30001", | |
"privKey": "2yquS3ySrGWPEKywCPzX4RTJugqRh7kJSo5aehsLYPEWkUxBWA39oMrZ7ZxuM4fgyXYs2cPwh5n8aNNpH5x2VyK1" | |
} | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const bs58 = require('bs58'); | |
const { SHA3 } = require('sha3') | |
const nacl = require('tweetnacl'); | |
const EC = require('elliptic').ec; | |
const secp = new EC('secp256k1'); | |
const BN = require('bn.js'); | |
const IOST = require('iost') | |
// equals to `IOSTCrypto.sha3(seed)` in contract | |
const hash = (seed) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const shell = require('shelljs') | |
const fs = require('fs') | |
const iwallet = 'iwallet --amount_limit "*:unlimited|ram:10000" --gas_limit 3000000 ' | |
// compile js contract to abi | |
const compile = (path) => { | |
let cmd = 'iwallet compile ' + path | |
console.log("👉", cmd) | |
shell.exec(cmd) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// debounce-throttle.swift | |
// | |
// Created by Simon Ljungberg on 19/12/16. | |
// License: MIT | |
// | |
import Foundation | |
extension TimeInterval { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// CapturedImageSampler.swift | |
// ARKitTest | |
// | |
// Created by Joshua Sullivan on 9/22/17. | |
// Copyright © 2017 Joshua Sullivan. All rights reserved. | |
// | |
import UIKit | |
import ARKit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath { | |
UITableViewRowAction *moreAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"More" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
// maybe show an action sheet with more options | |
[self.tableView setEditing:NO]; | |
}]; | |
moreAction.backgroundColor = [UIColor lightGrayColor]; | |
UITableViewRowAction *blurAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleDefault title:@"Blur" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){ | |
[self.tableView setEditing:NO]; | |
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (NSArray *)allProperties | |
{ | |
unsigned count; | |
objc_property_t *properties = class_copyPropertyList([self class], &count); | |
NSMutableArray *rv = [NSMutableArray array]; | |
unsigned i; | |
for (i = 0; i < count; i++) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Created by Calios on 2017-04-10. | |
// Copyright © 2017 Calios. All rights reserved. | |
// | |
@implementation NSString (URLValidate) | |
- (BOOL)isValidURL | |
{ | |
if ([self isIPAddress]) { |
NewerOlder