Skip to content

Instantly share code, notes, and snippets.

View kaxing's full-sized avatar
🌊

kaxing kaxing

🌊
View GitHub Profile
@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 / blockstack.md
Created July 27, 2018 08:52
Blockstack verification gist
@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 / 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-loop-device.note.md
Last active October 24, 2022 01:27
Mount Image file or loop device inside lxc container
@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