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
@jokester
jokester / ABOUT_ME.md
Last active March 24, 2024 17:07
about me

My GitHub stats

I love crafting new stuff and make things happen.

My interested fields includes:

  • Web / GUI / Graphics
  • ML / DL
@jokester
jokester / slides.md
Last active March 18, 2024 08:39
thecoo-python-data-seminar-02

theme: simple


DataFrame

Takeaway: they are spreadsheets


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

@jokester
jokester / README.md
Last active November 24, 2020 09:32
customized btrfs image for raspberry pi 4b
@jokester
jokester / some-workflow-snippet.yaml
Last active November 22, 2020 16:07
Tricks for github action workflows
# poc of string interpolation in bash / github action
- name: print env variables to job output
run: for v in `cat env` ; do echo "::set-env name=${v%%=*}::${v##*=}" ; done
- name: use (maybe ) in shell command
run: docker push myrepo/myapp:${TAG_REF#refs/tags/}
env:
TAG_REF: ${{ github.ref }}
@jokester
jokester / converter_base.rb
Created March 1, 2020 10:56
my beancount importers
module Converter
class BaseConverter
def initialize input_file, **options
@input_file = input_file
@options = options
end
def write output_file, force: false
if output_file.exist? && !force
puts " NOT overwriting #{output_file}. remove dest file and rerun or specify 'force' flag"
@jokester
jokester / 00-cloud-config.yml
Created October 18, 2019 18:17 — forked from janeczku/00-cloud-config.yml
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
@jokester
jokester / index.d.ts
Created March 15, 2019 16:01
typescript declaration of next-mui-helper
// TYPE_ROOT/next-mui-helper/index.d.ts
declare module 'next-mui-helper/nextjs/makeNextDocument' {
import { Theme } from "@material-ui/core";
const makeNextDocument: (muiTheme?: Theme) => React.Component;
export = makeNextDocument;
}
@jokester
jokester / next.config.js
Created March 14, 2019 02:11
disable clear of terminal in next.js 8
{
// silly way to prevent next.js clearing screen
// see https://github.com/zeit/next.js/blob/41eaa9cf5ade8f233439a80f7e846ccb00ef3f18/packages/next/build/output/store.ts#L24-L25
const readline = require('readline');
readline.cursorTo = readline.clearScreenDown = () => {};
}
@jokester
jokester / next.config.js
Created March 14, 2019 02:11
disable clear of terminal in next.js 8
{
// silly way to prevent next.js clearing screen
// see https://github.com/zeit/next.js/blob/41eaa9cf5ade8f233439a80f7e846ccb00ef3f18/packages/next/build/output/store.ts#L24-L25
const readline = require('readline');
readline.cursorTo = readline.clearScreenDown = () => {};
}