Skip to content

Instantly share code, notes, and snippets.

@CultureLinux
CultureLinux / php precommit hook
Created March 10, 2026 09:16
Precommit php pour symfony
#!/usr/bin/env bash
# get bash colors and styles here:
# http://misc.flogisoft.com/bash/tip_colors_and_formatting
C_RESET='\e[0m'
C_RED='\e[31m'
C_GREEN='\e[32m'
C_YELLOW='\e[33m'
function __run() #(step, name, cmd)
@CultureLinux
CultureLinux / HyperV-resize.md
Created February 27, 2026 09:58
Hyper-V resize du disque

Check des disks

lsblk -o NAME,SIZE,TYPE,FSTYPE
fdisk -l /dev/sda

Récupération de growpart

@CultureLinux
CultureLinux / bastion.md
Last active February 12, 2026 21:39
Bastion rdp

Architecture

RDP → localhost:13389 → SSH tunnel → VPSrouteurmachine locale

Commande

ssh -J user@vps user@192.168.1.33 -L 133389:192.168.1.209:3389

@CultureLinux
CultureLinux / Mattermost-docker-upgrade.md
Last active November 10, 2025 13:35
Mattermost team edition upgrade postgres

Backup existing

sql

  docker exec -t mattermost-v6-postgres-1 pg_dumpall -U mmuser > ../mattermost_backup.sql

data

@CultureLinux
CultureLinux / dd.md
Last active September 26, 2024 08:38
Wipe

Fill HD

dd if=/dev/urandom of=/wipe12.bin bs=50G count=1 iflag=fullblock

Loop

for ct in $(seq 1 100); do echo "loop $ct"; dd if=/dev/urandom of=/data/wipe$ct.bin bs=30G count=1 ;df -h ;done

@CultureLinux
CultureLinux / ffmpeg.md
Last active November 14, 2025 18:16
FFMPEG

Convertion to mp2

ffmpeg -i move.mp4 -c:v mpeg2video -b:v 6000k -vf scale=700:576 -q:v 6 -c:a mp2 move.mpg

Generate command for local mkv

for f in *.mkv; do
@CultureLinux
CultureLinux / Wireguard.md
Last active August 9, 2024 14:19
Wireguard named peers for wg command

Get Wireguard named peers

Generate file matching public key/ name

vi /etc/wireguard/wg_sub
s|<Public key>|hostname|g
s|<Public key>|Road warrior 1|g

Create and load alias