Skip to content

Instantly share code, notes, and snippets.

Avatar

Taro Matsuzawa aka. btm smellman

View GitHub Profile
View maplibre-gl-legend-umd-error.html
<!DOCTYPE html>
<html>
<head>
<link href='https://unpkg.com/maplibre-gl@3.0.0/dist/maplibre-gl.css' rel='stylesheet' />
<link
href="https://www.unpkg.com/@watergis/maplibre-gl-legend@latest/dist/maplibre-gl-legend.css"
rel="stylesheet"
/>
<title>WIP</title>
<script src='https://unpkg.com/maplibre-gl@3.0.0/dist/maplibre-gl.js'></script>
View srtm_contour_to_vector_tile.md

SRTM Contour to vector tile

Download SRTM Contour from OpenDEM Project

#!/bin/bash

urls=urls.txt
base_url=http://opendemdata.info/data/srtm_contour
for y in `seq -w 0 85`;
View shizuoka_pointcloud_db.sh
#!/bin/bash
ALL_TEXT=all.txt
URL="https://pointcloud.pref.shizuoka.jp/lasmap/ankenmapsrc?request=MarkerSet&Xmax=139.493408203125&Xmin=137.27279663085938&Ymax=35.52775582793653&Ymin=34.42163771567672"
BASE_URL="https://pointcloud.pref.shizuoka.jp/lasmap/ankendetail?ankenno="
RESULT=result.txt
wget -O $ALL_TEXT $URL
records=(`cat $ALL_TEXT | tr -s '?' ' '`)
for record in "${records[@]}"; do
@smellman
smellman / .env
Created July 20, 2021 12:07
openmaptiles .env file
View .env
# This file defines default environment variables for all images
# Layers definition and meta data
TILESET_FILE=openmaptiles.yaml
# Use 3-part patch version to ignore patch updates, e.g. 5.0.0
TOOLS_VERSION=5.3
# Make sure these values are in sync with the ones in .env-postgres file
PGDATABASE=openmaptiles
View gist:04a134cd530fd225726b7c3679665b11
ffmpeg -thread_queue_size 512 -f alsa -i hw:2,0 -f v4l2 -s 1280x720 -i /dev/video1 -vcodec libx264 -pix_fmt yuv420p -preset ultrafast -g 20 -b:v 2000k -acodec aac -b:a 128k -threads 0 -f flv rtmp://a.rtmp.youtube.com/live2/xxxxxxxxxxx
@smellman
smellman / Dockerfile
Created July 1, 2021 23:53
pandoc/latex + eisvogel template
View Dockerfile
FROM pandoc/latex:2.14.0.3
ARG eisvogel_version=2.0.0
RUN tlmgr install luatexja
RUN tlmgr install haranoaji haranoaji-extra
RUN tlmgr install adjustbox babel-german background bidi collectbox csquotes everypage filehook footmisc footnotebackref framed fvextra letltxmacro ly1 mdframed mweights needspace pagecolor sourcecodepro sourcesanspro titling ucharcat ulem unicode-math upquote xecjk xurl zref || exit 1
RUN tlmgr install selnolig || exit 1
RUN mkdir -p /templates/eisvogel \
View test.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@smellman
smellman / Dockerfile
Created December 18, 2020 07:27
Py3dtiles dockerfile
View Dockerfile
FROM ubuntu:20.10
LABEL maintainer="Taro Matsuzawa (taro@georepublic.co.jp)"
WORKDIR /
RUN set -ex \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
python3 \
python3-pip \
@smellman
smellman / Dockerfile
Created December 16, 2020 05:52
Potree 1.7 Dockerfile
View Dockerfile
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends g++-8 git build-essential cmake make ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# gcc-8 is required for new c++17 headers used in Potree Converter
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
RUN mkdir /data
@smellman
smellman / omt_benchmark.txt
Last active February 6, 2021 11:16
OpenMapTiles Bench Mark
View omt_benchmark.txt
```
+ # pgtune + dw
+ command: postgres -c max_connections=40 -c shared_buffers=8GB -c effective_cache_size=24GB -c maintenance_work_mem=2GB -c checkpoint_completion_target=0.9 -c wal_buffers=16MB -c default_statistics_target=500 -c random_page_cost=1.1 -c effective_io_concurrency=200 -c work_mem=26214kB -c min_wal_size=4GB -c max_wal_size=16GB -c max_worker_processes=8 -c max_parallel_workers_per_gather=4
+ # pgtune + oltp
+ # command: postgres -c max_connections=40 -c shared_buffers=8GB -c effective_cache_size=24GB -c maintenance_work_mem=2GB -c checkpoint_completion_target=0.9 -c wal_buffers=16MB -c default_statistics_target=100 -c random_page_cost=1.1 -c effective_io_concurrency=200 -c work_mem=52428kB -c min_wal_size=2GB -c max_wal_size=8GB -c max_worker_processes=8 -c max_parallel_workers_per_gather=4
+ # pgtune + web
+ # command: postgres -c max_connections=40 -c shared_buffers=8GB -c effective_cache_size=24GB -c maintenance_work_mem=2GB -c checkpoint_completion_target=0.7 -c wal_buff