Skip to content

Instantly share code, notes, and snippets.

@KaKi87
KaKi87 / README.md
Last active December 2, 2025 15:48
dynapt experimental setup tutorial

dynapt — Experimental setup tutorial

Introduction

Welcome to the experimental setup tutorial for dynapt, the dynamic APT repository.

If you're reading this, you might be frustrated that an app you're using doesn't offer automated updates, by way of an APT repository, a PPA, or a Flatpak.

@adduc
adduc / docker-compose.yml
Last active December 1, 2025 15:32
Script to provision a forgejo / woodpecker CI setup and a token to interact with Woodpecker's services
services:
forgejo:
image: codeberg.org/forgejo/forgejo:1.19.3-0
tmpfs: ["/data"]
stop_signal: SIGKILL
ports: [ "3000:3000", "8000:8000" ]
environment:
# @see https://docs.gitea.com/next/administration/config-cheat-sheet
GITEA__database__DB_TYPE: sqlite3
@chrisswanda
chrisswanda / User specific host file wrapper
Last active February 17, 2025 00:30
Create a user specific host file
$HOSTALIASES no longer works with glibc (https://bugs.launchpad.net/debian/+source/glibc/+bug/1483187)
For my project, I needed to create a user specifc hosts file.
First clone this repo - https://github.com/figiel/hosts.git
################ README #####################################
hosts - wrapper for libc which provides defining host aliases in a per-user file
@gvenzl
gvenzl / One Liner to download the latest release from your GitHub repo.md
Last active November 9, 2025 18:26
One Liner to download the latest release from your GitHub repo
LOCATION=$(curl -s https://api.github.com/repos/<YOUR ORGANIZTION>/<YOUR REPO>/releases/latest \
| grep "zipball_url" \
| awk '{ print $2 }' \
| sed 's/,$//'       \
| sed 's/"//g' )     \
; curl -L -o <OUTPUT FILE NAME> $LOCATION

for example:

@zuzzas
zuzzas / debian-preseeded-iso.sh
Last active March 2, 2025 21:32
Create Debian netinstall iso with preseed file
set -e
set -u
# hat-tips:
# - http://codeghar.wordpress.com/2011/12/14/automated-customized-debian-installation-using-preseed/
# - the gist
# required packages (apt-get install)
# xorriso

Experimental Docker Libnetwork DHCP Driver

The DHCP driver is intended for users to be able to integrate Docker IP address management with their existing IPAM strategies that use DHCP for dynamic address assignment. DHCP enables users to allocate addresses in an organized fashion that will prevent overlapping IP address assignment by associating a unique MAC address from the container eth0 Ethernet interface to an IP address as determined by the DHCP pools defined in the DHCP configuration.

This driver only provides the DHCP client functionality. It does not include a DHCP server. The default driver offers single-host IPAM or for distributed multi-host orchestrated IPAM see the libnetwork overlay driver.

Getting Started

@FirefighterBlu3
FirefighterBlu3 / bs4-no-html-translations.py
Created January 24, 2016 01:40
Prevent BeautifulSoup from translating HTML charrefs and entities
import bs4.dammit
import bs4.builder._htmlparser
from bs4 import BeautifulSoup
# when analyzing spam, we always run into situations where the sender tries
# hard to obfuscate their input in order to sneak by spam detecting engines.
# instead of "ABC", they'll use HTML Entity references; &#65;&#66;&#67; in
# order to extract the viewer readable segments, we need a parser. most
# parsers try to be smart and clean things up. BeautifulSoup and lxml are
# two common parsers. lxml is largely compiled C so we can't tweak it very
@ga2arch
ga2arch / gist:8547483
Created January 21, 2014 20:13
Create Dummy ALSA Devices (en mass)
Create Dummy ALSA Devices (en mass)
Written by Mike C. Fletcher on April 16, 2012 in Tuxedo.
Since this was a bit of a pain to track down, here's the process, on an Ubuntu Server 12.04 machine, to create many ALSA dummy devices:
$ cat /etc/modprobe.d/alsa-dummy.conf
options snd-dummy enable=1,1,1,1,1,1,1,1,1,1,1,1 pcm_devs=4,4,4,4,4,4,4,4,4,4,4,4 fake_buffer=0,0,0,0,0,0,0,0,0,0,0,0
$ modprobe snd-dummy
That sample creates 48 dummy devices (on 12 cards), though that's likely more than you'll ever need. The fake_buffer array means they should all have a real internal buffer. The "enable" array is specifying how many cards to create. The pcm_devs array specifies how many pcm devices to have on each card.