Skip to content

Instantly share code, notes, and snippets.

View kaxing's full-sized avatar
🌊

Yung kaxing

🌊
View GitHub Profile
@kaxing
kaxing / build-clight-deb-for-ubuntu-artful.note.md
Last active October 26, 2017 02:59
Build & Install Clight 1.4 deb for Ubuntu 17.10
@kaxing
kaxing / lxc-loop-device.note.md
Last active October 24, 2022 01:27
Mount Image file or loop device inside lxc container
@kaxing
kaxing / keybase.md
Created April 9, 2018 05:22
To prove my GitHub identity

Keybase proof

I hereby claim:

  • I am kaxing on github.
  • I am kaxing (https://keybase.io/kaxing) on keybase.
  • I have a public key whose fingerprint is 4254 85DC 3F0B 99A8 D94A F4C1 A6B3 630B 9700 4EAD

To claim this, I am signing this object:

@kaxing
kaxing / lxc-new-container-profile-gnome-terminal.md
Last active September 19, 2018 20:56
Automatically launch and exec new lxc container when opening new Terminal tab

Automatically launch and exec new lxc container when opening new Terminal tab

If you happen to throw most things into containers, I think this a handy trick for lazy people like us.

* It is somehow an idea inspiring from Firefox TabContainer

Here is the trick, so Gnome Terminal supports different profile and most terminal apps maybe, too. Inside profile you can execute a different program, this is what I did:

sh -c 'NEW_NAME=AG-$(shuf -n1 /usr/share/dict/words|tr -d [:punct:] ) && lxc launch images:ubuntu/18.04 $NEW_NAME && lxc exec $NEW_NAME bash'
@kaxing
kaxing / blockstack.md
Created July 27, 2018 08:52
Blockstack verification gist
@kaxing
kaxing / convert-things-on-mac
Last active November 28, 2019 18:19
Converting stuff on macOS
Covert PDF to PNG
Requirement: brew install imagemagick ghostscript
Possible mapping problems:
- convert: no images defined 'mypic.png' @error/convert.c/ConvertImageCommand/3254.
- convert: profile 'icc': 'RGB ': RGB color space not permitted on grayscale PNG `PointOnLine.png' @ warning/png.c/MagickPNGWarningHandler/1744.
Resolutions:
$ convert -define profile:skip=ICC -density 300 ./input.pdf output.png
@kaxing
kaxing / Treesheets_osx64.md
Last active June 19, 2020 09:13
Treesheets for MacOS 10.15+ (aka 64-bit binary only) and with English locale

Starting from Catalina only 64-bit will be allowed to run, otherwise you see a warning: image

And compiling Treesheet from source code is a bit tricky. Luckily I found that in the CI worfkflow the daily builds already in 64-bit.

Here is where you can find it. Goto the actions from official repository, and click on the latest successful build, eg: https://github.com/aardappel/treesheets/actions/runs/119194981

@kaxing
kaxing / vbox-and-ssh.md
Created October 12, 2020 06:21
Virtualbox and ssh connection

Making VMs accessible from host network.

| This should work fine with Virtualbox 5.2.42 or later

  • Global Tools > Host Network Manager > Create > vboxnet0

  • On Guest VM Settings > Network > Adapter 2 > Host-Only Adapter: choose vboxnet0

  • Going into the VM and get the IP from 2nd Adapter.

@kaxing
kaxing / pypi-web-search.md
Last active December 18, 2020 08:14
get the search from the pypi web instead as `pip search` doesn't work for the moment

Due to unfortunete amont of traffic, team python.org decided to disable xmlrpc endpoint, incident report being update here: https://status.python.org/incidents/grk0k7sz6zkp

Also an issue tracking on github: pypa/pip#9292

The error message:

This API has been temporarily disabled due to unmanageable load and will be deprecated in the near future. Please use the Simple or JSON API instead.
@kaxing
kaxing / test-exceed-volume-size.yaml
Last active June 23, 2021 06:43
exceeding volume claim size
# This an example to create Disk Pressure on Kubernetes cluster by overwriting claim volume.
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: longhorn-pvc-33g
spec:
accessModes:
- ReadWriteOnce
storageClassName: longhorn