Skip to content

Instantly share code, notes, and snippets.

View lihaoml's full-sized avatar
🎯
Focusing

lihao lihaoml

🎯
Focusing
View GitHub Profile
gs -dNOPAUSE -sDEVICE=jpeg -r144 -sOutputFile=p%03d.jpg file.pdf
https://christianheilmann.com/2012/09/30/quick-one-converting-a-multi-page-pdf-to-a-jpg-for-each-page-on-osx/
merge pdf
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=out.pdf *.pdf
There are three types of stable coins:
* Coins that are backed up with cash in a bank account
- example: Tether, TrueUSD, GUSD, PAX, USDC (Circle & Coinbase)
- pros: pegged to dollar, stable
- cons: user of these coins has to trust third party, credit risk
- audit, custody, and insurance
* Coins that are backed up by deposit of other cryptocurrencies (BTC, ETH)
- example: Dai (MakerDao) [5], Havven
- pros: elimigated the needs to trust third party, since the collateral is also on blockchain
- cons: volatility of the backup cryptocurrency, in order to achieve stability one would require more deposit that the value of stablecoins issued, and even that still face the risk of the collateral's price crash.
@lihaoml
lihaoml / telegraf.conf
Created September 24, 2018 15:28
telegraf.conf
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
@lihaoml
lihaoml / git-up-multiple.md
Last active September 13, 2018 15:47
Update several repos in one go

While regularly working with multiple repo, you may want to update them in one go.

  • Use git up instead of git pull:
git config --global alias.up '!git remote update -p; git merge --ff-only @{u}'

and here is why.

  • Create a bash script to update all repos [1]
@lihaoml
lihaoml / git-autoedit.md
Last active September 13, 2018 15:12
Avoid auto editing at 'git pull'

export GIT_MERGE_AUTOEDIT=no

@lihaoml
lihaoml / influxdb-setup.md
Last active August 30, 2018 01:16
Setup influxdb service on ubuntu server
@lihaoml
lihaoml / git-repo-refactor.md
Last active August 25, 2018 13:32
Separate exchanges to a git repo - beanex

Separate a repo into two

Let's start with cloning the source repo banana

git clone https://github.com/lihaoml/banana.git beanex

Now let's remove the origin in the cloned directory beanex:

git remote rm origin