Skip to content

Instantly share code, notes, and snippets.

View fkztw's full-sized avatar
📺
Hello World!

Frank Zheng fkztw

📺
Hello World!
  • Taiwan
  • 14:42 (UTC +08:00)
View GitHub Profile
@fkztw
fkztw / macos_btc_testnet_electrum.sh
Created August 2, 2022 01:59
macOS run Electrum with BTC testnet instead of mainnet
/Applications/Electrum.app/Contents/MacOS/run_electrum --testnet
@fkztw
fkztw / install_all_deps_arch_linux.sh
Last active August 29, 2021 16:39
Install all dependencies of a package on Arch Linux
env TARGET=pandoc yay -S --asdeps --needed $(yay -Si $TARGET | sed -n '/^Depends/,/^Conf/p' | head -n -1 | sed 's/^.*\s://g' | sed 's/:.*$//g' | sed 's/^\s*//g' | tr '\n' ' ')
@fkztw
fkztw / korean_fish.py
Last active May 10, 2019 06:18
Yet another chatbot
#!/usr/bin/env python3
import itertools
whats = [
'自經區', '自貿區',
'摩天輪', '愛情摩天輪', '愛情產業鏈',
'發大財', '愛河的水甘甘', '選總統',
'迪士尼',
@fkztw
fkztw / satoshistreasure.md
Created April 17, 2019 03:02 — forked from johncantrell97/satoshistreasure.md
How I Obtained Satoshi's Treasure Keys 1, 2, and 3 in Minutes

Today (April 16th 2019 at noon) the first major clues to discover key #1 was set to be released in a few cities. A QR code with the words 'orbital' were found at these locations and looked like this: (https://imgur.com/a/6rNmz7T). If you read the QR code with your phone you will be directed to this url: https://satoshistreasure.xyz/k1

At this URL you are prompted to input a passphrase to decrypt the first shard. An obvious first guess was to try the word 'orbital' from the QR code. Not suprisingly this worked! This reveals a congratulations page and presents the first key shard:

ST-0001-a36e904f9431ff6b18079881a20af2b3403b86b4a6bace5f3a6a47e945b95cce937c415bedaad6c86bb86b59f0b1d137442537a8.

Now, we were supposed to wait until April 17th to get clues from the other cities for keys #2 and #3 but that wouldn't stop me from digging around with all the new information we had. All that time "playing" notpron (http://notpron.org/notpron/) years ago was going to help me here.

The first thing I noticed was

  • Turn The Ship Around
  • Five Dysfunctions of a Team
  • Leading Snowflakes
  • High-Output Management
  • Slack: Getting Past Burnout
  • The Year Without Pants
  • Creativity, Inc.
  • Start With Why
  • Crucial Conversations
  • Drive: The Surprising Truth About What Motivates Us
@fkztw
fkztw / fail2ban-allstatus.sh
Created December 12, 2018 09:20 — forked from kamermans/fail2ban-allstatus.sh
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@fkztw
fkztw / ptt_autologin.sh
Created January 9, 2018 13:53
A shell script to login PTT via ssh automatically.
#!/usr/bin/env expect
# Login into PTT via SSH.
# Combine crontab with this script so you don't forget to login PTT everyday.
# Usage: /bin/bash -c ${FILE_PATH_OF_THIS_SCRIPT}
# Example in crontab:
# ptt auto login, every day at 12:00 PM
# 0 12 * * * /bin/bash -c ${ABSOLUTE_FILE_PATH_OF_THIS_SCRIPT}
#!/usr/bin/sudo sh
## ruby_revealer.sh -- decrypt obfuscated GHE .rb files. 2.0.0 to 2.3.1+.
## From `strings ruby_concealer.so`:
##
## > This obfuscation is intended to discourage GitHub Enterprise customers
## > from making modifications to the VM.
##
## Well, good, as long as its not intended to discourage *me* from doing this!
@fkztw
fkztw / PKGBUILD
Created January 5, 2018 15:36 — forked from aoleg94/PKGBUILD
pkgname=libva1-ubuntu
pkgver=1.7
pkgrel=1
pkgdesc="Old libva from Ubuntu 16.04 for apps not supporting libva2 (esp. Parsec.tv)"
arch=('x86_64')
url="https://linux.palemoon.org"
license=('GPL' 'BSD')
depends=()
mirror="http://archive.ubuntu.com/ubuntu"
source=(
#!/usr/bin/env python3
from pprint import pprint
# Make sure you've installed github3.py via `pip install --pre github3.py`
from github3 import login
MY_GITHUB_USERNAME = ""
# Visit https://github.com/settings/tokens to create a token if you don't have.