Skip to content

Instantly share code, notes, and snippets.

View smellman's full-sized avatar

Taro Matsuzawa aka. btm smellman

View GitHub Profile
@smellman
smellman / Dockerfile
Created December 18, 2020 07:27
Py3dtiles 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
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
```
+ # 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
@smellman
smellman / 0001-supports-proj-changes-update-mercator-projection.patch
Created November 6, 2020 11:01
0001-supports-proj-changes-update-mercator-projection.patch
From cb83398706df33b08242e66714608c66e7d6b8e4 Mon Sep 17 00:00:00 2001
From: Taro Matsuzawa <taro@georepublic.co.jp>
Date: Fri, 6 Nov 2020 19:58:53 +0900
Subject: [PATCH] supports proj changes: update mercator projection
---
regress/core/tickets.sql | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/regress/core/tickets.sql b/regress/core/tickets.sql

PostgreSQL tuning via https://pgtune.leopard.in.ua/

# DB Version: 9.6
# OS Type: linux
# DB Type: dw
# Total Memory (RAM): 32 GB
# CPUs num: 8
# Data Storage: ssd
@smellman
smellman / openmaptiles-benchmark.md
Last active September 23, 2020 10:44
OpenMapTiles benchmark

Taro's vm on mac

spec

  • macbook pro 2018 + pararell desktop pro
  • 8 cpu
  • 16GB Memory
  • Ubuntu 20.04

results

@smellman
smellman / eduke32_error_position.diff
Created September 6, 2020 06:00
Eduke32 error position
diff --git a/source/duke3d/src/common.cpp b/source/duke3d/src/common.cpp
index d269f526f..41ef06dab 100644
--- a/source/duke3d/src/common.cpp
+++ b/source/duke3d/src/common.cpp
@@ -255,12 +255,13 @@ void G_ExtPreInit(int32_t argc,char const * const * argv)
void G_ExtInit(void)
{
+/*
#ifdef EDUKE32_OSX
@smellman
smellman / index.html
Created August 23, 2020 06:40
Kakegawa Castle on Cesium
<!DOCTYPE html>
<html>
 <head>
  <meta charset="UTF-8">
  <title>Kakegawa Castle on Cesium</title>
  <script src="https://cesium.com/downloads/cesiumjs/releases/1.72/Build/Cesium/Cesium.js"></script>
 <link href="https://cesium.com/downloads/cesiumjs/releases/1.72/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<style>
#cesiumContainer {
# shizuoka data convert to cesium data
docker run -it -v $(pwd):/entwine connormanning/entwine build -i /entwine/kakegawa.las -o /entwine/entwine -r EPSG:2444 EPSG:4978
ept tile -i entwine -o cesium/
cd cesium/kakegawa
npx serve -C
@smellman
smellman / openmaptiles-log-20200708.txt
Created July 11, 2020 06:09
openmaptiles logs 20200708
====> : Start SQL postprocessing: ./build/sql/* -> PostgreSQL
: Source code: https://github.com/openmaptiles/openmaptiles-tools/blob/master/bin/import-sql
Starting postgres docker compose target using default image (no recreate if exists)
Starting openmaptiles_postgres_1 ... done
docker-compose run --rm -u 1000:1000 openmaptiles-tools sh -c 'pgwait && import-sql' | \
awk -v s=": WARNING:" '$0~s{print; print "\n*** WARNING detected, aborting"; exit(1)} 1'
Importing /usr/src/app/sql/CleanNumeric.sql (md5 d8300fc8b346b6288993391fb4f3c31d - 18 lines) into Postgres...
Timing is on.
CREATE FUNCTION
Time: 11.222 ms