Skip to content

Instantly share code, notes, and snippets.

View whoo's full-sized avatar

Dominique DERRIER whoo

  • Transition
  • Montreal
View GitHub Profile
ffmpeg -i IMG_4788.mp4 -vf "fps=10,scale=600:-1:flags=lanczos,split[s0][s1];[s0]palettegen[p];[s1][p]paletteuse" -loop 0 output.gif
echo 'tell application "System Events"
set visibleProcesses to (every process whose visible is true)
set totalOpenWindows to 0
repeat with aProcess in visibleProcesses
try
tell aProcess
set windowCount to count of (windows whose value of attribute "AXMinimized" is false)
set totalOpenWindows to totalOpenWindows + windowCount
end tell
ifconfig en0 down ; sleep 5; ifconfig en0 up; ifconfig en0 ether ca:fe:00:ba:be:$(printf %x $((RANDOM%256)))
ifconfig en0 down ; sleep 5; ifconfig en0 up; ifconfig en0 ether c0:de:00:ba:be:$(printf %x $((RANDOM%256)))
@whoo
whoo / LG infrared codes
Created July 7, 2025 02:42 — forked from francis2110/LG infrared codes
Lg infrared codes for making your own remote
on-off->20DF10EF
energy->20DFA956
av. mode->20DF0CF3
input->20DFD02F
tv/rad->20DF0FF0
1->20DF8877
2->20DF48B7
3->20DFC837
4->20DF28D7
5->20DFA857
@whoo
whoo / Diet-Raspbian
Last active June 23, 2025 00:49
DockerPiAssistant
### FOR RPi 1B
apt remove --purge \
build-essential gcc cpp g++ cpp-12 bluez-firmware \
ppp make mkvtoolnix avahi-daemon rpi-eeprom pigpio-tools \
tasksel-data strace \
linux-image-rpi-v7 linux-image-rpi-v7l \
linux-image-6.12.25+rpt-rpi-v7l \
linux-image-6.12.25+rpt-rpi-v7
@whoo
whoo / Docker-Ctf.sh
Last active June 11, 2025 12:26
Dockerfile.ctf
docker build -t ihack .
docker run -it --hostname igloo ihack zsh
#!/bin/sh
# docker run -d --hostname clarisse --network none alpine tail -f /dev/null
CONTAINER=$1
NETNS=$(basename `docker inspect $CONTAINER | jq -r ".[]|.NetworkSettings.SandboxKey"`)
HOSTNAME=$(docker inspect $CONTAINER | jq -r '.[]|.Config.Hostname')
ip link add indocker0 type veth peer name outdock0
# ip link set dev indock0 address de:de:00:00:00:03
@whoo
whoo / YubiKeyReset.sh
Last active February 17, 2025 19:51
Reset YubiKey
#!/bin/bash
./ykman fido reset
./ykman oath reset
./ykman openpgp reset
./ykman otp delete 1
./ykman otp delete 2
./ykman piv reset
./ykman piv access change-management-key -a AES256 -t -g
@whoo
whoo / Vid2Pomme
Last active October 13, 2025 15:35
# To Apple Video
ffmpeg -i <source> -c:v libx265 -crf 28 -tag:v hvc1 -c:a eac3 -b:a 224k <target.mp4>
#
ffmpeg -i <source> -c:v libx264 -crf 28 -profile:v high -c:a libfdk_aac -b:a 224k <target.mp4>
```
ffmpeg -i $A -i cover.png -c:v libx265 -crf 28 -level 3.1 -tag:v:0 hvc1 -c:a copy -vf subtitles=out.srt,scale=1280:720 -map 0:0 -map 0:1 -map 1:0 -c:v:1 png -disposition:v:1 attached_pic output.mp4
@whoo
whoo / IP2map.py
Last active April 7, 2023 15:46
put ip on a map
import plotly.express as px
import pandas as pd
import geoip2.database
## https://www.maxmind.com/en/accounts/595343/geoip/downloads
reader=geoip2.database.Reader('GeoLite2-City.mmdb')
ip=["x.x.x.x" ,
"x.x.x.x" ,
"x.x.x.x"