Git Post Push Emulation
#git #hook #prepush #postpush
nano .git/hooks/pre-push
#!/bin/bash
# .git/hooks/pre-push
unset SSH_ASKPASS
unset SSH_ASKPASS_REQUIRE
notify-send \
--urgency=normal \
--expire-time=8000 \
--icon=emblem-ok \
--category=transfer.complete \
"Git Push Started"
remote="$1"
url="$2"
while read local_ref local_sha remote_ref remote_sha
do
branch=$(basename "$local_ref")
(
start_time=$(date +%s)
# Ждём завершения push
while pgrep -P $PPID "git" >/dev/null 2>&1; do
sleep 0.3
done
sleep 1.5
end_time=$(date +%s)
duration=$((end_time - start_time))
commits_count=$(git rev-list --count "$remote_sha..$local_sha" 2>/dev/null || echo "unknown")
details="Branch: $branch\nRemote: $remote\nCommits: $commits_count\nDuration: ${duration}s"
notify-send \
--urgency=normal \
--expire-time=8000 \
--icon=emblem-ok \
--category=transfer.complete \
"Git Push Complete" \
"$details"
sshpass -p 123Pass ssh root@8.8.8.8 "cd /var/www/portfolio/ && git pull"
status=$?
if [ $status -eq 0 ]; then
notify-send \
--urgency=normal \
--icon=emblem-default \
"Git: Деплой успешен" \
"Коммиты отправлены и pull успешно выполнен."
else
notify-send \
--urgency=critical \
--icon=dialog-error \
"Git: Ошибка деплоя" \
"ssh завершился с кодом $status.\nПроверь соединение или пароль."
fi
) 2>/dev/null &
disown
done
exit 0
chmod +x .git/hooks/pre-push
#git #hook #prepush #postpush
https://docs.anthropic.com/en/docs/claude-code/hooks
There is an idea to make automatic generation of commit messages)
There is an idea to make automatic generation of commit messages)
Claude Code Docs
Hooks reference - Claude Code Docs
Reference for Claude Code hook events, configuration schema, JSON input/output formats, exit codes, async hooks, HTTP hooks, prompt hooks, and MCP tool hooks.
Smart 🧠 Fullstack
Temporary Disable CORS in Google Chrome google-chrome --disable-web-security --user-data-dir="/tmp/chrome_dev_session" alias no-cors='google-chrome --disable-web-security --user-data-dir="/tmp/chrome_dev_session"' #cors
Claude
Customize Claude Code with plugins | Claude
Claude Code now supports plugins: custom collections of slash commands, agents, MCP servers, and hooks that install with a single command. Share your Claude Code setup with plugins Slash commands, agents, MCP servers, and hooks are all extension points you…
https://github.com/mre/idiomatic-rust
https://blog.cloudflare.com/18-november-2025-outage/
https://chatgpt.com/canvas/shared/6923a535e924819189305fc37fb831ce
https://blog.cloudflare.com/18-november-2025-outage/
https://chatgpt.com/canvas/shared/6923a535e924819189305fc37fb831ce
The Cloudflare Blog
Cloudflare outage on November 18, 2025
Cloudflare suffered a service outage on November 18, 2025. The outage was triggered by a bug in generation logic for a Bot Management feature file causing many Cloudflare services to be affected.
👍1
Debian 12 (bookworm)
Install PHP 8.4
nano /etc/postgresql/*/main/pg_hba.conf
host all all 0.0.0.0/0 scram-sha-256
sudo nano /etc/postgresql/*/main/postgresql.conf
port = 5433
sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/*/main/postgresql.conf
sudo ufw allow 5559/tcp
Install PHP 8.4
sudo apt update
sudo apt install apt-transport-https lsb-release ca-certificates curl -y
sudo curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update
sudo apt install php8.4
php -v
sudo apt install php8.4-cli php8.4-fpm php8.4-mysql php8.4-curl php8.4-gd php8.4-xml php8.4-zip php8.4-mbstring php8.4-xml php8.4-gmp php8.4-pgsql
sudo systemctl stop apache2
sudo systemctl disable apache2
sudo apt remove apache2 apache2-bin apache2-common apache2-data -y
sudo apt autoremove -y
apache2 -v
sudo apt purge apache2* -y
sudo rm -rf /etc/apache2
sudo -u postgres pg_dump database_name > backup.sql
scp backup.sql user@second_server:/home/debian/
sudo -u postgres psql database_name < /home/debian/backup.sql
nano /etc/postgresql/*/main/pg_hba.conf
host all all 0.0.0.0/0 scram-sha-256
sudo nano /etc/postgresql/*/main/postgresql.conf
port = 5433
sudo sed -i "s/#listen_addresses = 'localhost'/listen_addresses = '*'/g" /etc/postgresql/*/main/postgresql.conf
sudo ufw allow 5559/tcp
// ==UserScript==
// @name Auto Refresh Page
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Обновляет страницу каждые 10 секунд
// @author You
// @match *://*/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
setTimeout(() => {
location.href = location.href.split('?')[0] + '?nocache=' + Date.now();
}, 10000);
})();
www.tampermonkey.net
Home | Tampermonkey