Skip to content

Instantly share code, notes, and snippets.

Bootloader initializing. Available RAM: 2 GiB
Waiting for root partition to be alive...0
Waiting for root partition to be alive...1
... root partition is alive!
ext2fs_check_if_mount: Can't check if filesystem is mounted due to missing mtab file while determining whether /dev/mapper/storehwcrypt is mounted.
/dev/mapper/storehwcrypt: recovering journal
/dev/mapper/storehwcrypt: clean, 104/65536 files, 15404/262144 blocks
mount: /lib/splash/cache/: mount point does not exist.
/etc/init.d/S00splashscreen: line 27: /sbin/fbsplashd.static: not found
@Phaeilo
Phaeilo / upload_and_print.sh
Last active August 24, 2025 22:41
Use the PrusaLink API with curl to upload & print a G-Code file
#!/bin/bash
# Use the PrusaLink API with curl to upload & print a G-Code file
# Usage: ./upload_and_print.sh <gcode_file>
# License: CC-0 / Public Domain
PRINTER_URL="${PRUSA_PRINTER_URL:-}" # must not include trailing slash!
PRINTER_API_KEY="${PRUSA_API_KEY:-}"
if [ $# -eq 0 ]; then
@Phaeilo
Phaeilo / blitzer.py
Created June 15, 2025 22:16
Speed Camera Data Downloader and POI Finder
#!/usr/bin/env python3
"""
Speed Camera Data Downloader and POI Finder
A simple Python tool to download speed camera and POI data and find nearby points of interest
based on your current coordinates.
License: CC-0 / Public Domain
Usage:
@Phaeilo
Phaeilo / unpack_etq.py
Last active February 25, 2023 16:13
Unpack .etq and .lpg files used by hamradiotrainer
#!/usr/bin/env python3
import struct
import sys
import hashlib
import zlib
with open("./hamradiotrainer.exe", "rb") as fh:
key = fh.read()
assert hashlib.sha256(key).hexdigest() == "b1615d0efc0ee2d1a1714df0dbb1eb3d1283c075db19e8b032044231303d3ae5"
@Phaeilo
Phaeilo / lock_screen.sh
Created May 27, 2019 20:26
i3lock with xfce power manager
#!/bin/sh
AC_BLANK=$(xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/blank-on-ac)
AC_OFF=$(xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-off)
AC_SLEEP=$(xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-sleep)
revert () {
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/blank-on-ac -s $AC_BLANK
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-off -s $AC_OFF
xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/dpms-on-ac-sleep -s $AC_SLEEP
}
trap revert HUP INT TERM
@Phaeilo
Phaeilo / dns_server.py
Created December 4, 2016 23:24
Bare bones Python 3 DNS server
#!/usr/bin/env python3
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
#
# In jurisdictions that recognize copyright laws, the author or authors
@Phaeilo
Phaeilo / archvm.sh
Last active May 24, 2022 19:55
Archlinux VM automated installation script.
#!/bin/bash
# The MIT License (MIT)
#
# Copyright (c) 2015 Philip Huppert
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@Phaeilo
Phaeilo / PKGBUILD
Created November 15, 2014 21:00
PKGBUILD for Lattice Diamond 3.3 Linux x86_64
pkgname=latticediamond
pkgver=3.3
pkgrel=1
pkgdesc="Leading edge design software for Lattice FPGA families."
arch=("x86_64")
url="http://www.latticesemi.com/Products/DesignSoftwareAndIP/FPGAandLDS/LatticeDiamond.aspx"
license=("custom")
depends=("glibc" "libjpeg-turbo" "libtiff" "glib2" "libusb" "freetype2" "fontconfig" "libx11" "libice" "libxt" "libxext" "libxrender" "libxi" "libxft")
options=("!strip" "docs" "libtool" "staticlibs" "emptydirs")
@Phaeilo
Phaeilo / binsearchit.py
Created August 22, 2013 14:06
Iterator for doing binary searches.
#!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2013 Philip Huppert
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@Phaeilo
Phaeilo / PlotWigleWifi.py
Created July 23, 2013 10:40
Script to plot all samples in the database of the Wigle Wifi app.
#!/usr/bin/env python
# The MIT License (MIT)
#
# Copyright (c) 2013 Philip Huppert
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of