Skip to content

Instantly share code, notes, and snippets.

View viscount-monty's full-sized avatar

viscount-monty

View GitHub Profile
@jeff47
jeff47 / Wildcard domains in pihole.md
Created September 7, 2025 00:33
Wildcard domains in pihole

It can be useful to create wildcard domains for local services.  Rather than create one for each local service, a wildcard is easier. It would be easy to use dnsmasq to do this, but Pihole no longer directly supports that.

There are two options to get this to work:

misc.dnsmasq_lines

The developers of Pihole anticipated that we might have this very need. In the GUI, switch to Expert mode and then go to All Settings->Miscellaneous. Scroll down to misc.dnsmasq_lines where you can add individual values that will be injected into the configuration.

Add address=/.local.mydomain.com/192.168.1.16 for a wildcard. (The leading . is vital!)

Regex domain redirects

@pranav083
pranav083 / Install_demo.md
Last active December 9, 2025 21:48
How to Install and run PCAN-USB FD on linux system
@aallan
aallan / async_webserver.py
Created July 4, 2022 15:38
An asynchronous webserver written in MicroPython to turn an LED on/off on a Raspberry Pi Pico W
import network
import socket
import time
from machine import Pin
import uasyncio as asyncio
led = Pin(15, Pin.OUT)
onboard = Pin("LED", Pin.OUT, value=0)
@GiovanniGrieco
GiovanniGrieco / podman_on_wsl2.md
Last active January 7, 2026 09:47
Install Podman on WSL2

Install Podman on Windows Subsystem for Linux 2 (WSL2)

This guide allows a safe and rootless installation of Podman on WSL2. Head over the hyperlinks to discover more about these two wonderful technologies!

This guide assumes that Debian 11 "bullseye" is installed as WSL2 base OS. To do it, simply open your Windows Powershell console under Admin rights and run

PS> wsl install -d Debian

After installation, please check that you are under the latest Debian. If not, please upgrade it.

@ennanco
ennanco / Dotfiles_backup.md
Last active December 25, 2025 02:28
Managing the dotfiles with style (git bare repo) 😎

I have recently come accross with a new solution to one of my biggest headaches in any linux system and it is to manage the nightmareof the dot files. I have previously used stow in order to mantain the symbolic links, but there is a much better solution using git bare repositories.

1. Creating the repository

  1. Create a git bare repository with the following line
    mkdir $HOME/.cfg
    git init --bare $HOME/.cfg
  1. Create an alias for a better managing of the configuration
@craigderington
craigderington / app.py
Created September 12, 2019 21:40
Python + Flask + Redis - Page Hit Counter
#!/usr/bin/python
from flask import Flask
from redis import Redis
app = Flask(__name__)
redis = Redis(host="172.17.0.2", port=6379)
@app.route("/", methods=["GET"])
@LouisAmon
LouisAmon / json_to_gzip.py
Created July 26, 2018 12:49
How to compress JSON-able data using gzip (Python 3)
import json
import gzip
def compress_data(data):
# Convert to JSON
json_data = json.dumps(data, indent=2)
# Convert to bytes
encoded = json_data.encode('utf-8')
# Compress
compressed = gzip.compress(encoded)
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active January 3, 2026 18:48
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line