Skip to content

Instantly share code, notes, and snippets.

View hsinhoyeh's full-sized avatar

hsinhoyeh

  • footprint-ai
View GitHub Profile
1. unlock bootloader[1]
#1 get mobile token via
```
fastboot oem get_identifier_token
```
#2 upload token to htc mobile website
```
#### OS ####
ubuntu 16.04
#### install ####
sudo apt-get install -y squid
sudo apt-get install -y apache2-utils
#### generate passwords file #####
sudo htpasswd -c /etc/squid/passwords $username
@hsinhoyeh
hsinhoyeh / finalize-ico.py
Created August 15, 2017 06:25
script to run finalize stage for ico
import populus
from populus.utils.cli import request_account_unlock
from populus.utils.accounts import is_account_locked
from eth_utils import to_wei, from_wei
from ico.utils import check_succesful_tx
import yaml
config = {}
with open("crowdsales/example.deployment-report.yml", 'r') as stream:
try:
@hsinhoyeh
hsinhoyeh / private-network-configuration.md
Last active August 15, 2017 06:38
setup ethereum private network and delopy tokenmarket contracts

setup ethereum private network and delopy tokenmarket contracts

// my configuration
networkName=mynet
datadir=~/Library/Ethereum/mynet
ipcpath=~/Library/Ethereum/mynet/geth.ipc

1.create account address with password

NOTE: this ONLY works for opencart version 2.2.0
### run opencart with docker
git clone https://github.com/vimagick/dockerfiles.git && cd opencart
docker-compose -d up # this will launch mysql and opencart
// suppose <oepncart-id> is the container id for opencart
### get ecpay module
git clone https://github.com/ECPay/OpenCart2.0_PHP.git
@hsinhoyeh
hsinhoyeh / signup.js
Last active September 20, 2022 07:22
reacts: signup form using material ui
import React, {Component, PropTypes} from 'react'
import TextField from 'material-ui/TextField';
import getMuiTheme from 'material-ui/styles/getMuiTheme'
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
import Paper from 'material-ui/Paper';
import ReactTelephoneInput from 'react-telephone-input'
export default class signup extends Component {
constructor(props) {
@hsinhoyeh
hsinhoyeh / gist:f4cf1a9d4dd1ae94bb1b26ddaba166ca
Created October 11, 2016 07:41 — forked from aioutecism/gist:2638bb9eaf9ffc13348c
Set up a VPN Server (PPTP) on AWS and use it anywhere

Set up a VPN Server (PPTP) on AWS

  1. Create a EC2 instance using Ubuntu 14.04.
  2. In Secure Group Inbound Rules, add a SSH Rule(TCP, Port 22, 0.0.0.0/0) and a Custom TCP Rule(TCP, Port 1723, 0.0.0.0/0).
  3. Optional: Associate a Elastic IP with the instance.
  4. SSH into the instance.
  5. sudo apt-get install pptpd.
  6. sudo vim /etc/pptpd.conf. Uncomment localip 192.168.0.1 and remoteip 192.168.0.234-238,192.168.0.245.
  7. sudo vim /etc/ppp/pptpd-options. Uncomment ms-dns and ms-wins. Change the IP to Google's DNS like this:
@hsinhoyeh
hsinhoyeh / netpps.sh
Created August 28, 2016 04:56 — forked from joemiller/netpps.sh
shell: quick linux scripts for showing network bandwidth or packets-per-second
#!/bin/bash
if [ -z "$1" ]; then
echo
echo usage: $0 network-interface
echo
echo e.g. $0 eth0
echo
echo shows packets-per-second
@hsinhoyeh
hsinhoyeh / golang-restful-logcontainer
Last active April 26, 2016 07:19
golang restful logcontainer
```go
package api
import (
"fmt"
"hash/fnv"
"net/http"
"net/http/httptest"
"net/http/httputil"
dongmen:
- Din Tai Fung Restaurant
http://yui0201.pixnet.net/blog/post/148597838-%5B%E9%A3%9F%E8%A8%98%5D-%E9%BC%8E%E6%B3%B0%E8%B1%90%E8%8F%9C%E5%96%AE%E5%A4%A7%E5%85%A8%EF%BC%8C%E4%B8%8D%E6%98%AF%E5%8F%AA%E6%9C%89%E5%B0%8F%E7%B1%A0%E5%8C%85%E5%96%B2%EF%BD%9E
- Green onion pancake
http://oreoritz.pixnet.net/blog/post/109530560-%5B%E5%8F%B0%E5%8C%97%E3%80%82%E6%9D%B1%E9%96%80%E7%AB%99%5D%E6%B0%B8%E5%BA%B7%E8%A1%97%E5%A4%A9%E6%B4%A5%E8%94%A5%E6%8A%93%E9%A4%85%E3%80%82%E6%8E%92%E9%9A%8A%E4%BA%BA%E6%BD%AE
- tofu pudding
http://keeat.pixnet.net/blog/post/80293615-%E6%9D%B1%E9%96%80%E6%B1%9F%E8%A8%98%E8%B1%86%E8%8A%B1
- shaved ice with diced mango