Skip to content

Instantly share code, notes, and snippets.

@fantasywind
fantasywind / tw-zipcode.json
Last active January 5, 2024 03:27
[台灣][郵遞區號][中華民國][Taiwan][Zipcode][3碼] JSON
{
"基隆市": {
"仁愛區": "200",
"信義區": "201",
"中正區": "202",
"中山區": "203",
"安樂區": "204",
"暖暖區": "205",
"七堵區": "206"
},
const YOUTUBE_DATA = {
kind: 'youtube#videoListResponse',
etag: 'QOJsG51Qlpq5TNrbq6faaKRqYg8',
items: [
{
kind: 'youtube#video',
etag: '5vsH01N8zX_GwP5J3tGFDlFmBRs',
id: 'E_hmPwk37ME',
snippet: {
publishedAt: '2020-10-02T13:00:10Z',
const YOUTUBE_DATA = {
kind: 'youtube#videoListResponse',
etag: 'QOJsG51Qlpq5TNrbq6faaKRqYg8',
items: [
{
kind: 'youtube#video',
etag: '5vsH01N8zX_GwP5J3tGFDlFmBRs',
id: 'E_hmPwk37ME',
snippet: {
publishedAt: '2020-10-02T13:00:10Z',
const SIZE = 500000;
const path = require('path');
const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const PROTO_PATH = path.resolve(__dirname, './grpc.proto');
const GRPC_HOST = '127.0.0.1:50099';
const packageDeginition = protoLoader.loadSync(PROTO_PATH);
const descriptor = grpc.loadPackageDefinition(packageDeginition);
const SIZE = 500000;
const Fastify = require('fastify');
const axios = require('axios');
const fastify = Fastify({
logger: true,
bodyLimit: 1024857600,
});
fastify.post('/', (request, reply) => {
@fantasywind
fantasywind / iso3166.json
Created December 24, 2019 09:17
ISO 3166 in zh_TW
[{
"id":"AD",
"name":"安道爾"
}, {
"id":"AE",
"name":"阿聯"
}, {
"id":"AF",
"name":"阿富汗"
}, {
<RoutingRules>
<RoutingRule>
<Condition>
<HttpErrorCodeReturnedEquals>404</HttpErrorCodeReturnedEquals>
</Condition>
<Redirect>
<ReplaceKeyWith>zh/festivals/TIFA/2020/index.html</ReplaceKeyWith>
</Redirect>
</RoutingRule>
</RoutingRules>
<div style={styles.wrapper}>
<h2 style={styles.title}>相關辦法</h2>
<h2 style={styles.title}>教務</h2>
<a
target="_blank"
style={styles.link}
href="http://aca.nccu.edu.tw/download/rulesdata/law01A.pdf">國立政治大學學則</a>
<a
target="_blank"
style={styles.link}
@fantasywind
fantasywind / test.html
Last active September 12, 2017 18:59
<div style={styles.wrapper}>
<table style={styles.table} cellPadding="0" cellSpacing="0">
<tr>
<th style={styles.th}>職稱</th>
<th style={styles.th}>姓名</th>
<th style={styles.th}>主要職務內容</th>
<th style={styles.th}>聯絡電話</th>
<th style={styles.th}>Email</th>
</tr>
<tr>
app.use(function (req, res, next) {
res.header("Access-Control-Allow-Origin", "*");
res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept");
if (req.method === 'OPTIONS') {
res.status(204);
res.end();
} else {
next();
}