Skip to content

Instantly share code, notes, and snippets.

View ser's full-sized avatar
🎯
Focusing

ᎠᎡ. Ѕϵrgϵ Ѵictor ser

🎯
Focusing
View GitHub Profile
@ser
ser / de-partial-zrepl.py
Last active January 4, 2024 20:09
de-partial-zrepl (work in progress but mostly works)
!/usr/bin/env python3
import argparse
import re
import subprocess
import sys
#import time
from rich import print
from rich.progress import Progress
from rich.prompt import Confirm
@ser
ser / config.json
Last active July 19, 2023 03:52
OH MY MY POSH
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#7CC26A",
"foreground": "#FFFFFF",
"leading_diamond": "\u256d\u2500\ue0b6",
@ser
ser / gpspipe.md
Created July 18, 2022 02:14 — forked from nickoala/gpspipe.md
Log GPSD Outputs and Extract Lat/Lon

Log GPSD Outputs and Extract Lat/Lon

$ gpspipe -w             # log to stdout
$ gpspipe -w -o abc.log  # log to a file

To auto-log on startup, insert the following line to the file /etc/rc.local:

@ser
ser / collectd_lxd.py
Created August 11, 2020 15:05
COLLECTD LXD VIA API
#!/usr/bin/env python3
# (C) Serge Victor 2020, LGPL3 license, https://www.gnu.org/licenses/lgpl-3.0.en.html
# ADD
# LD_PRELOAD=/usr/lib/python3.8/config-3.8-x86_64-linux-gnu/libpython3.8.so
# to /etc/default/collectd
# RUN
# pip3 install pylxd
@ser
ser / reflect.py
Created July 12, 2019 14:34 — forked from 1kastner/reflect.py
A simple echo server to inspect http web requests
#!/usr/bin/env python
# Reflects the requests from HTTP methods GET, POST, PUT, and DELETE
# Written by Nathan Hamiel (2010)
from http.server import HTTPServer, BaseHTTPRequestHandler
from optparse import OptionParser
class RequestHandler(BaseHTTPRequestHandler):
def do_GET(self):
@ser
ser / btcpay.py
Created March 11, 2019 09:03
soon it will be on github
@blueprint.route('/admin/pair', methods=['GET', 'POST'])
@roles_accepted('admin')
def btcpaypair():
"""Payment processor pairing."""
btcpaypem_location = current_app.config.get('APP_DIR')+'/data/btcpayserver.key'
btcpaytoken_location = current_app.config.get('APP_DIR')+'/data/btcpayserver.token'
# Recognise if pairing is done and valid
try:
btcpayuri = current_app.config.get('BTCPAY_URI')
btcpaycode = current_app.config.get('BTCPAY_CODE')
<?php
/**
*
* This file is not a part of the phpBB Forum Software package.
* Please be sure what you are doing.
*
* This code is based on code written by Matthias Kesler
* Licensed under the Apache License, Version 2.0 (the "License");
* https://github.com/krombel/matrix-register-bot/
@ser
ser / lxd.sh
Created March 15, 2017 14:46
lxd deployment
!/bin/bash
# vim: tabstop=2 expandtab shiftwidth=2 softtabstop=2
#
#set -x
# Create LXD container
#
if [ $# -eq 0 ]
then
echo "dolxd \$NAME \$IP \$GW"
echo "dolxd kupa 10.33.1.1 10.33.0.1"
@ser
ser / keybase.md
Created June 13, 2014 16:47
keybase.md

Keybase proof

I hereby claim:

  • I am ser on github.
  • I am ser (https://keybase.io/ser) on keybase.
  • I have a public key whose fingerprint is B4AE 2A51 65F3 DDB7 992B 77E3 D0DF 1943 6128 3431

To claim this, I am signing this object: