Skip to content

Instantly share code, notes, and snippets.

@yannbertrand
yannbertrand / pip-move.sh
Created November 6, 2025 09:23
aerospace pip-move
#!/bin/bash
focused_workspace=$(aerospace list-workspaces --focused)
nb_of_monitors=$(aerospace list-monitors | wc | awk '{print $1}')
focused_monitor=$(aerospace list-monitors --focused | awk '{print $1}')
pip_windows=$(aerospace list-windows --all --format " %{window-id}%{right-padding} | %{monitor-id}%{right-padding} | %{window-title}" | grep -E "(Picture-in-Picture|Picture in Picture)")
echo $pip_windows | while read window; do
window_id=$(echo $window | awk '{print $1}')
monitor_id=$(echo $window | awk '{print $3}')
if [ -n "$window_id" ]; then
@yannbertrand
yannbertrand / id_ed25519.pub
Created October 29, 2025 13:38
SSH public key
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIZNtywiWmV+15nmrJXx/MBbwBbfQnh1/QqheIcq1/Bi [email protected]
@yannbertrand
yannbertrand / floodcast-search.ps1
Last active October 24, 2025 20:59
Windows FloodCast Search
# https://github.com/yt-dlp/yt-dlp
.\yt-dlp.exe https://feeds.acast.com/public/shows/floodcast --no-config-locations --paths "~/Developer/floodcast-search/data/yt-dlp/audio" --output "%(title)s.%(ext)s" --write-info-json --no-write-playlist-metafiles --paths "infojson:../info" --restrict-filenames --replace-in-metadata description "<hr><p style='color:grey; font-size:0\.75em;'> Hébergé par Acast\. Visitez <a style='color:grey;' target='_blank' rel='noopener noreferrer' href='https://acast\.com/privacy'>acast\.com/privacy</a> pour plus d'informations\.</p>$" "" --parse-metadata "video::(?P<formats>)" --parse-metadata "video::(?P<subtitles>)" --parse-metadata "video::(?P<http_headers>)" --parse-metadata "video::(?P<thumbnail>)" --parse-metadata "video::(?P<thumbnails>)"
# https://github.com/Purfview/whisper-standalone-win
.\faster-whisper-xxl.exe "C:\Users\SuperPikaBoy\Developer\floodcast-search\data\yt-dlp\audio" --language fr --model large-v2 --output_format vtt --sentence --batch_recursive --output_dir "C:\
{"id":875825428,"keymap":[[{"col":0,"row":0,"val":41},{"col":1,"row":0,"val":190},{"col":2,"row":0,"val":189},{"col":3,"row":0,"val":32260},{"col":4,"row":0,"val":32261},{"col":5,"row":0,"val":30760},{"col":6,"row":0,"val":30759},{"col":7,"row":0,"val":172},{"col":8,"row":0,"val":174},{"col":9,"row":0,"val":171},{"col":10,"row":0,"val":168},{"col":11,"row":0,"val":170},{"col":12,"row":0,"val":169},{"col":13,"row":0,"val":76},{"col":14,"row":0,"val":0},{"col":15,"row":0,"val":2308},{"col":0,"row":1,"val":53},{"col":1,"row":1,"val":30},{"col":2,"row":1,"val":31},{"col":3,"row":1,"val":32},{"col":4,"row":1,"val":33},{"col":5,"row":1,"val":34},{"col":6,"row":1,"val":35},{"col":7,"row":1,"val":36},{"col":8,"row":1,"val":37},{"col":9,"row":1,"val":38},{"col":10,"row":1,"val":39},{"col":11,"row":1,"val":45},{"col":12,"row":1,"val":46},{"col":13,"row":1,"val":42},{"col":14,"row":1,"val":0},{"col":15,"row":1,"val":75},{"col":0,"row":2,"val":43},{"col":1,"row":2,"val":20},{"col":2,"row":2,"val":26},{"col":3,"row":2,"va
@yannbertrand
yannbertrand / .aerospace.toml
Last active November 6, 2025 09:23
.aerospace.toml
# You can use it to add commands that run after login to macOS user session.
# 'start-at-login' needs to be 'true' for 'after-login-command' to work
# Available commands: https://nikitabobko.github.io/AeroSpace/commands
after-login-command = []
# You can use it to add commands that run after AeroSpace startup.
# 'after-startup-command' is run after 'after-login-command'
# Available commands : https://nikitabobko.github.io/AeroSpace/commands
after-startup-command = [
'exec-and-forget borders active_color=0xffa1a3ff inactive_color=0xffaaaaaa width=4.0'
@yannbertrand
yannbertrand / biome.jsonc
Last active January 7, 2025 12:42
Biome base local config (in `~/Developer`)
{
"$schema": "https://biomejs.dev/schemas/1.9.4/schema.json",
"formatter": {
"lineWidth": 120,
"indentStyle": "space",
"formatWithErrors": true,
"useEditorconfig": true
},
"javascript": {
"formatter": {
@yannbertrand
yannbertrand / nr-auto-node-run.sh
Last active March 21, 2025 13:13
`nr` bash function to use `node --run` when possible
nr() {
node_version=$(node -v)
major=$(echo $node_version | cut -c 2-3)
if [[ $(($major)) -gt 21 ]]
then
echo "node $node_version, using node --run $@ ⚡\n"
node --run $@
else
echo "node $node_version, using npm run $@\n"
npm run $@
@yannbertrand
yannbertrand / links.txt
Last active October 27, 2023 11:46
Formation IMT 2023
@yannbertrand
yannbertrand / settings.json
Last active August 12, 2025 08:44
VS Code config
{
"window.zoomLevel": 2,
"window.autoDetectColorScheme": true,
"window.newWindowDimensions": "maximized",
// Editor
"editor.renderWhitespace": "trailing",
"editor.formatOnSave": true,
"editor.detectIndentation": false,
"editor.codeActionsOnSave": {
"source.fixAll": "explicit"
@yannbertrand
yannbertrand / homebrew-cheatsheet.md
Last active December 11, 2021 13:40
homebrew cheatsheet

Current version: 3.3.7

Install homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)

BREW