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-09)

Wang Guan jokester

🌛
not my photo / still alive and with a cat now!!! (as of 2024-09)
View GitHub Profile
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p
@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


@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 = () => {};
}