Skip to content

Instantly share code, notes, and snippets.

View MKuranowski's full-sized avatar

Mikołaj Kuranowski MKuranowski

View GitHub Profile
@MKuranowski
MKuranowski / oregonDecoder.ino
Last active March 11, 2021 16:55
Decoding Oregon Scientific V3 signals using a cheap-ass 443 MHz receiver on a arduino
#include <Arduino.h>
// It wouldn't be possible if not for this PDF: https://www.osengr.org/WxShield/Downloads/OregonScientific-RF-Protocols-II.pdf
// And a bunch of other projects that do similar things
// Constants
#define OS3D_BUFFER_LEN 12
#define OS3D_RECEIVER_PIN 14 // D5
#define nibblesToReceiviedBits(msgNib) \
(msgNib + 1) * 4 // Given expected message length in nibbles (w/out) the
@MKuranowski
MKuranowski / profile_python_script.sh
Created August 3, 2020 12:44
Profiles a python script (pass arguments as to python3 ...) and produces a profile.pdf graph
# Before starting:
# sudo apt install python3 python3-pip graphviz
# pip3 install -U gprof2dot
python3 -m cProfile -o /tmp/profilestats "$@"
gprof2dot -f pstats /tmp/profilestats | dot -Tpdf -o profile.pdf
@MKuranowski
MKuranowski / truckersmp_downloader.sh
Created January 20, 2020 21:04
Bash script to download files required by TruckersMP
#!/bin/bash
download_dir="$base/prefix/drive_c/truckersmp"
download_url="https://download.ets2mp.com/files"
files_url="https://update.ets2mp.com/files.json"
if [[ $1 = "ets2" ]] ; then
target_type="ets2"
elif [[ $1 = "ats" ]] ; then
target_type="ats"
else
@MKuranowski
MKuranowski / missing_stops.json
Last active January 9, 2022 00:29
Additional data for creating ZTM Warsaw GTFS
{
"140605": [52.33945, 20.94478],
"140606": [52.33856, 20.94377],
"194601": [52.40461, 21.17250],
"194602": [52.40499, 21.17302],
"194701": [52.34054, 20.94689],
"194703": [52.34098, 20.94870],
"194704": [52.34049, 20.94736],
"194705": [52.34049, 20.94985],
"194706": [52.34008, 20.94679],
@MKuranowski
MKuranowski / public_bath.svg
Last active February 11, 2018 22:52
OSM-Carto Public Bath Icon
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.