Skip to content

Instantly share code, notes, and snippets.

View denniswon's full-sized avatar

Dennis Won denniswon

View GitHub Profile
fatal error: runtime: out of memory
runtime stack:
runtime.throw(0x160d367, 0x16)
/usr/local/go/src/runtime/panic.go:1114 +0x72
runtime.sysMap(0xc0dc000000, 0x8000000, 0x287c3b8)
/usr/local/go/src/runtime/mem_linux.go:169 +0xc5
runtime.(*mheap).sysAlloc(0x285c160, 0x7400000, 0x285c168, 0x386b)
/usr/local/go/src/runtime/malloc.go:715 +0x1cd
runtime.(*mheap).grow(0x285c160, 0x386b, 0x0)
dennis.won@Jongs-MacBook-Pro:~/harmony-one/harmony (master) $ alias
alias check_ports='sudo lsof -i -P -n | grep LISTEN'
alias ebp='vim ~/.bash_profile'
alias imgcat='/Users/dennis.won/.iterm2/imgcat'
alias imgls='/Users/dennis.won/.iterm2/imgls'
alias it2attention='/Users/dennis.won/.iterm2/it2attention'
alias it2check='/Users/dennis.won/.iterm2/it2check'
alias it2copy='/Users/dennis.won/.iterm2/it2copy'
alias it2dl='/Users/dennis.won/.iterm2/it2dl'
alias it2getvar='/Users/dennis.won/.iterm2/it2getvar'
# bash_profile
# Add Homebrew `/usr/local/bin` and User `~/bin` to the `$PATH`
PATH=$HOME/bin:$PATH
PATH=/usr/local/bin:$PATH
PATH=/sbin/:$PATH
PATH=/usr/sbin/:$PATH
export PATH="/usr/local/sbin:$PATH"
alias ls='ls -GFh'
@denniswon
denniswon / getblockbynum rpc error
Created May 14, 2020 21:16
getblockbynum rpc error
block num: 0x31e182, data: { status: 200,
statusText: 'OK',
headers:
{ 'content-type': 'application/json',
vary: 'Origin',
date: 'Thu, 14 May 2020 21:14:11 GMT',
'content-length': '118',
connection: 'close' },
config:
{ url: 'http://63.32.250.209:9500',
@denniswon
denniswon / get block by num axios
Created May 14, 2020 21:36
get block by num axios
> const res = await axios.post('http://63.32.250.209:9500', '{"jsonrpc":"2.0","method":"hmy_getBlockByNumber","params":["0x31e182",true],"id":1}')
Thrown:
{ Error: Request failed with status code 415
at createError (/Users/dennis.won/go/src/github.com/harmony-one/harmony-dashboard-backend/node_modules/axios/lib/core/createError.js:16:15)
at settle (/Users/dennis.won/go/src/github.com/harmony-one/harmony-dashboard-backend/node_modules/axios/lib/core/settle.js:17:12)
at IncomingMessage.handleStreamEnd (/Users/dennis.won/go/src/github.com/harmony-one/harmony-dashboard-backend/node_modules/axios/lib/adapters/http.js:236:11)
at IncomingMessage.emit (events.js:203:15)
at IncomingMessage.EventEmitter.emit (domain.js:466:23)
at endReadableNT (_stream_readable.js:1145:12)
at process._tickCallback (internal/process/next_tick.js:63:19)
@denniswon
denniswon / Harmony Block Explorer prod deployment
Created June 4, 2020 22:12
Harmony Block Explorer prod deployment steps
1. Coordinate with [email protected] (Leo Chen) on setting up "Harmony-Dev Role" for your AWS account.
2. Here are ip addresses of explorer services (mainnet vs. testnet) that we run on AWS Oregon region
AWS_EXPLORER=35.167.126.78
AWS_EXPLORER_LRTN=44.232.43.231
3. Find these instances and make sure to add your wifi public ip to the security group so that you can ssh into the machine from your ip.
4. SSH into the machine. ex) ssh -i ~/.ssh/keys/oregon-key-benchmark.pem [email protected]
Executing tasks: [clean, :libcocos2dx:assembleDebug, :HarmonyPuzzle:assembleDebug] in project /Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod
make: /Users/dennis.won/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Command not found
make: /Users/dennis.won/Downloads/android-ndk-r19c/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++: Command not found
make: *** No rule to make target `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/jni/../../../Classes/AppDelegate.cpp', needed by `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/build/intermediates/ndkBuild/release/obj/local/armeabi-v7a/objs/cocos2djs_shared/__/__/__/Classes/AppDelegate.o'. Stop.
make: *** No rule to make target `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/jni/../../../Classes/AppDelegate.cpp', needed by `/Users/dennis.won/go/src/github.com/harmony-one/android-puzzle-prod/app/build/intermediates/ndkBuild/debug/obj/loc
== 7/21 ==
1. Finished the first draft of new ERC20 version of Harmony puzzle dapp: decentralized version, txns happening on client-side without the use of previous central server on Samsung galaxy S20 device with native wallet/keystore integration. https://drive.google.com/file/d/126dPqnGdYzhNrqdK62irAoVQE9kbORPH/view?usp=sharing
cc: @Nick White#8086 :ocean: @Sahil D#5463 @Li | Harmony.one 🎽#7220
This is only the first draft of ERC20 version. Submitting and will be iterating with Samsung for production on Samsung Blockchain Store/Wallet integration.
2. conducted and submitted interview feed on lever for a fullstack engineer position candidate: jenya cc: @Yuriy | Harmony#7679 @Rongjian Lan | Harmony#9543
3. Mainnet explorer HRC20 productionization: Tried to productionize hrc20 update on mainnet, and faced many set up/code incompatibility that blocked the update. Managed to resolve the set up conflicts with ssl/node/vue.js, etc. but at the end, also realized that the current code status of HRC20 branch has
@denniswon
denniswon / gist:cf350f6899df147911aa670f485b501b
Created August 10, 2020 21:11
node 1 connected to coordinator node
ubuntu@ip-172-31-21-226:~/sentinel-ai/node (master) $ Connected to IPFS v0.4.23
Connected to IPFS v0.4.23
Connected to Web3 v5.2.0
Connected to Web3 v5.2.0
Connected to IPFS v0.4.23
Connecting to Coordinator
{'eth_address': '0xBeb71662FF9c08aFeF3866f85A6591D4aeBE6e4E',
'ip': 'http://204.236.188.162:5001'}
Connected to Coordinator Node
Connecting to Coordinator
did:3:bafyreihe2gk2k56jefakpwn4beft3sjnbycrfkvlnfpeqevj52y6x2dluu