All New

user:thomas gists created by user

title:mygist gists with given title

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

Register

Login


All New Register Login
's Avatar

anthony

Joined 1739410376

Recently created
Least recently created
Recently updated
Least recently updated
All gists 36
anthony's Avatar

anthony / Block bots and crawlers in nginx

0 likes
0 forks
1 files
Last active 1740389947
nginx
1 map $request_uri $reject {
2 "~(yandexbot)" 0;
3 "~(googlebot)" 0;
4 "~(ClaudeBot).*" 1;
5 "~(Amazonbot).*" 1;
6 "~(SemrushBot).*" 1;
7 "~(meta-externalagent).*" 1;
8 "~(DataForSeoBot).*" 1;
9 "~(Screaming Frog SEO Spider).*" 1;
10 "~(GetRight).*" 1;
anthony's Avatar

anthony / Doxygen in docker

0 likes
0 forks
2 files
Last active 1740232072
dockerfile
1 FROM alpine:latest AS doxygen
2
3 RUN apk add --no-cache \
4 doxygen \
5 graphviz \
6 fontconfig \
7 font-noto \
8 font-noto-emoji \
9 font-noto-cjk
anthony's Avatar

anthony / Как читать права файлов

0 likes
0 forks
1 files
Last active 1740126335
linux
flag  user  group  other
#     rwx    rwx    rwx
- Отсутствие флага (файл)
l Символическая ссылка (symbolic link)
d Директория (directory)
b Блочное устройство (block device)
c Символьное устройство (character device)
anthony's Avatar

anthony / Backup your project to another server (scp)

0 likes
0 forks
1 files
Last active 1740064541
scp shell ssh
1 #!/bin/bash
2 #####################################################################
3 # #
4 # Stupidly simple backup script for own projects #
5 # #
6 # Author: Anthony Axenov (Антон Аксенов) #
7 # Version: 1.0 #
8 # License: WTFPLv2 More info: https://axenov.dev/?p=1423 #
9 # #
10 #####################################################################
anthony's Avatar

anthony / Backup your project to another server (scp/s3)

0 likes
0 forks
1 files
Last active 1740064516
s3 s3cmd scp shell ssh
1 #!/bin/bash
2 #####################################################################
3 # #
4 # Stupidly simple backup script for own projects #
5 # #
6 # Author: Anthony Axenov (Антон Аксенов) #
7 # Version: 1.2 #
8 # License: WTFPLv2 More info (RU): https://axenov.dev/?p=1272 #
9 # #
10 #####################################################################
anthony's Avatar

anthony / My favorite bash aliases

0 likes
0 forks
1 files
Last active 1740109971
bash dotfiles shell zsh
1 #!/bin/bash
2
3 # alias bashrc='source ~/.bashrc'
4 alias zshrc='source ~/.zshrc'
5 alias realias='source ~/.bash_aliases'
6 alias reload='exec ${SHELL} -l'
7 alias sudo='sudo ' # enable aliases to be sudo’ed
8 alias g='git'
9 alias hosts="sudo nano /etc/hosts"
10 alias shrug="echo '¯\_(ツ)_/¯' | xclip -selection c"
anthony's Avatar

anthony / Backup files synced from Syncthing

0 likes
0 forks
2 files
Last active 1740033429
shell syncthing
1 # Daemon file
2 # Place or symlink it to /etc/systemd/system/inotifywait-cp.service
3 # Enable and start: sudo systemctl enable --now inotifywait-cp
4 # Check it: sudo systemctl status inotifywait-cp
5
6 [Unit]
7 Description=Photosync from android
8
9 [Service]
10 Type=simple
anthony's Avatar

anthony / CUE-sheet generator for youtube-dl

0 likes
0 forks
1 files
Last active 1740033278
shell
1 #!/bin/bash
2 # CUE-sheet generator for youtube-dl
3
4 # Usage:
5 # 0. Install 'jq' utility
6 # 1. Download any audio file with metadata from YouTube or Youtube Music, e.g.
7 # $ youtube-dl \
8 # --extract-audio \
9 # --audio-format flac \
10 # --audio-quality 0 \
anthony's Avatar

anthony / Git configs

0 likes
0 forks
2 files
Last active 1740109988
My favourite global .gitconfig with aliases (ru comments)
dotfiles git
1 [user]
2 # ...
3 # signingkey = <key>
4 # git config user.signingkey ... -- установить ключ
5 [commit]
6 gpgSign = true
7 [tag]
8 gpgSign = true
9 [push]
10 default = current
anthony's Avatar

anthony / Get caller class, function and line number

0 likes
0 forks
1 files
Last active 1740033025
php
1 <?php
2
3 /**
4 * Returns caller class/file name, function and line where current
5 *
6 * Potentially doesn't cover all cases, but is simple and pretty handy for use in frameworks.
7 *
8 * @param bool $as_array result as array or string in this format: `<file|class>:<func>():<line>`
9 * @return string|array
10 */
Newer Older

Powered by Opengist ⋅ Load: 246ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文