Skip to content

Instantly share code, notes, and snippets.

View olithissen's full-sized avatar
🏠
Working from home

Oli Thissen olithissen

🏠
Working from home
View GitHub Profile
@olithissen
olithissen / get_all_statuses.sh
Created November 23, 2023 18:44
A bash script to retrieve all account statuses using the Mastodon API
#!/bin/bash
instance="your.instance.org"
access_token="your_access-token"
account_id="your-account-id"
api_endpoint="https://${instance}/api/v1/accounts/${account_id}/statuses"
min_id="1"
while true; do
response=$(curl -s -X GET -H "Authorization: Bearer ${access_token}" "${api_endpoint}?min_id=${min_id}&limit=40")
@olithissen
olithissen / vector.sql
Created May 30, 2023 09:14
PL/pgSQL vector and matrix functions
CREATE OR REPLACE FUNCTION get_vector_from_angles(azimuth double precision, altitude double precision) RETURNS double precision[] AS
$$
DECLARE
vector double precision[];
BEGIN
vector := ARRAY [ sin(azimuth) * cos(altitude),cos(azimuth) * cos(altitude), sin(altitude) ];
RETURN vector;
END;
$$ LANGUAGE plpgsql IMMUTABLE;
awacs_orbits_de.geojson:1 Refused to load the font 'data:font/truetype;charset=utf-8;base64,d09GRgABAAAAALY3ABIAAAABztAAAAAAAAC1QAAAAPcAAAHiAAAAAAAAAABHUE9TAACV9AAAFxIAAHKy/pn970dTVUIAAK0IAAAINQAAFD6g2KReTFRTSAAABtQAAAA6AAACQeO3nq5PUy8yAAACDAAAAFMAAABgZoZye2NtYXAAABxsAAADdwAABTpa8HPyY3Z0IAAAIbAAAAAoAAAAKAhGAbdmcGdtAAAf5AAAAQUAAAFzBpmcN2dhc3AAAJXoAAAADAAAAAwABwAHZ2x5ZgAAJkQAAGT0AADhaCjCChFoZG14AAAHEAAAFVwAADPIhU9AOGhlYWQAAAGUAAAANQAAADYFph12aGhlYQAAAcwAAAAgAAAAJAc2BPtobXR4AAACYAAABHEAAAj0jIVtDGxvY2EAACHYAAAEbAAABHyCc7p8bWF4cAAAAewAAAAgAAAAIARXAjxuYW1lAACLOAA...SCThVMYJIqZCqSu4rDezyzyKpY17tqhUyLsX30L+SQltAyggVZVqVMsLfPk1CNKvWoXtPreoMd2Ymd2YVd2S2+tbRTX92te3Sv7tP9egCjlnZ0oid96c/8LMkyrMgarMP67MDvNkYxV0uGjvOJFo+33umRlTnS48NR0ehv5tf6D/25M7IAAAB4AYVRRXfDMAz+K3q+jBc4DVyPmfGu56iNk9bKc9QO/ny5Y7iJP5DukGCGgtCjUDv2DZWsxsroHvmMA3jsUEM9TnoQx8NmHEMax+sKuqHdULlItRFFljsdCtZhW14qWh2mCiKj286Srwlc9vMROJ8M/Hcsak/njBZ6FrPHXtAKON/k7e/j0OQAb9h+mHVQhtg6Gm/r2TmjLVcvwbVymR6e31sY89p7uwn3o6Nvmx8XAmbUwVBOd48CVrkrwdWA8NYEbn69Ft3Z/AmDvFqGE2/f
@olithissen
olithissen / example.geojson
Created February 23, 2023 07:00
geoJSON Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

openpgp4fpr:1746113F877E72AC51E75B970E41827D76D10766

Velt Oeu plek ulekl nuaeplletl Oll Zepeke euteal. Iepeutettp, veuu Oeu ple 6ole lO etllnpplpekeu Zellelekeuhlllet, ple pe lu elueO telekl euaeleueleu Pekuvollelkonpekeu evlpekeu Pleooe nup Vetp lO lnpplpekeu llaeupvu vukul (lu peO uul knupell nup elu oeel Iekleu Ueu Iutplul aeplulpeu pelu Onpp) etp ueltouaelleu PlO pel lnpplpekeu Bluoeaeupe peeelekuel nup euaepleklp pel lnpplpekeu ZeppeuOulpe lu pel Vhlelue enpeOOeu Oll Goeluplue Puue Zellephu ent ple Ulple pep en puvhullleleupeu lnpplpekeu Gntlnlanlp pelel.
Weil man sich nicht ungestraft mit Mascha anlegt. Jedenfalls, wenn man die Göre im altrussischen Mütterchenkittel, die da in einem leicht angeranzten Bahnwärterhäuschen zwischen Steppe und Wald im russischen Irgendwo wohnt (in dem vor hundert und ein paar Jahren Leo Tolstoi gestorben sein muss) als verlängerten Arm der russischen Propaganda bezeichnet und angesichts der russischen Massenmorde in der Ukraine zusammen mit Operndiva Anna Netrebko auf die Liste des zu boykottierenden russischen Kulturguts set
@olithissen
olithissen / index.js
Last active April 10, 2022 13:00
Simple NodeJS script using turf.js to count overpass-turbo nodes within a given radius
"use strict";
// Install with 'npm i @turf/helpers @turf/distance'
import * as turf from "@turf/helpers";
import distance from "@turf/distance";
import * as fs from "fs";
// Your geo-corrdinates in lon, lat!
const from = turf.point([10, 52]);
const options = { units: "kilometers" };
@olithissen
olithissen / README.md
Created February 8, 2019 12:26
SCRIPT-8
@olithissen
olithissen / .block
Created May 22, 2017 09:10
es2015 d3v4 d3-sankey demo
license: mit
@olithissen
olithissen / .block
Last active May 22, 2017 09:04
fresh block
license: mit