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 / sentry-pure-js-node-js-reporter.js
Last active May 4, 2024 13:03
Pure NodeJs Sentry reporter compatible with AWS lambda
* @source
* @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 /
Last active December 23, 2021 11:21
Add a certificate to an existing certificate using
# Source:
set -eu
if [ -z "${1:-}" ]; then
echo "Missing the domain name to add"
echo "Use: ~/ mynewdomain.tld"
echo "To add multiple domains you can use: ~/ \"mynewdomain.tld -d www.mynewdomain.tld\""
williamdes /
Last active May 8, 2021 09:20
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 /
Last active July 10, 2024 09:35 — forked from Dreamacro/ using docker-compose

How to use

$ docker compose -f acmesh.yaml up -d


williamdes /
Last active May 20, 2023 21:29
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 --recv-keys keyIDhereReplaceMe
williamdes / sirene_data_StockEtablissement_utf8.sql
Created September 16, 2019 21:30
SQL schema for StockEtablissement_utf8 in september-2019
-- Comments from:
CREATE TABLE sirene_data (
`siren` INT(9) UNSIGNED NOT NULL COMMENT "Identifiant de l’entreprise",
`nic` SMALLINT(5) UNSIGNED NOT NULL COMMENT "Numéro interne de classement de l'établissement",
`siret` BIGINT(10) UNSIGNED NOT NULL PRIMARY KEY COMMENT "Identifiant de l’entreprise",
`statutDiffusionEtablissement` ENUM('O') NOT NULL COMMENT "Statut de diffusion de l’établissement",
`dateCreationEtablissement` VARCHAR(10) NOT NULL COMMENT "Date de création de l’entreprise",
`trancheEffectifsEtablissement` ENUM('NN', '00', '01', '02', '03', '11', '12', '21', '22', '31', '32', '41', '42', '51', '52', '53') NOT NULL COMMENT "Tranche d’effectif salarié de l’établissement",
`anneeEffectifsEtablissement` VARCHAR(4) NOT NULL COMMENT "Année de validité de la tranche d’effectif salarié de l’établissement",
`activitePrincipaleRegistreMetiersEtablissement` VARCHAR(6) NOT NULL COMMENT "Activité exercée par l’artisan
williamdes /
Created September 10, 2019 11:50
Import git branch as a tag from existing branch with same name
# git: Having a branch/tag with the same name (error: dst refspec matches more than one.)
# run git branch --all and use a text editor to create a batch of commands
git tag -m "[imported from branch]" --force --sign "release/2019-09-10-1" $(git show-ref --hash "refs/remotes/origin/release/2019-09-10-1")
# Delete ref from remote
git push origin :"refs/heads/release/2019-09-10-1"

Keybase proof

I hereby claim:

  • I am williamdes on github.
  • I am williamdes ( on keybase.
  • I have a public key whose fingerprint is C4D9 1FDF CEF6 B4A3 C653 FD78 90A0 EF1B 8251 A889

To claim this, I am signing this object:

williamdes /
Last active March 14, 2024 13:12
easy update your phpMyAdmin !

phpMyAdmin install/upgrade/reinstall (last released version)

Supports :

  • install
  • upgrade

Keeps your config !

TLDR / Short mode

Uses default arguments !

williamdes /
Last active February 15, 2018 09:51
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin":$PATH
#echo $PATH
cd /sbin/
echo "[IpTables] Reset..."
sleep 1
iptables -F
iptables -X