Skip to content

Instantly share code, notes, and snippets.

@gkbrk
gkbrk / Cargo.toml
Last active March 4, 2019 05:37
Asynchronous server example in Rust
[package]
name = "rust-async-qotd"
version = "0.1.0"
authors = ["Gökberk Yaltıraklı <[email protected]>"]
[dependencies]
tokio = { git = "https://github.com/tokio-rs/tokio" }
rand = "0.3"
@negz
negz / kubedump.sh
Last active July 11, 2024 10:57
Dump Kubernetes cluster resources as YAML
#!/usr/bin/env bash
set -e
CONTEXT="$1"
if [[ -z ${CONTEXT} ]]; then
echo "Usage: $0 KUBE-CONTEXT"
exit 1
fi
@inkrement
inkrement / clickhousedump
Created August 19, 2017 14:26
dump all clickhouse databases and tables
#!/bin/bash
OUTDIR=.
while read -r db ; do
while read -r table ; do
if [ "$db" == "system" ]; then
echo "skip system db"
continue 2;
@sanchezzzhak
sanchezzzhak / clickhouse-get-tables-size.sql
Created January 18, 2018 13:43
clickhouse get tables size
SELECT table,
formatReadableSize(sum(bytes)) as size,
min(min_date) as min_date,
max(max_date) as max_date
FROM system.parts
WHERE active
GROUP BY table
@PayasR
PayasR / routing_algorithm_implementations.txt
Last active December 25, 2023 08:52 — forked from systemed/gist:be2d6bb242d2fa497b5d93dcafe85f0c
Routing algorithm implementations
**Interesting/widely used implementations of pathfinding algorithms.
==========================================================================
A* Ruby https://github.com/georgian-se/shortest-path
A* (bidirectional with shortcuts) C++ https://github.com/valhalla/valhalla
A* Unity https://arongranberg.com/astar/front
NBA* JS https://github.com/anvaka/ngraph.path
NBA* Java https://github.com/coderodde/GraphSearchPal
NBA* Java https://github.com/coderodde/FunkyPathfinding
NBA* (Parallel) C++ https://github.com/janhsimon/PNBAStar
@mikaelhg
mikaelhg / helsinki_maps.sh
Last active June 27, 2024 05:57
Generate static, Helsinki only map tiles from OpenStreetMap data
# Bounding box from http://norbertrenner.de/osm/bbox.html
HELSINKI_BBOX=24.577,60.079,25.228,60.335
# OpenStreetMap extract file from Geofabrik
wget https://download.geofabrik.de/europe/finland-latest.osm.pbf
# Cut the 500 MB Finland data file into a 34 MB Helsinki data file
# as this is much faster than using the import bbox.
osmconvert finland-latest.osm.pbf -b="$HELSINKI_BBOX" --out-pbf >helsinki.pbf