Skip to content

Instantly share code, notes, and snippets.

View smellman's full-sized avatar

Taro Matsuzawa aka. btm smellman

View GitHub Profile
--- src/3rdparty/chromium/v8/src/base/bit-field.h.orig 2024-07-16 13:14:42
+++ src/3rdparty/chromium/v8/src/base/bit-field.h 2024-07-16 13:16:11
@@ -40,7 +40,7 @@
static constexpr U kNumValues = U{1} << kSize;
// Value for the field with all bits set.
- static constexpr T kMax = static_cast<T>(kNumValues - 1);
+ static constexpr T kMax = static_cast<T>((1U << kBits) - 1);
template <class T2, int size2>
--- src/plugins/hunspell/hunspell.pro.orig 2024-07-14 22:25:32
+++ src/plugins/hunspell/hunspell.pro 2024-07-15 16:47:34
@@ -2,6 +2,9 @@
include(../../config.pri)
+INCLUDEPATH += /usr/local/include
+LIBS += -L/usr/local/lib -lhunspell
+
SUBDIRS += \
--- src/3rdparty/mapbox-gl-native/deps/boost/1.65.1/include/boost/mpl/aux_/integral_wrapper.hpp.orig 2024-07-14 16:34:25
+++ src/3rdparty/mapbox-gl-native/deps/boost/1.65.1/include/boost/mpl/aux_/integral_wrapper.hpp 2024-07-14 16:35:23
@@ -70,7 +70,7 @@
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (N - 1)) ) prior;
#else
typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value + 1)) ) next;
- typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value - 1)) ) prior;
+ typedef AUX_WRAPPER_INST( BOOST_MPL_AUX_STATIC_CAST(AUX_WRAPPER_VALUE_TYPE, (value > 0 ? value - 1 : 0))) prior;
#endif
@smellman
smellman / .gitignore
Last active December 9, 2024 01:33
WIP: qt5 build for qgis macos x86_64
qt-everywhere-opensource-src*
qt-everywhere-src*
venv/
@smellman
smellman / gist:3803a106b2acec2b69015066981a32a5
Created April 13, 2024 12:12
linux benchmark 2024/04/13-2
❯ ./diskspd -Zr -b1M -d5 -o8 -t1 -W0 -Sd -w100 -L ./SEQ1M_Q8T1.dat
Command Line: ./diskspd -Zr -b1M -d5 -o8 -t1 -W0 -Sd -w100 -L ./SEQ1M_Q8T1.dat
System info:
processor count: 16
caching options: fua=0
Input parameters:
@smellman
smellman / gist:0f96989282317086afcea8b428cb3943
Created April 13, 2024 12:10
linux benchmark 2024/04/13-1
❯ ./diskspd -c1G -Zr -b1M -d5 -o8 -t1 -W0 -Sd -w0 -L ./SEQ1M_Q8T1.dat
Command Line: ./diskspd -c1G -Zr -b1M -d5 -o8 -t1 -W0 -Sd -w0 -L ./SEQ1M_Q8T1.dat
System info:
processor count: 16
caching options: fua=0
Input parameters:
@smellman
smellman / geojson_to_epsg3857.rb
Created August 8, 2023 10:54
GeoJSON (FeatureCollection) to EPSG:3857
#!/usr/bin/env ruby
# frozen_string_literal: true
require 'rgeo'
require 'rgeo/geo_json'
require 'rgeo/proj4'
require 'optparse'
OptionParser.new do |opts|
opts.banner = 'Usage: geojson_to_epsg3857.rb [options]'
<!DOCTYPE html>
<html>
<head>
<link href='https://unpkg.com/[email protected]/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/[email protected]/dist/maplibre-gl.js'></script>

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`;
#!/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