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 4 months ago

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

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

0 likes
0 forks
1 files
Last active 3 months ago
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 3 months ago
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 3 months ago
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 3 months ago
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 3 months ago
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 3 months ago
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 3 months ago
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 3 months ago
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 */
anthony's Avatar

anthony / Interpreter helper to debug dockerized cli php scripts in NetBeans

0 likes
0 forks
1 files
Last active 3 months ago
ide netbeans php
1 #!/bin/bash
2
3 # Welcome to amusement park!
4
5 [[ "$1" = '--help' ]] || [[ "$1" = '-h' ]] && cat <<EOF && exit
6 NetBeans docker wrapper for php
7 ===============================
8 Anthony Axenov (c) 2023, The MIT License
9 https://axenov.dev
10 https://opensource.org/license/mit
anthony's Avatar

anthony / Simple and universal file logger

0 likes
0 forks
1 files
Last active 3 months ago
php
1 <?php
2 function output(...$data)
3 {
4 $result = [];
5 foreach ($data as $something) {
6 if ($something instanceof Illuminate\Support\Collection) {
7 $something = $something->toArray();
8 }
9 if (is_array($something)) {
10 $something = var_export($something, true);
Newer Older

Powered by Opengist ⋅ Load: 199ms⋅

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