Skip to content

Instantly share code, notes, and snippets.

View jokester's full-sized avatar
🌛
not my photo / still alive and with a cat now!!! (as of 2024-03)

Wang Guan jokester

🌛
not my photo / still alive and with a cat now!!! (as of 2024-03)
View GitHub Profile

Deploy k3s cluster on Vultr with RancherOS over ZeroTier network

How to deploy K3S cluster on RancherOS nodes connected via a Zerotier network.

Deploy master node

1. Update the master-deploy.sh with deployment vars

@janeczku
janeczku / 00-cloud-config.yml
Last active June 10, 2023 15:10
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
@jsoma
jsoma / matplotlib-fonts.py
Created July 10, 2018 03:37
See all of the fonts that matplotlib can access
import matplotlib.font_manager
from IPython.core.display import HTML
def make_html(fontname):
return "<p>{font}: <span style='font-family:{font}; font-size: 24px;'>{font}</p>".format(font=fontname)
code = "\n".join([make_html(font) for font in sorted(set([f.name for f in matplotlib.font_manager.fontManager.ttflist]))])
HTML("<div style='column-count: 2;'>{}</div>".format(code))
@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 5, 2024 22:32
Swift Concurrency Manifesto

01.道可道,非常道。名可名,非常名。无名天地之始。有名万物之母。故常无欲以观其妙。常有欲以观其徼。此两者同出而异名,同谓之玄。玄之又玄,众妙之门。

02.天下皆知美之为美,斯恶矣;皆知善之为善,斯不善已。故有无相生,难易相成,长短相形,高下相倾,音声相和,前後相随。是以圣人处无为之事,行不言之教。万物作焉而不辞。生而不有,为而不恃,功成而弗居。夫唯弗居,是以不去。

03.不尚贤, 使民不争。不贵难得之货,使民不为盗。不见可欲,使民心不乱。是以圣人之治,虚其心,实其腹,弱其志,强其骨;常使民无知、无欲,使夫智者不敢为也。为无为,则无不治。

04.道冲而用之,或不盈。渊兮似万物之宗。解其纷,和其光,同其尘,湛兮似或存。吾不知谁之子,象帝之先。

05.天地不仁,以万物为刍狗。圣人不仁,以百姓为刍狗。天地之间,其犹橐迭乎?虚而不屈,动而愈出。多言数穷,不如守中。

@antishok
antishok / NODE_ENV production.md
Last active September 25, 2020 07:09
What does `NODE_ENV=production` do?
@dlublin
dlublin / ffmpeg-hap-readme.md
Created April 18, 2017 13:40
Encoding to Hap from the command line using FFmpeg

Encoding to Hap from the command line using FFmpeg

For users who prefer working with a command line or need to access advanced encoding settings for Hap the popular FFmpeg library can be used to work with Hap movies.

  1. If this is your first time using FFmpeg you may need to install it on your system, or compile it from source. In either case be sure that Snappy is enabled as part of the binary. If you already have FFmpeg on your system with Snappy enabled, you can skip this step.

    You can check that your version of FFmpeg can encode Hap using

    ffmpeg -encoders | grep hap
    
@tzmartin
tzmartin / m3u8-to-mp4.md
Last active April 26, 2024 01:50
m3u8 stream to mp4 using ffmpeg

1. Copy m3u8 link

Alt text

2. Run command

echo "Enter m3u8 link:";read link;echo "Enter output filename:";read filename;ffmpeg -i "$link" -bsf:a aac_adtstoasc -vcodec copy -c copy -crf 50 $filename.mp4
@kennwhite
kennwhite / 1944_OSS_Simple_Sabotage_Field_Manual.md
Last active April 5, 2024 02:51
1944 OSS Simple Sabotage Field Manual