Skip to content

Instantly share code, notes, and snippets.

View williamdes's full-sized avatar
🚀
Catching up on GitHub notifications

William Desportes williamdes

🚀
Catching up on GitHub notifications
View GitHub Profile
@williamdes
williamdes / how_to_sign_keys.md
Last active September 11, 2025 19:43
GPG key signing

Signing a key

NB: to list keys: gpg --list-keys

If you have the key, delete it

gpg --delete-key keyIDhereReplaceMe

Fetch it

gpg --keyserver keys.gnupg.net --recv-keys keyIDhereReplaceMe
@williamdes
williamdes / ACME-SH-docker-compose.md
Last active August 26, 2024 14:23 — forked from Dreamacro/ACMESH.md
acme.sh using docker-compose

How to use

$ docker compose -f acmesh.yaml up -d

.env

ACME_HOME_DIR=./acme.sh
@williamdes
williamdes / PHP_SOCKET_CLIENT_SERVER.md
Last active April 8, 2026 09:34
PHP Socket client server example

PHP Socket client server example

With this example you will be able to use modern PHP code and have multiple clients connected.

The code is inspired and sourced from the of the posted notes here.

If you CTRL-C stopped the server, run the script twice. The first time will clean up the left over socket. Or just remove the socket file before starting the server.

There is a "magic" command (STOP) in the code to stop the server, you can easily remove it.

@williamdes
williamdes / add-cert.sh
Last active December 23, 2021 11:21
Add a certificate to an existing certificate using acme.sh
#!/bin/sh
# Source: https://gist.github.com/williamdes/7a63ba6af24ea91edaf988ba8078b0fa
set -eu
if [ -z "${1:-}" ]; then
echo "Missing the domain name to add"
echo "Use: ~/add-cert.sh mynewdomain.tld"
echo "To add multiple domains you can use: ~/add-cert.sh \"mynewdomain.tld -d www.mynewdomain.tld\""
@williamdes
williamdes / sentry-pure-js-node-js-reporter.js
Last active May 4, 2024 13:03
Pure NodeJs Sentry reporter compatible with AWS lambda
/**
* @source https://github.com/errwischt/stacktrace-parser/blob/9b2d5b6114e7a3b3596f7092f0d1160738125374/src/stack-trace-parser.js
* @copyright Copyright (c) 2014-2019 Georg Tavonius
* @license MIT
* This is the same code but only with removed parsing for all browsers or JS platforms else than NodeJS
*/
const StackTraceParser = {
UNKNOWN_FUNCTION: '<unknown>',
/**
@williamdes
williamdes / paste.debian.net.php
Last active August 3, 2025 16:51
PHP script for paste.debian.net
#!/usr/bin/env php
<?php
/**
* Minimal PHP paste client for paste.debian.net
* Only implements add paste functionality from stdin
* Inspired by https://github.com/gebi/debianpaste-clients/blob/master/paste.py
*
* @source https://paste.debian.net/1389513
* @source https://gist.github.com/williamdes/9f1739cfb786be40d00812cdb8a5e772
* @see https://paste.debian.net/rpc-interface.html
@williamdes
williamdes / cse-domains.txt
Created February 21, 2026 18:02
My custom search engine domain list
# See: https://netmeister.org/tldstats/index.html
# See: https://netmeister.org/tldstats/all.html
# Restriction: 50 patterns
# Excluded: .cn - Not relevant in Europe
# Excluded: .ru - Not relevant in Europe
# Excluded: .top - Who uses this ?
# Excluded: .xyz - Who uses this ?
*.com
*.de