Skip to content

A self-hosted media server and file management system

950 B
Raw Blame
Auto delete local copies of merged/deleted remote branches
git branch --merged | %{$_.trim()}  | ?{$_ -notmatch 'dev' -and $_ -notmatch 'main'} | %{git branch -d $_}
git branch -vv | Where-Object { $_ -match 'gone\]' } | ForEach-Object { $_.Trim().Split()[0] } | ForEach-Object { git branch -D $_ }
git branch -vv | grep 'gone]' | awk '{print $1}' | xargs git branch -D

Fix sql ID
select setval('ecommerce."purchases_id_seq"', coalesce((select max(id)+1 from ecommerce.purchases), 1), false)

Backup pgsql
pg_dump -h 127.0.0.1 -p 5432 -U postgres -Fc -d mediaServer -v -f databaseBackups/pgsql_bk_mediaServer20240818

Fix broken merge to main
- Find the revert commit (the one that caused the deletion of the files). open that in new branch
- git merge main --no-commit into it and fix files you need to restore


192.168.1.1 - - \[.*\] "GET /apps/\d+/connections\?auth_key=mlynf9fmqazebunus8f8&auth_timestamp=\d+&auth_version=1.0&auth_signature=.*