Skip to content

Instantly share code, notes, and snippets.

@queeup
queeup / ssdp.py
Created October 20, 2013 00:48 — forked from dankrause/ssdp.py
import socket
import httplib
import StringIO
class SSDPResponse(object):
class _FakeSocket(StringIO.StringIO):
def makefile(self, *args, **kw):
return self
def __init__(self, response):
r = httplib.HTTPResponse(self._FakeSocket(response))
var dgram = require('dgram'); // dgram is UDP
// Listen for responses
function listen(port) {
var server = dgram.createSocket("udp4");
server.on("message", function (msg, rinfo) {
console.log("server got: " + msg + " from " + rinfo.address + ":" + rinfo.port);
});
@queeup
queeup / remove-completed-torrents.sh
Created November 1, 2019 21:53 — forked from Luismcplopes/remove-completed-torrents.sh
Transmission-Daemon: Remove or/and Move Completed Torrents
#!/bin/sh
# https://community.wd.com/t/guide-auto-removal-of-downloads-from-transmission-2-82/93156
# script to check for complete torrents in transmission folder, then stop and move them
# either hard-code the MOVEDIR variable here…
# MOVEDIR=/home/amhiserver/.box # the folder to move completed downloads to
# …or set MOVEDIR using the first command-line argument
# MOVEDIR=%1
#
# auth
# port, username, password
@queeup
queeup / bobp-python.md
Created April 16, 2020 19:06 — forked from fiorentinogiuseppe/bobp-python.md
A "Best of the Best Practices" (BOBP) guide to developing in Python.

The Best of the Best Practices (BOBP) Guide for Python

A "Best of the Best Practices" (BOBP) guide to developing in Python.

In General

Values

  • "Build tools for others that you want to be built for you." - Kenneth Reitz
  • "Simplicity is alway better than functionality." - Pieter Hintjens

2022 Zephyrus G14 Fedora Silverblue Setup

GPU Naming

Most applications in Linux will report the names of the two GPUs as follows.

  • Dimgrey Cavefish is dGPU
  • Yellow Carp is iGPU

Boot Hotkeys

# tailscale under podman on fedora
# tested on Fedora IOT (arm64 and amd64) and Silverblue (amd64).
# !!! Not to be run as a script (contains reboot) !!!
# ensure the tun module is loaded by default
echo tun > /etc/modules-load.d/tun.conf
# ensure iptables xt_mark module is enabled and loaded
echo xt_mark > /etc/modules-load.d/xt_mark.conf
# ensure iptables ip6table_filter module is enabled and loaded
echo ip6table_filter > /etc/modules-load.d/ip6table_filter.conf
# iptables rather than nftables, for compatibility
@queeup
queeup / fedora36-silverblue.sh
Created June 29, 2022 20:15
install script for Fedora 36 Silverblue
#!/bin/bash
# repos
sudo rpm-ostree install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
sudo sh -c 'echo -e "[repo-tuxedo-computers]
name=TUXEDO Computers - 15.3
baseurl=https://rpm.tuxedocomputers.com/opensuse/15.3
path=/
@queeup
queeup / ubuntu.md
Created July 3, 2022 22:43 — forked from cednore/ubuntu.md
My personal environment setup guide on Ubuntu