Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<mxfile host="app.diagrams.net" modified="2025-01-27T00:00:00.000Z" agent="5.0" etag="xxx" version="22.1.16" type="device">
<diagram name="Architecture N-tiers" id="architecture">
<mxGraphModel dx="1422" dy="794" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="1169" pageHeight="827" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
```
@XavM
XavM / DB.xml
Created April 20, 2025 05:39
DB test DrawIO
<mxfile host="app.diagrams.net">
<diagram name="E-commerce DB Schema" id="schema1">
<mxGraphModel dx="800" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
<!-- Users -->
<mxCell id="Users" value="Users&#xa;id (PK)&#xa;name&#xa;email" style="shape=swimlane;childLayout=stackLayout;" vertex="1" parent="1">
<mxGeometry x="40" y="40" width="160" height="120" as="geometry" />
@XavM
XavM / gist:eeff855a2c16ae101a17c10c2f53a97f
Created June 27, 2023 16:03
Listen on port using powershell - Useful to test connectivity
$Listener = [System.Net.Sockets.TcpListener]9999;
$Listener.Start();
#wait, try connect from another PC etc.
$Listener.Stop();
@XavM
XavM / disable_dg_cg.md
Last active June 4, 2023 08:26
Windows 10 / WMWare Workstation / Nested Virtualisation fails : "Can't use VT-x/EPT" / Disable DeviceGuard - Hyper-V

Notes to myself and to the community :

Can't run Nested Virtualisation on Windows when DeviceGuard is on

WMWare Workstation requires to have access to Intel VT-x and VT-x/EPT for Nested Virtualisation

(The same must be true for other type 2 hypervisors ; Ex: VirtualBox, QEMU, etc ...)

Use case :

@XavM
XavM / README.md
Last active December 31, 2022 15:17
clusterhat/docker swarm
@XavM
XavM / getCertInfo.sh
Last active July 29, 2022 14:00
Get Serveur Chain Certs info - subject fingerprint issuer startdate enddate
# DON'T !
# Never ever execute command you do not have control on
# The returned cert could contain ";some malicious commands;" that would be executed by the awk:system
SERVER="google.com"
PORT=443
openssl s_client \
-showcerts \
-connect ${SERVER}:${PORT} \
@XavM
XavM / ssh_vpn.md
Last active March 29, 2021 07:43
Poor man's VPN using SSH (tcp in tcp is not a good idea, but ... can be handy)

Poor man's VPN using SSH (tcp in tcp is not a good idea, but ... can be handy)

Client :

WiFi connected using wlan0 on address range 172.20.10.0/28

sudo su 
apk install autossh
modprobe tun
@XavM
XavM / alpine_dqlite.md
Last active December 9, 2020 14:13
Build and Run dqlite on Alpine Linux

Build and Run dqlite on Alpine Linux

Node 1 (172.17.0.2)

Build

apk add raft-dev dqlite dqlite-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing
apk add sqlite-dev --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main
apk add musl-dev go git jq curl

cd /root

@XavM
XavM / gist:723b74479735b48e24cbacd97d4f70ff
Last active December 4, 2020 13:21
git push deployment using git hooks

git push deployment using git hooks

Run sshd in Docker container (Test only)

From Mac

docker run -itp 2222:22 alpine /bin/sh

From container

alias ll="ls -larth"

apk add --no-cache --update-cache openrc openssh git npm

@XavM
XavM / admin1_FR_USFeatures.geojson
Last active April 10, 2020 16:08
admin1_FR_USFeatures
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.