Skip to content

Instantly share code, notes, and snippets.

View typebrook's full-sized avatar
💭
Adapting new job

Hsieh Chin Fan typebrook

💭
Adapting new job
View GitHub Profile
@typebrook
typebrook / Makefile
Created April 10, 2025 08:09
get data from mine.geologycloud.tw
.ONESHELL:
MineArea.geojson:
curl 'https://mine.geologycloud.tw/data/get_minedetail' \
-X POST \
--data-raw 'layerClass=system_public&layerKey=MineArea' | \
jq . >MineUseArea.geojson
MineUseArea.geojson:
curl 'https://mine.geologycloud.tw/data/get_minedetail' \
@typebrook
typebrook / .gitignore
Last active April 15, 2025 01:37
Nomalized dataset of Taiwan Address for Great-Recall
dataset/*
!dataset/*md5
address/
*.mbtiles
*.json
*.zip
*.shp
*.shx
*.cpg
*.dbf
*.prj
tmp.*
tiles.list
@typebrook
typebrook / .gitignore
Last active March 13, 2025 09:59
nchdb.boch.gov.tw
!example*
@typebrook
typebrook / Makefile
Created February 14, 2025 09:51
Private power plant in Taiwan
.ONESHELL:
ZIP=power.private.zip
REMOTE=vps:/srv/riverbien/2025-02-14_民營電廠/
osm.list: bound.osm.geojson
jq -r '.features[]|.properties|select(.["@id"]|test("relation.*"))|.name' $< | sort -u >$@
gov.list: plant.solar.sort.csv
@typebrook
typebrook / list
Last active January 19, 2025 13:11
Get user location of Maplibre Voting members
adrian-cojocaru
acalcutt
alanchenboy
alexcristici
ambientlight
alasram
archdoog
atierian
bchapuis
bdon
@typebrook
typebrook / .gitignore
Last active February 10, 2025 09:01
extract power facilities in Taiwan from OSM
*.pbf
*.osm
*.pmtiles
*.shp/**
*.bak
@typebrook
typebrook / hyphenate.sh
Last active January 16, 2025 09:44
hyphenate name of taiwan town
#! /bin/bash
shopt -s nocasematch
declare -a syllables
sed 1d 鄉鎮市區.csv | \
while IFS=, read county district place symbol; do
read name suffix <<<"${place}"
name=${name^^}
@typebrook
typebrook / Makefile
Created February 20, 2023 04:29
Print ics parts of Taiwan holidays from open data #gov #ics #icalendar
.ONESHELL:
# https://data.gov.tw/dataset/14718
data.csv:
curl -L 'https://www.dgpa.gov.tw/FileConversion?filename=dgpa/files/202206/d52179b9-5e82-489b-86fd-716e959bfa5c.csv&nfix=&name=112%e5%b9%b4%e4%b8%ad%e8%8f%af%e6%b0%91%e5%9c%8b%e6%94%bf%e5%ba%9c%e8%a1%8c%e6%94%bf%e6%a9%9f%e9%97%9c%e8%be%a6%e5%85%ac%e6%97%a5%e6%9b%86%e8%a1%a8.csv' | \
iconv -f BIG-5 -t UTF-8 | \
dos2unix >$@
clean: data.csv
sed -i '1d; /,$$/d' $^
@typebrook
typebrook / mermaid.md
Created September 15, 2022 03:58
Test mermaid diagram
gantt
dateFormat  YYYY-MM-DD
title Adding GANTT diagram to mermaid
excludes weekdays 2014-01-10

section A section
Completed task            :done,    des1, 2014-01-06,2014-01-08
Active task               :active,  des2, 2014-01-09, 3d
Future task : des3, after des2, 5d