Skip to content

Instantly share code, notes, and snippets.

@naogify
naogify / pbf2geojson.js
Created August 28, 2025 21:32
PBFからGeoJSONに変換するスクリプト
#!/usr/bin/env node
/**
* PBF(MVT) -> GeoJSON
* Usage: node pbf2geojson.js /path/to/{z}/{x}/{y}.pbf > out.geojson
*/
const fs = require('fs');
const path = require('path');
const zlib = require('zlib');
const { VectorTile } = require('@mapbox/vector-tile');
const Pbf = require('pbf');
@naogify
naogify / upload-sync.sh
Last active November 25, 2025 08:15
xyz のタイルディレクトリをアップロードするスクリプト
#!/usr/bin/env bash
set -ex
# 引数チェック
if [ $# -ne 2 ]; then
echo "Usage: $0 <S3_BUCKET> <UPLOAD_DIR>"
exit 1
fi
S3_BUCKET="$1"
@voluntas
voluntas / duckdb_202501.md
Last active May 14, 2025 06:14
DuckDB 座談会 v2025.1

DuckDB 座談会 v2025.1 発表者向け資料

これはDuckDB 座談会 (2025-01) の発表者向けの資料です。

DuckDB とは

こちらの資料がとてもお勧めです。

@naogify
naogify / shape2datapng.sh
Last active November 25, 2025 08:14
ShapeをDATA PNGに変換するスクリプト
#!/usr/bin/env bash
set -ex
# 引数のチェック
if [ $# -ne 2 ]; then
echo "エラー: 必要な引数が指定されていません。" >&2
echo "使用方法: $0 <カラーテーブルファイル: 例 color_table.txt> <対象フィールド名: 例 Max_Rank>" >&2
exit 1
fi
@mrtry
mrtry / slide.md
Last active August 21, 2025 04:41
expo-routerで(Deep|Web) Link対応

title: expo-routerで(Deep|Web) Link対応 author: mrtry date: 2024/10/04

このスライドでわかること

  • (Deep|Web) Linkがどういうものかわかる
  • expo-routerでの(Deep|Web) Linkの対応方法がわかる
@keichan34
keichan34 / index.ts
Created January 26, 2024 01:11
政令指定都市の自治体コード
// 政令指定都市 (元データでは行政区になっているが、私達は区域全体でまとめたい(東京23特別区以外))
// この配列は、行例指定都市の公共団体コードの頭3または4桁を含む
const DESIGNATED_CITIES = [
/^011/, // 北海道札幌市
/^041/, // 宮城県仙台市
/^111/, // 埼玉県さいたま市
/^121/, // 千葉県千葉市
/^141(?!3|5)/, // 神奈川県横浜市
/^1413/, // 神奈川県川崎市
/^1415/, // 神奈川県相模原市
// unofficial sqlite3 types.
// These are typed only for my scope
declare module "@sqlite.org/sqlite-wasm" {
type InitOptions = {
print: (...msg: any[]) => void;
printErr: (...msg: any[]) => void;
};
declare type PreparedStatement = {
@keichan34
keichan34 / README.md
Last active November 12, 2025 05:56
法務省データもろもろ
cp -r moj_data/ ./
mkdir all_zips
find . -name '*.zip' -maxdepth 1 | xargs -P 16 -I '{}' unzip '{}' -d ./all_zips

ここで all_zips に展開されたzipがある 次は任意座標と公共座標系を分ける

@iulian0512
iulian0512 / geos3.10.2-makefile-iossimulator
Created May 10, 2022 09:49
geos 3.10.2 ios simulator makefile
XCODE_DEVELOPER = $(shell xcode-select --print-path)
#used for selecting the sdk dir
IOS_PLATFORM ?= iPhoneOS
# Pick latest SDK in the directory
IOS_PLATFORM_DEVELOPER = ${XCODE_DEVELOPER}/Platforms/${IOS_PLATFORM}.platform/Developer
IOS_SDK = ${IOS_PLATFORM_DEVELOPER}/SDKs/$(shell ls ${IOS_PLATFORM_DEVELOPER}/SDKs | sort -r | head -n1)
all:
@yahonda
yahonda / ruby31onrails.md
Last active June 8, 2025 17:51
Ruby 3.1 on Rails

Ruby 3.1 on Rails

Actions required to use Ruby 3.1.0 with Rails

Rails 7.0.Z

  • Rails 7.0.1 is compatible with Ruby 3.1.0.
  • Rails 7.0.1 addes net-smtp, net-imap and net-pop gems as Action Mailbox and Action Mailer dependency, you do not need to add them explicitly in your application Gemfile anymore.
  • thor 1.2.1 has been released. You will not see DidYouMean::SPELL_CHECKERS.merge deprecate warnings anymore.

Rails 6.1.Z

  • Use Rails 6.1.5 to support database.yml with aliases and secrets.yml with aliases.