В nginx.conf:
proxy_cache_path /var/cache/nginx keys_zone=cache_pages:16m max_size=10g;
Создать /etc/nginx/snippets/proxy_cache_force.conf:
| // ==UserScript== | |
| // @name Yandex Metrika Screenshot | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Screenshot mode | |
| // @author popstas | |
| // @match https://metrika.yandex.ru/* | |
| // @grant GM_addStyle | |
| // ==/UserScript== |
| // ==UserScript== | |
| // @name Planfix task list | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.1 | |
| // @description Send task list from planner to remote server | |
| // @author popstas | |
| // @match https://popstas.planfix.ru/?action=planner | |
| // @match https://popstas.planfix.ru/planner/6138 | |
| // @match https://popstas.planfix.ru/planner | |
| // @match https://popstas.planfix.ru/* |
| #!/bin/bash | |
| # install: | |
| # 1. save it to /usr/local/bin/gptb | |
| # 2. make it executable: chmod +x /usr/local/bin/gptb | |
| # 3. add environment OPENAI_API_KEY=sk-... | |
| # | |
| # usage: POSTFIX="on ubuntu" gptb what you need for from bash | |
| set -eu | |
| PREFIX="${PREFIX:-how to}" |
| apt install sysbench -y | |
| yum install sysbench -y | |
| # bash, zsh | |
| for threads in 1 2 4 8 16 32 64 128; do echo -e "\n\nthreads: $threads"; sysbench cpu --validate=on --threads=$threads --verbosity=3 run | tail -n17 | head -n1; done | |
| # zsh only | |
| sysbench-cpu() { echo -e "\n\nthreads: $threads"; sysbench cpu --validate=on --threads=$threads --verbosity=3 run | tail -n17 | head -n1 } |
| pip install ansible | |
| ansible-galaxy install viasite-ansible.zsh --force | |
| curl https://raw.githubusercontent.com/viasite-ansible/ansible-role-zsh/master/playbook.yml > /tmp/zsh.yml | |
| ansible-playbook -i "localhost," -c local -b /tmp/zsh.yml --extra-vars="zsh_user=$(whoami)" |
| #!/bin/bash | |
| set -e | |
| n="$n" | |
| cd /media/media/video | |
| if [ -z "$n" ]; then | |
| n="$(ls -1 *.mkv | fzf | sed 's/\.mkv$//')" | |
| fi | |
| subslist="$(ffprobe "$n.mkv" 2>&1 | grep -A 2 Subtitle)" | |
| echo "$subslist"; sleep 3 |
| #!/usr/bin/env bash | |
| # agents2claude | |
| # Walks the current directory tree, respects .gitignore, finds AGENTS.md (via fdfind), | |
| # and creates sibling symlinks: CLAUDE.md -> AGENTS.md | |
| # requires fdfind | |
| set -euo pipefail | |
| created=0 | |
| skipped=0 |