Skip to content

Instantly share code, notes, and snippets.

View flinhong's full-sized avatar
🎯
Focusing

Frank Lin (林宏) flinhong

🎯
Focusing
View GitHub Profile
@flinhong
flinhong / QYCal.py
Created March 9, 2022 16:29
QY Calculation
"""
# date: Wed Mar 9 HKT 2022
# naming conventions: 'La.dat', 'Lb.dat', 'Lc.dat', 'Pb.dat', 'Pc.dat'
# package requirement: numpy, scipy, matplotlib
"""
import numpy as np
import matplotlib.pyplot as plt
from scipy import integrate
@flinhong
flinhong / README.md
Last active January 18, 2022 07:30 — forked from JamesMessinger/README.md
VSCode GitHub Markdown Theme

GitHub Markdown Theme for Visual Studio Code

This CSS stylesheet allows you to preview markdown files in VSCode using GitHub's mardown theme. This CSS was taken directly from the official GitHub Markdown repo. I replaced their top-level .markdown-body class with the body tag so it would work in VSCode, and added styling for the html tag to match GitHub's fixed-width container.

Instructions

  1. Copy the CSS file to your computer
    Copy the github-markdown.css file below to your computer. You can put it anywhere you want, but I chose to put it in the same folder as my VSCode settings file.

  2. Edit your VSCode settings
    If you want to use this theme for all of your projects, then edit your User Settings file. If you just want to use this them

@flinhong
flinhong / index.html
Created June 18, 2021 16:16
Jumping Worm Preloader
<svg class="pl" width="240" height="240" viewBox="0 0 240 240">
<circle class="pl__ring pl__ring--a" cx="120" cy="120" r="105" fill="none" stroke="#000" stroke-width="20" stroke-dasharray="0 660" stroke-dashoffset="-330" stroke-linecap="round" />
<circle class="pl__ring pl__ring--b" cx="120" cy="120" r="35" fill="none" stroke="#000" stroke-width="20" stroke-dasharray="0 220" stroke-dashoffset="-110" stroke-linecap="round" />
<circle class="pl__ring pl__ring--c" cx="85" cy="120" r="70" fill="none" stroke="#000" stroke-width="20" stroke-dasharray="0 440" stroke-linecap="round" />
<circle class="pl__ring pl__ring--d" cx="155" cy="120" r="70" fill="none" stroke="#000" stroke-width="20" stroke-dasharray="0 440" stroke-linecap="round" />
</svg>
// footnote with protip
function footNote() {
if ($(".footnote").length != 0) {
$(".footnote").each(function () {
var target = $(this)
.attr("href")
.replace(":", "\\:");
var content =
$(target)
.html()
#!/bin/bash
# change directory to where the script resides
BASEDIR=$(dirname -- "$0")
cd "$BASEDIR"
rawURL="https://raw.githubusercontent.com/felixonmars/dnsmasq-china-list/master/accelerated-domains.china.conf"
rawfile="rawfile.conf"
upstream="upstream.conf"
@flinhong
flinhong / highlight.scss
Last active February 6, 2021 09:40
code highlight style
// define variables
$code-bg: #2e3e4e;
$tea: #ecebe7;
$gray-200: #e9ecef;
$gray-500: #adb5bd;
$gray-800: #343a40;
$font-family-monospace: 'Ubuntu Mono', 'SFMono-Regular', 'Menlo', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', 'Noto Serif SC', 'STSong', monospace;
figure.highlight,