Skip to content

Instantly share code, notes, and snippets.

View xbklairith's full-sized avatar

Bird Praphan xbklairith

View GitHub Profile
xbklairith /
Created March 26, 2024 05:20
Generate bitcoin hardware wallet seed
#pip install mnemonic
from mnemonic import Mnemonic
mnemo = Mnemonic("english")
words = mnemo.generate(strength=256)
# words is 'police you depend enemy cash culture snap east borrow maximum loop code reduce decorate conduct plunge deny rotate inner flower then insane cheese assume'
sudo apt update
sudo apt install rbenv git build-essential
curl -o- | bash
git clone ~/.pyenv
xbklairith /
Last active July 27, 2020 16:21
Install couchbase dev in Ubuntu 20.04
sudo wget -O - | sudo apt-key add -
echo "deb focal focal/main" | sudo tee /etc/apt/sources.list.d/couchbase.list
sudo apt update
sudo apt-get install libcouchbase-dev libcouchbase3-libev build-essential
xbklairith /
Created December 27, 2019 06:59
Create process(s) upon the number of workers, The pool will be terminated when an exception occurs in one of the workers and Kube-pod restarting is expected
from time import sleep
from multiprocessing import Pool
from functools import partial
def _on_error(pool, e):
raise e
"global": {
"check_for_updates_on_startup": true,
"show_in_menu_bar": true,
"show_profile_name_in_menu_bar": false
"profiles": [
"complex_modifications": {
"parameters": {
xbklairith / Install Certificates.command
Created April 24, 2019 03:55
Install Certificates.command : Install cert to python environment
/Library/Frameworks/Python.framework/Versions/3.7/bin/python3.7 << "EOF"
# sample script to install or update a set of default Root Certificates
# for the ssl module. Uses the certificates provided by the certifi package:
xbklairith /
Created April 18, 2019 09:59
Remove all none tag docker image
docker rmi $(docker images -a|grep "<none>"|awk '$1=="<none>" {print $3}')
xbklairith /
Created April 1, 2019 10:42
Python debugger automatically on exception occur
python -m pdb -c continue
xbklairith / list_versions
Created February 12, 2019 07:12
How to show all available versions for install . pyenv install --list
$ pyenv install --list
Available versions:
xbklairith / istio-values.yaml
Created November 14, 2018 10:21
values.yaml istio 1.0.3 setting up for https
# Common settings.
# Default hub for Istio images.
# Releases are published to docker hub under 'istio' project.
# Daily builds from prow are on, and nightly builds from circle on
# Default tag for Istio images.
tag: 1.0.3