Skip to content

Instantly share code, notes, and snippets.

View vooon's full-sized avatar
🚴‍♂️
Working from home

Vladimir Ermakov vooon

🚴‍♂️
Working from home
View GitHub Profile
@vooon
vooon / pbs.nix
Created September 16, 2025 09:59
Backup Paperless-ngx data to Proxmox Backup Server on NixOS
{ config, pkgs, ... }:
let
pbs_sh = pkgs.writeShellScriptBin "pbs.sh" ''
set -o pipefail
backup_log="$(mktemp -u -t pbs-backup.log.XXXXXX)"
atexit() {
rm -f "$backup_log"
}
trap atexit EXIT
@vooon
vooon / gist:b305da25e03087d1134f6b287fdba106
Created September 2, 2025 11:42
qemu 10.0.2 dbus display build error
x86_64-openwrt-linux-gnu-gcc -m64 -Ilibcommon.a.p -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/pixman-1 -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/libpng16 -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/spice-server -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/spice-1 -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/glib-2.0 -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/lib/glib-2.0/include -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/libusb-1.0 -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/gio-unix-2.0 -I/home/build/LEDE/openwrt/staging_dir/target-x86_64_glibc/usr/include/slirp -flto=auto -fdiagnostics-color=auto -Wall -Winvalid-pch -std=gnu11 -O2 -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-security -Wformat-y2k -Wignored-qualifiers
@vooon
vooon / gcloud_config.go
Last active December 10, 2024 11:35
Some useful helpers to setup gophercloud
import (
"context"
"crypto/tls"
"log/slog"
"net/http"
"github.com/gophercloud/gophercloud/v2"
"github.com/gophercloud/gophercloud/v2/openstack/config"
"github.com/gophercloud/gophercloud/v2/openstack/config/clouds"
oscli "github.com/gophercloud/utils/v2/client"
# Config for Xiaomi MJXDD01YL Ceiling lamp
# modified to have esp32 instead of mediatek chip.
#
# Based on: https://github.com/syssi/esphome-yeelight-ceiling-light
# See: https://github.com/syssi/esphome-yeelight-ceiling-light/issues/10
---
substitutions:
uname: Room2 Ceiling Light
device_name: room2-ceiling-light
friendly_name: $uname
@vooon
vooon / octoprint.service
Created June 27, 2018 10:10
Octoprint unit file for running on Orange Pi with Armbian 5
[Unit]
Description=OctoPrint
After=network.target
[Service]
User=max
ExecStart=/home/max/octoprint/venv/bin/octoprint serve
Restart=always
[Install]
@vooon
vooon / ZRIB-Repetier-Configuration.h
Last active November 30, 2017 19:04
Zonestar P802QSA ZRIB Repetier configuration (optical endstop).
/*
This file is part of Repetier-Firmware.
Repetier-Firmware is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Repetier-Firmware is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@vooon
vooon / rpi3-v7-v8.md
Last active June 26, 2017 20:13
Raspberry Pi3 running ARMv7 and ARMv8 LEDE

LEDE master (f33de802) compilled in armhf and aarch64 modes.

Test: https://github.com/bitbank2/gcc_perf

Test v7 [ms] v8 [ms] delta %
Combine Masks C (bigger than cache) 3308 3331 -23 99,31%
Combine Masks C (smaller than cache) 1453 1203 250 120,78%
Combine Masks SIMD (bigger than cache) 3269 3384 -115 96,60%
Combine Masks SIMD (smaller than cache) 1044 769 275 135,76%
@vooon
vooon / run-sync.sh
Created June 6, 2017 08:06
Howto run syncthing on Android 2.3 (on Onyx Boox C63ML)
#!/bin/sh
#
# 1. download Syncthing for Linux ARM
# 2. Install: https://play.google.com/store/apps/details?id=jackpal.androidterm
# 3. Put syncthing-arm to device SD card
#
# run: source /sdcard/runsync
#
# location of treminal folder
@vooon
vooon / ttyping.cc
Created June 22, 2016 13:16
Quick and dirty TTY ping
/* Simple ping-pong test for TTY
*
* Depends on: Boost.ASIO and docopt.cpp
* https://github.com/docopt/docopt.cpp.git
*
* Complie:
g++ -std=c++14 -pthread ttyping.cc -o ttyping -lboost_system -static -I/usr/local/include -ldocopt
* Testing socat:
@vooon
vooon / ws2812b.h
Created March 13, 2016 22:19
Code snippet of WS2812b smart led driver for STM32F373 & ChibiOS
#pragma once
typedef struct {
uint8_t r;
uint8_t g;
uint8_t b;
} rgb_t;
void wsInit(void);