Skip to content

Instantly share code, notes, and snippets.

View balduran's full-sized avatar

balduran balduran

View GitHub Profile

【Ethereum 智能合約開發筆記】不用自己跑節點,使用 Infura 和 web3.js 呼叫合約

Infura Logo From Consensys

Infura 提供公開的 Ethereum 主網和測試網路節點。到 Infura 官網申請,只要輸入一點基本資料和 Email,就可以收到 API-key。

Infura API Key


【Ethereum 智能合約開發筆記】:編譯和部署合約的第一種姿勢 - 使用 Remix

Remix

之前有自己開發過 Ethereum 智能合約,但沒有好好紀錄開發的過程和碰到的問題,覺得滿可惜。這次想重新開始,從最傻的姿勢開始,一步步成長。本篇希望將一個很簡單的代幣合約(只能發行和轉帳),部署在本地和測試網路上,並測試其功能。教練,我”只”想學Solidity 這篇也是用 Remix 和 MetaMask 部署合約到測試網路,已經瞭解這篇應該可以直接 end。本篇是較詳細描述使用 Remix 的步驟及使用上可能碰到的問題。

開發環境

不需要安裝,直接在任何瀏覽器開啟 Remix

[Unit]
Description=Docker Container %I
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStartPre=-/usr/bin/docker rm -f %i
ExecStart=/usr/bin/docker run --name %i \
--privileged \
--restart=on-failure:10 \

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

Setup modern.ie vagrant boxes

Since modern.ie released vagrant boxes, it' no longer necessary to manually import the ova file to virtualbox, as mentioned here.

However, the guys at modern.ie didn't configured the box to work with WinRM. This how-to addresses that, presenting steps to proper repackage these boxes, adding WinRM support. Additionally configures chocolatey package manager and puppet provisioner.

Pre-requisites

@balduran
balduran / vagrant-win-howto.md
Created September 7, 2018 09:15 — forked from cmbaughman/vagrant-win-howto.md
Vagrant >=1.6 Windows Instructions

How to set up a Windows VM with Vagrant

Create your VM

==================

  1. Obtain a windows vm from Modern IE.
  • Win 8 OSX
curl -O -L "https://www.modern.ie/vmdownload?platform=mac&virtPlatform=virtualbox&browserOS=IE10-Win8.1&parts=5&filename=VMBuild_20131127/VirtualBox/IE10_Win8/Mac/IE10.Win8.For.MacVirtualBox.part{1.sfx,2.rar,3.rar,4.rar,5.rar}"
@balduran
balduran / protractorAPICheatsheet.md
Created August 13, 2018 09:48 — forked from javierarques/protractorAPICheatsheet.md
Protractor API Cheatsheet
# Install GNU core utilities (those that come with OS X are outdated)
brew 'coreutils'
# Install GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
brew 'findutils'
brew 'wget'
brew 'git'
brew 'ack'
brew 'ssh-copy-id'
@balduran
balduran / README.md
Created August 23, 2017 07:03 — forked from jxson/README.md
README.md template

Synopsis

At the top of the file there should be a short introduction and/ or overview that explains what the project is. This description should match descriptions added for package managers (Gemspec, package.json, etc.)

Code Example

Show what the library does as concisely as possible, developers should be able to figure out how your project solves their problem by looking at the code example. Make sure the API you are showing off is obvious, and that your code is short and concise.

Motivation

https://patents.google.com/patent/US20130124326A1/en
https://patents.google.com/patent/US9536251B2/en
https://patents.google.com/patent/US20170116644A1/en