Skip to content

Instantly share code, notes, and snippets.

@karussell
karussell / OffheapUrlDataAccess.java
Created September 18, 2021 09:08 — forked from jtheuer/OffheapUrlDataAccess.java
Graphhopper offheap storage with URL loader.
View OffheapUrlDataAccess.java
import com.google.common.base.Preconditions;
import com.graphhopper.storage.DAType;
import com.graphhopper.storage.DataAccess;
import com.graphhopper.util.NotThreadSafe;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xerial.larray.LByteArray;
import xerial.larray.japi.LArrayJ;
import java.io.ByteArrayInputStream;
@karussell
karussell / customizable-routing.ipynb
Last active July 28, 2020 12:33
customizable routing - the notebook needs to be trusted to run JavaScript which is required for the leaflet maps or view it on https://nbviewer.jupyter.org/gist/karussell/5b799b253e608a93aeb6b120ccc8e67a
View customizable-routing.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@karussell
karussell / price.md
Last active December 14, 2022 08:41
hetzner pricing for 256GB RAM servers and beyond
View price.md
name CPU 256GB-price max GB max-price price/1GB CPU Passmark Benchmark
SB (auction) Xeon® E5-1650 v3 Hexa-Core ~100€ 256 ~100€ 0.31-0.43 10413 (single: 2123)
PX92 (no avail) Xeon W-2145 8-Core 175€ 256 174€ 0.683 18057 (single: 2610)
AX161 EPYC™ 7502P 32-Core Zen2 267€ 1024 727€ 0.71-1.04 48995 (single: 1894)
PX93 Xeon W-2295 18-Core 267€ 512 463€ 0.9 -1.04 31484 (single: 2673)
DX152 2*Xeon® SP Silver 10-Core 267.96€ 768 492€ 0.640-1.074 19256
DX292 2*Xeon® SP Gold 16-Core 338.00€ 768 702€ 0.91-3.97 26585

For comparison: AX101 with AMD Ryzen 9 5950X has single core benchmark of 3464 (multi core benchmark 45833).

@karussell
karussell / install-android-sdk-linux.txt
Last active May 31, 2019 10:54
Install Android SDK for graphhopper/android
View install-android-sdk-linux.txt
https://developer.android.com/studio/#downloads => sdk-tools-linux-4333796.zip
mkdir android-sdk-linux
cd android-sdk-linux
unzip ~/Downloads/sdk-tools-linux-4333796.zip
android-sdk-linux/tools/bin/sdkmanager "build-tools;27.0.3"
android-sdk-linux/tools/bin/sdkmanager "platforms;android-27"
# building with JDK 11 fails currently with javax/xml/something not available
export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
mvn -P include-android clean install -DskipTests=true
@karussell
karussell / preview-git-pull-request.txt
Last active April 30, 2019 17:10
Preview git merge
View preview-git-pull-request.txt
This is a lot easier: https://gist.github.com/piscisaureus/3342247
Step 1: Check out a new branch to test the changes — run this from your project directory
git checkout -b dajac-jsoup-1.7.1 master
Step 2: Bring in dajac's changes and test ('jsoup-1.7.1' acts as commit message)
git pull https://github.com/dajac/snacktory.git jsoup-1.7.1