Skip to content

Instantly share code, notes, and snippets.

View sdtsui's full-sized avatar

Daniel Tsui sdtsui

View GitHub Profile
@sdtsui
sdtsui / update_curl.sh
Created August 8, 2017 02:32 — forked from fideloper/update_curl.sh
Update curl on Ubuntu 14.04
#! /usr/bin/env bash
# Install any build dependencies needed for curl
sudo apt-get build-dep curl
# Get latest (as of Feb 25, 2016) libcurl
mkdir ~/curl
cd ~/curl
wget http://curl.haxx.se/download/curl-7.50.2.tar.bz2
tar -xvjf curl-7.50.2.tar.bz2

Welcome

This guide is intended to provide resources for those wanting to help test Metropolis EIPs. The CPP team is currently in the middle of a migration from EthDocs to a documentation site that is more dedicated to CPP-Ethereum so the documentation on creating tests for Ethereum using testeth is scattered. Everything you will need to get started should be compiled below.

Suggested skill sets needed to create and run tests

  1. Ability to compile/build testeth and LLL compiler or run a docker file.
  2. Ability to understand the LLL Ethereum language.
  3. Ability to understand EIPs, particuarly [those that are going to be going into t
@sdtsui
sdtsui / reflection.go
Created September 22, 2016 03:23 — forked from drewolson/reflection.go
Golang Reflection Example
package main
import (
"fmt"
"reflect"
)
type Foo struct {
FirstName string `tag_name:"tag 1"`
LastName string `tag_name:"tag 2"`

System Design Cheatsheet

Step One: Framing The Problem a.k.a get the MVP

  • Identify the use cases that are in scope
  • Determine constraints based on scoped use cases

use case : the things your system needs to be do.

constraints : the things your system will have to consider to be able to do stuff

@sdtsui
sdtsui / Enhance.js
Created June 17, 2016 22:28 — forked from sebmarkbage/Enhance.js
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@sdtsui
sdtsui / marty-to-redux.md
Created March 24, 2016 01:54 — forked from jhollingworth/marty-to-redux.md
Translating Marty to Redux

#Translating Marty to Redux

Some people have asked how I've translated a Marty app to Redux. Once you get your head around how Redux works I found concepts in Marty translated easily. Below is side-by-side comparison of the two libraries to help you along the way.

Also if you're looking for some devtools, check out redux-devtools.

##Constants

Marty

@sdtsui
sdtsui / underramdash.js
Created January 31, 2016 11:07 — forked from Cfeusier/underramdash.js
2kb unminified/unzipped drop-in for the usual utility functions
var underramdash = {
each: each,
map: map,
reduce: reduce,
filter: filter,
flatten: flatten,
uniq: uniq,
extend: extend,
every: every,
identity: identity