# Do not run this command, you'll realize the response is too big
OVERPASS_API=https://overpass.nchc.org.tw/api/interpreter
echo "node[shop="convenience"];out;" \
| curl -d @- -X POST $OVERPASS_API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://api.github.com/authorizations \ | |
--user "typebrook" \ | |
--data '{"scopes":["gist"], "note": "gist"}' | |
read -p "2-factor code: " OTP | |
curl https://api.github.com/authorizations \ | |
--user typebrook -H "X-GitHub-OTP: $OTP" \ | |
--data '{"scopes": ["gist"], "note": "gist"}' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SHELL := /bin/bash | |
data/taiwan-latest.osm.pbf: | |
mkdir -p data | |
curl -o $@ http://download.geofabrik.de/asia/taiwan-latest.osm.pbf | |
data/village.zip: | |
mkdir -p data | |
curl -o $@ 'https://whgis.nlsc.gov.tw/DownlaodFiles.ashx?oid=1008&path=Opendata/OpendataFiles/OFiles_71ae710e-fe25-4649-ab9c-779921dd02fb.zip' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# | |
# Author: Hsieh Chin Fan (typebrook) <typebrook@gmail.com> | |
# License: MIT | |
# https://gist.github.com/typebrook/4947769e266173303d8848f496e272c9 | |
# | |
# Originally created by stefanbuck | |
# fork from: https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
# | |
# -- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: 108.csv output.csv output.geojson | |
# CSV file for address in Tainan | |
# see dataset at web page: https://data.tainan.gov.tw/dataset/108-address-location | |
108.csv: | |
curl -LO https://data.tainan.gov.tw/dataset/32d604ed-9c9e-4d12-9c55-d33b1bb5fd60/resource/2389d5b2-451b-4b6a-b808-d2803717b196/download/108.csv | |
# Transform from TWD97 to EPSG:4326 | |
# see GDAL release page: https://gdal.org/download.html | |
# and doc for CSV driver: https://gdal.org/drivers/vector/csv.html |
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 8 columns, instead of 7. in line 9.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
圖號,行政區1,行政區2,行政區3,起始頁,結束頁,新頁碼,連結 | |
1916-1,澎湖縣,,,2,3,6,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=6 | |
1917-2,澎湖縣,,,4,5,7,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=7 | |
2017-4,澎湖縣,,,6,19,8,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=8 | |
2018-3,澎湖縣,,,20,21,15,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=15 | |
2114-1,高雄縣,屏東縣,高雄市,22,38,16,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=16 | |
2114-2,高雄縣,屏東縣,,38,45,24,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=24 | |
2115-1,高雄縣,台南縣,,46,66,28,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=28 | |
2115-2,高雄縣,屏東縣,,66,90,38,https://map.happyman.idv.tw/~happyman/cv/comicview.php?filename=.%2Fcontents/TW3.zip#&gid=1&pid=38 | |
2115-3,高雄縣,,,90,92, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
target=$(cd $(dirname $1) && git rev-parse --show-toplevel) | |
cd $target | |
file=${1#$target/} | |
anchor=$(git rev-parse HEAD:$file) | |
cd $2 | |
if ! git cat-file -e $anchor 2>/dev/null; then | |
echo $anchor not found |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -d @- -X POST --header "Authorization: token $(token github)" https://api.github.com/graphql <<EOF | |
{ | |
"query": "{ | |
user(login: \"typebrook\") { | |
gists(last: 50) { | |
nodes { | |
isPublic | |
resourcePath | |
description | |
stargazerCount |
- Get bat-to-ext-converter and sed
- Open
bat-to-ext-converter
, and wrapmerge.bat
,sed.exe
,merge.sed
into a single exe file - Run
signtool /a /tr http://tsa.starfieldtech.com merge.exe
to sign exe file