Skip to content

Instantly share code, notes, and snippets.

View zlin888's full-sized avatar
🎯
Focusing

zlin888 zlin888

🎯
Focusing
View GitHub Profile
@zlin888
zlin888 / why verification in etherscan.md
Last active June 11, 2019 21:13
why verification in etherscan

You can deploy it directly, no one is in charge of officially verifying contracts in the network. However, your users will be reassured of your seriousness if you share the actual code of your contract. To be sure that the code you posted as "your contract code" is the same as the actual contract in the network, you could verify it, this can be done using Etherscan code source verification. https://ethereum.stackexchange.com/questions/51998/smart-contract-verification

https://etherscan.io/verifyContract

https://blog.fundrequest.io/verifying-your-truffle-solidity-contracts-on-etherscan-87cb374e2adc

To sum up, the verification in etherscan is: etherscan translates the solidity code given by users to see whether the output bytecode is identifical to the bytecode that was put in the blockchain.

@zlin888
zlin888 / some conferences & journal.md
Last active June 12, 2019 16:08
some conferences & journal

作者:硕鼠酱 链接:https://www.zhihu.com/question/33977252/answer/157448123 来源:知乎 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

  • Computer architecture ASPLOS, ISCA, MICRO
  • Computer networks INFOCOM, SIGCOMM, NSDI
  • High-performance computing HPDC, ICS, SC
  • Operating systems EuroSys, OSDI/SOSP, USENIX ATC
  • Programming languages PLDI, POPL
@zlin888
zlin888 / python_progress_prompt.py
Last active June 24, 2019 20:04
Python Progress Prompt
# Print iterations progress
def printProgressBar (iteration, total, prefix = '', suffix = '', decimals = 1, length = 100, fill = '█'):
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)
suffix - Optional : suffix string (Str)
decimals - Optional : positive number of decimals in percent complete (Int)
@zlin888
zlin888 / git_cheatsheet.md
Last active June 24, 2019 20:08
git_cheatsheet

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@zlin888
zlin888 / ubuntu_cheatsheet.md
Last active July 2, 2019 17:06
ubuntu cheatsheet

Ubuntu Cheatsheet

  • check disk space: df -H
  • transfer file from server to local: scp your_username@remotehost.edu:foobar.txt /local/dir
  • local to server: rsync -avz -e 'ssh' foobar.txt your_username@remotehost.edu:somewhere
  • find file and remove: find . -maxdepth 1 -regex './[a-z0-9]*' | xargs rm -rf
    find the folder find . -type f
    -maxdepth 1 means non-recursive
    xargs is the command that "converts" its standard input into arguments of another program, or, as they more accurately put it on the man page\
  • count word, line: wc -l -w [file]
@zlin888
zlin888 / distdiff.R
Created October 4, 2019 11:39
ggplot-sail
dd1 <- c(21000, 23400, 26800)
dd2 <- c(29002, 10000, 70000)
library(viridis)
library(effsize)
library(sm)
library(magicaxis)
library(beanplot)
@zlin888
zlin888 / keybindings.json
Last active February 10, 2020 06:50
vscode-setting
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "right",
"command": "-extension.vim_right",
"when": "editorTextFocus && vim.active && !inDebugRepl"
},
{
"key": "shift+backspace",
"command": "-extension.vim_shift+backspace",
@zlin888
zlin888 / setup-vundle.sh
Last active February 21, 2023 00:14
vim_cheatsheet
git clone https://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
vim +PluginInstall +qall