Skip to content

Instantly share code, notes, and snippets.

View TsuiAnthonYVR's full-sized avatar

Anthony Tsui TsuiAnthonYVR

  • Voleo
  • Vancouver, Canada
View GitHub Profile
### Keybase proof
I hereby claim:
* I am matresstester on github.
* I am matresstester (https://keybase.io/matresstester) on keybase.
* I have a public key ASCP1GnT5bMP2iuBvBsZGsEKog-AU-a0KfUfP0GIukUDTAo
To claim this, I am signing this object:
@TsuiAnthonYVR
TsuiAnthonYVR / VansToken.sol
Created June 26, 2018 02:05
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.16;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
contract VansToken is MintableToken {
// Coin Properties
string public name = "Vans Token";
string public symbol = "Vans";
uint256 public decimals = 18;
@TsuiAnthonYVR
TsuiAnthonYVR / VansToken.sol
Created June 26, 2018 01:33
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
pragma solidity ^0.4.16;
import "https://github.com/OpenZeppelin/openzeppelin-solidity/contracts/token/ERC20/MintableToken.sol";
contract VansToken is MintableToken {
// Coin Properties
string public name = "Vans Token";
string public symbol = "Vans";
uint256 public decimals = 18;
@TsuiAnthonYVR
TsuiAnthonYVR / gist:4f91cf8406bf43aebe7cf54e0c968387
Created May 27, 2018 13:30
Anthony Tsui cover letter for ConsenSys Academy
Hello ConsenSys,
I have been developing software for the banking and brokerage industry since 2000, my most recent job was the CTO of
Voleo USA, a FINRA registered broker-dealer catering to investment clubs (groups of friends or family).
I built that brokerage from scratch, we had native Android, iOS, and Web apps, along with the brokerage backend,
it was in Java, PHP, Coffeescript, Javascript. Unfortunately, for most of my career I have been working on enterprise
systems so I do not have code on Github that you can review.
I have also been a Bitcoin enthusiast since 2014, not just for HODLing, but using it to make transactions, loans, etc.
@TsuiAnthonYVR
TsuiAnthonYVR / BluzelleService.php
Created May 17, 2018 03:54
Consuming a WebSocket API inside synchronous code
<?php
namespace App;
use React\EventLoop\Factory;
use React\Socket\Connector as SocketConnector;
use Ratchet\Client\Connector as ClientConnector;
use Clue\React\Block;
class BluzelleService
@TsuiAnthonYVR
TsuiAnthonYVR / gist:73e5e8cbc1ea2d0f75fd6865bbecb8ee
Last active January 27, 2018 06:20
Live Blogging Canaccord Blockchain Day
anthony [12:47]
Live blogging the Canaccord thing here
[12:48]
Met some Bitcoin Teller Machines up front, CEO is a friend.
Apparently they use Gemini exchange and is despirate to shorten the cash-to-bitcoin time because it takes 5 days for them
[12:49]
He is talking to some miners to get fresh coins to reduce transaction fees
@TsuiAnthonYVR
TsuiAnthonYVR / Day 1 Part 1.php
Created December 13, 2017 00:25
Day 1 Part 1
<?
$inputString = "599452122679583848618887218995255147535292914535728498346367894477722813939811764912984385383712422835368955117812935354833177978374291536134322914153833468825481971481366443926879197821555367777283885332883534548471122976747772994847339122877648645668626511487568653692649863449569569225215937397163154359465695449411714929464887666115753485193893395478761214643657118314449467995245232598921248121913968613813931491585277462871844353241552477664287713176335941382298661931286288968947239777696866214875318776779376265413342934951532433387778792546554158858498882713667637612888781916167246714257926199548273187897928457324653368883522635269112216984783294351375892419423234598872674178924737918431978238775761313874281782631637623344352185788167822869486368197144544266325142318417762897789996391999752946835495354861296669952671864913278992258452455669771513316337646325622518183325769282133166553268128821694945127684441915424542343414183491395185455125333978553339594981511562281156599925255523494455
@TsuiAnthonYVR
TsuiAnthonYVR / Day 1 Part 2.php
Created December 13, 2017 00:23
Day 1 Part 2
<?
$original = str_split($inputString);
$characters = array_merge($original, $original);
$total = 0;
$stepsHalfWay = intval(count($original) / 2);
for ($i = 0; $i < count($original); $i++) {
$char = $characters[$i];
$match = $characters[$i + $stepsHalfWay];
if ($char === $match) {
$total += intval($char);
@TsuiAnthonYVR
TsuiAnthonYVR / Day 2 Part 2.php
Created December 13, 2017 00:22
Day 2 Part 2
$rows = explode("\n", $xml);
$checksum = 0;
foreach ($rows as $row) {
$cells = [];
foreach (explode("|", $row) as $cell) {
$cells[] = intval($cell);
}
sort($cells);
for ($outer = 0; $outer < count($cells); $outer++) {
for ($inner = $outer + 1; $inner < count($cells); $inner++) {
@TsuiAnthonYVR
TsuiAnthonYVR / Day7.swift
Created December 13, 2017 00:19
Advent of Code Day 7
//: Playground - noun: a place where people can play
import Foundation
let inputString: String = """
pbga (66)
xhth (57)
ebii (61)
havc (66)
ktlj (57)
fwft (72) -> ktlj, cntj, xhth