Skip to content

Instantly share code, notes, and snippets.

Avatar

戴均民 taichunmin

View GitHub Profile
@taichunmin
taichunmin / mp-contacts.user.js
Last active May 17, 2022
從微程式的 Portal 系統中下載通訊錄,需先安裝 Greasemonkey 或 Tampermonkey 才能執行! 下方連結是安裝網址。 https://gist.github.com/taichunmin/3e854e9e118785a7985ec24905ee16ce/raw/mp-contacts.user.js
View mp-contacts.user.js
// ==UserScript==
// @name 微程式通訊錄
// @namespace https://ef.program.com.tw:8443/contacts
// @version 0.24
// @description 從微程式的 Portal 系統中下載通訊錄
// @author taichunmin <taichunmin@gmail.com>
// @website https://gist.github.com/taichunmin/3e854e9e118785a7985ec24905ee16ce/
// @updateURL https://gist.github.com/taichunmin/3e854e9e118785a7985ec24905ee16ce/raw/contacts.user.js
// @downloadURL https://gist.github.com/taichunmin/3e854e9e118785a7985ec24905ee16ce/raw/contacts.user.js
// @match https://ef.program.com.tw:8443/*
View apple-tree.cpp
#include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
/**
* Auto-generated code below aims at helping you parse
View dst_cave.md

dont starve together cave

{
  "MINE_workable": {
    "rock1": 1,
    "rock2": 1,
    "rock_flintless": 1,
    "rock_petrified_tree": 1,
 "stalagmite": 1,
View promise-20171107.js
// 一般的寫法
new Promise(function(resolve, reject) {
setTimeout(function() {
// resolve()
reject(new Error('123'))
}, 1000)
}).then(function() {
console.log('success')
}).catch(function(e) {
console.error(e)
View vee-validate-locale-zh-TW.js
export default {
alpha_dash: (field) => `${field} 欄位只能填寫半形英文字母、數字、底線及剪號。`,
alpha_num: (field) => `${field} 欄位只能填寫半形英文字母及數字。`,
alpha: (field) => `The ${field} 欄位只能填寫半形英文字母。`,
between: (field, [min, max]) => `${field} 欄位必須介於 ${min}${max} 之間。`,
confirmed: (field, [confirmedField]) => `${field} 欄位必須與 ${confirmedField} 欄位相同。`,
decimal: (field, [decimals] = ['*']) => `${field} 欄位只能填寫${decimals === '*' ? '' : '小數點 ' + decimals + ' 位以內的'}小數。`,
digits: (field, [length]) => `${field} 欄位只能填寫剛好 ${length} 位數的數字。`,
dimensions: (field, [width, height]) => `${field} 欄位只能填寫 ${width} 像素乘以 ${height} 像素。`,
email: (field) => `${field} 欄位的電子郵件地址不正確。`,
View Delightful Database Seeding with Docker.md

用 Docker 來製作優雅的 MongoDB Seeder

本篇是原文 Delightful Database Seeding with Docker 的摘要

流程總共區分為三個階段:

  • 複製正式伺服器的資料並清理
  • 打包並發佈 Seeder
  • 使用 Seeder 匯入資料
@taichunmin
taichunmin / atom-packages.txt
Last active Aug 31, 2017
My Atom Installed Packages
View atom-packages.txt
aligner@1.2.4
aligner-css@1.2.1
aligner-javascript@1.3.0
aligner-php@1.1.1
atom-beautify@0.30.5
atom-format-lua@0.1.5
autocomplete-paths@2.8.1
busy-signal@1.4.3
docblockr@0.11.0
duplicate-line-or-selection@0.9.0
View install_pcsc_ccid.sh
apt-get install build-essential libtool libusb-dev libusb-1.0 gcc make autoconf pkg-config libudev-dev flex pcsc-tools libpcsclite-dev
#download pcsc lite
wget https://alioth.debian.org/frs/download.php/file/4225/pcsc-lite-1.8.22.tar.bz2
tar xvf pcsc-lite*.tar.bz2
cd pcsc*
@taichunmin
taichunmin / mp-portal.user.js
Last active Nov 27, 2019
這是為了讓微程式的 Portal 系統支援 Chrome,需先安裝 Greasemonkey 或 Tampermonkey 才能執行! 下方連結是安裝網址。 https://gist.github.com/taichunmin/b480b8322b5cf0eadbfbc07f3dd2e485/raw/mp-portal.user.js
View mp-portal.user.js
// ==UserScript==
// @name Microprogram Portal
// @namespace http://ef.program.com.tw:8081/
// @version 1.16
// @description try to let portal support Chrome
// @author taichunmin <taichunmin@gmail.com>
// @website https://gist.github.com/taichunmin/b480b8322b5cf0eadbfbc07f3dd2e485/
// @updateURL https://gist.github.com/taichunmin/b480b8322b5cf0eadbfbc07f3dd2e485/raw/mp-portal.user.js
// @downloadURL https://gist.github.com/taichunmin/b480b8322b5cf0eadbfbc07f3dd2e485/raw/mp-portal.user.js
// @match http://ef.program.com.tw:8081/*
View Factorio 1.5 藍圖蒐集.md

Factorio 1.6 科技包

0eNq1XUtzm8lu/SsuLZKN6dvvxyyTRbapZJVKTd2iZV6bNRSloqS5mdzSfw81EqVPMtB9DqisZsYeng+NfgCNBg7+cfF1d7+5OWz3d3/9en3928Uv/3j9k9uLX/578Z+Pf7e9vN4//fHt9vt+vXv8s7s/bjYXv1xs7zZXF58v9uurx/+6vdxu9peb1c368reVv3j4fLHdf9v8z8Uv/uEz9+Ow+HF4+PXzxWZ/t73bbp7E+PM//vjr/v7q6+ZwRH/BWN/ebq6+7rb776ur9eWP7X5zRPp8cXN9e/zx9f7x20fAVfl88cfxH/4o1sVhc7m9Eb//03cC+51o+04kv+Nsn0nkZ4yjyeRnjJNTXhfS1Xq3W212m8u7w/ZydXO92whzU58+0x8ErPqCtd3fbg53xz9TF5EI0F4A7g7r/e3N9eFu9XWzu9Nh2nG037bH8T79XRBA+wvo7vqowh/r4/b4thpImE4SvoFOArR3LHbGsT2ujAQrwwccNeOokVxFYbAIfEKWURwhZHyQAR9kwVEjjlrZJeTxJYTvJ4cL3HE1eBg1OGDSR6smeADAjwDwnYGvmRBhUEJXidtto60SMrn88MMx4PsFP79ChUHxPRgasHZGdiuwNgY3A9HBA8ZNYsRtC24EYuCW5ciTiPi+qbiAr/vm79fX3zb71eWPza10brUnzHLE/Lo+KGiZdlYKIOPrpvnb+vZuZAeqCFok0Eq7EhUQtdGuBILaEeufTmOX/HNHyyXjeNqLAMaXAu1FIKhGB0weeGJdkiguRek4S5l1SZDRF9olQVAr6xAgoI11CBDQzkoKnETZseYbkDR71nwjoIGVFBl+ZCVFQBNrd5