Skip to content

Instantly share code, notes, and snippets.

View skyzh's full-sized avatar
🐱
working

Alex Chi Z. skyzh

🐱
working
View GitHub Profile

Keybase proof

I hereby claim:

  • I am skyzh on github.
  • I am skyzh (https://keybase.io/skyzh) on keybase.
  • I have a public key whose fingerprint is 2894 A8BA 99EB 1686 9CD0 005A F14F 523A D023 B56C

To claim this, I am signing this object:

@skyzh
skyzh / README.md
Last active July 6, 2016 10:10
FRC@EFZ Programming Training

编写下列朴素机器人控制程序

  1. 底盘向前开两秒,停两秒,再向前开两秒,停止。
    • 提示:
      • 创建 Simple Robot
      • 使用 RobotDrive
      • 前左,前右,后左,后右马达分别对应端口 1, 2, 3, 4
      • 注意了,我们使用的马达控制器是 VictorSP
      • 延时可以使用 Timer.delay(...)
  • 全部编写在自动控制函数内

论如何在网站上发布新闻

  1. 首先你需要一个 GitHub 账号。 https://github.com。
  2. 访问 https://github.com/frcefz/website/ ,点击 Fork 把这个项目拷贝到自己的账户下。
  3. 在拷贝后的网站 _posts 文件夹下点击 Create New File 创建文件。
  4. 文件名设置为 2016-08-04-first-day-training.markdown (格式为 日期-英文名(无空格))。
  5. 复制文件头
    ---
    layout: post
    
@skyzh
skyzh / direct.conf
Created February 25, 2017 04:33
surge default config for direct
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,e.crashlynatics.com,captive.apple.com
bypass-tun = 10.0.0.0/8,100.64.0.0/10,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.0.0.0/24,192.0.2.0/24,192.88.99.0/24,192.168.0.0/16,198.18.0.0/15,198.51.100.0/24,203.0.113.0/24,224.0.0.0/4,255.255.255.255/32
dns-server =
[Rule]
FINAL,DIRECT
@skyzh
skyzh / chnroute.conf
Created February 25, 2017 04:34
surge chnroute config
# Shadowrocket: 2017-02-25 12:29:14
[General]
bypass-system = true
skip-proxy = 192.168.0.0/16,10.0.0.0/8,172.16.0.0/12,localhost,*.local,e.crashlynatics.com,captive.apple.com
bypass-tun = 10.0.0.0/8,100.64.0.0/10,127.0.0.0/8,169.254.0.0/16,172.16.0.0/12,192.0.0.0/24,192.0.2.0/24,192.88.99.0/24,192.168.0.0/16,198.18.0.0/15,198.51.100.0/24,203.0.113.0/24,224.0.0.0/4,255.255.255.255/32
dns-server =
[Rule]
DOMAIN-KEYWORD,google,PROXY,force-remote-dns
@skyzh
skyzh / index.js
Created June 16, 2017 12:11
This script will parse Data under College English Disc to a html containing all answers.
const _ = require('lodash');
const Promise = require('bluebird');
const parser = Promise.promisifyAll(new require('xml2js').Parser());
const fs = Promise.promisifyAll(require('fs'));
let output = "";
fs.readdirAsync(`${__dirname}/data`)
.filter(file => /^1U0[6-7]p[A-Z0-9]{2}[A-F].xml$/.test(file))
.map(file => {
@skyzh
skyzh / main.py
Last active July 28, 2017 14:39
Mock Transaction: N people have `DEFALUT_WALLET` CNY at the beginning, and will transfer 1 CNY to another person in each round. After R rounds, this program will print how much money each person has.
#!/usr/bin/env python3
import random
DEFAULT_WALLET = 100
N = 100
R = 100
def do_transaction(storage, id_from, id_to):
storage[id_from] -= 1
@skyzh
skyzh / index.js
Created December 23, 2017 03:21
Export Anki cards to HTML
/*
How to use?
Install Node.js and run 'npm init', than install the dependency 'lodash'.
Install the Anki addon from 'https://ankiweb.net/shared/info/1788670778', and export your deck to JSON.
Run 'node index.js', and there will be a generated 'index.html'.
*/
const _ = require('lodash');
const fs = require('fs');
@skyzh
skyzh / Todoist-Fantastical-Sorted.md
Last active April 22, 2018 03:42
Sync Todoist tasks to Fantastical and many other apps
  1. Create a project like this (parent tasks with children of one level indent), and assign due dates. image
  2. Run main.py in Terminal, input project id, press enter and copy the generated texts. image
  3. In Drafts 4 on iOS, paste and run Quick-Add to Fantastical Reminder workflow. image
  4. In Sorted or any other apps, use functionalities like Reminder Capture to import these tasks. image
@skyzh
skyzh / Bear.md
Created April 18, 2018 15:04
Prepare Bear App exported notes for printing

Texts are darkened and serif-ied for better printing visual effects.

Before

image

After

image