Skip to content

Instantly share code, notes, and snippets.

View guo's full-sized avatar

qevan guo

View GitHub Profile
@guo
guo / gist:23bd1dcd646b9ae30767
Last active February 4, 2016 10:03
How to make Apple airport extreme work with surfboard SB6183?
How to make Apple airport extreme work with surfboard SB6183?
SB6183 is very smart and so is Apple airport extreme. They both tends to auto config the network. However, when you upgrade your modem to surfboard, airport seems to stop working.
I also tried quite a few different ways to config either airport or surfboard. No luck at all.
In the end, I found a trick which does the work.
- reset the airport extreme by pushing the reset button.
- connect it back to surfboard.
- it will auto config based on the current network.
@guo
guo / gist:49e58483ec20066c605e
Created February 24, 2016 08:41
merge video and audio file
ffmpeg -i video.mp4 -i audio.m4a -acodec copy -vcodec copy output.mp4
@guo
guo / gist:4ebe5afafc311f9897569bc9123c35ab
Created May 5, 2016 20:58
ADB with Samsung S7 on Mac OS
1. tap x times on build number in settings on phone.
2. allow debug.
3. install samsung smartswitch (altough you are switching at all.)
4. use adb in your terminal.
List of all locales based on
https://gist.github.com/jacobbubu/1836273
https://stackoverflow.com/a/28357857
af_NA: "Afrikaans (Namibia)",
af_ZA: "Afrikaans (South Africa)",
af: "Afrikaans",
ak_GH: "Akan (Ghana)",
ak: "Akan",
sq_AL: "Albanian (Albania)",
@guo
guo / gist:82d54ebd97ac1d34c56b20bc29408a2e
Created January 17, 2019 08:02
IoTeX CES 2019 Lucky Draw
Lucky Draw for list:
https://gist.github.com/loriIoTeX/f399fd2cceba46ed4cad918062224a9d
number of tickets: 258
number of lucky draws: 20
The current block height is 250288
I will use the block ID at height 250289 to generate luckydraw winners.
current height: 250288
current height: 250288
current height: 250288
@guo
guo / github-notes.md
Created March 26, 2019 20:24
Notes about how to use Git(Hub)

How to sync a forked repo from origin?

https://gist.github.com/CristinaSolana/1885435

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo

git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git

Combine all png files to a pdf file, sorted by last modified date.
```
convert $(ls -tr *.png) ~/all.pdf
```
// This is a basic uniswap frontrunning MEV bot
// Made by Merunas follow me on youtube to see how to use it and edit it: https://www.youtube.com/channel/UCJInIwgW1duAEnMHHxDK7XQ
// 1. Setup ethers, required variables, contracts and start function
const { Wallet, ethers } = require('ethers')
const { FlashbotsBundleProvider, FlashbotsBundleResolution } = require('@flashbots/ethers-provider-bundle')
// 1.1 Setup ABIs and Bytecodes
const UniswapAbi = [{"inputs":[{"internalType":"address","name":"_factory","type":"address"},{"internalType":"address","name":"_WETH","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"tokenA","type":"address"},{"internalType":"address","name":"tokenB","type":"address"},{"internalType":"uint256","name":"amountADesired","type":"uint256"},{"internalType":"uint256","name":"amountBDesire
@guo
guo / docker-compose.yml
Last active February 2, 2024 09:43
iotex babel rpc
services:
iotex:
container_name: iotex
image: iotex/iotex-core:v1.12.1
restart: unless-stopped
ports:
- 8080:8080
- 4689:4689
- 14014:14014
- 15014:15014