View 1_here.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Returns caller class/file name, function and line where current | |
* | |
* Potentially doesn't cover all cases, but is simple and pretty handy for use in frameworks. | |
* | |
* @param bool $as_array result as array or string in this format: `<file|class>:<func>():<line>` | |
* @return string|array | |
*/ |
View ytdlcue.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# CUE-sheet generator for youtube-dl | |
# Usage: | |
# 0. Install 'jq' utility | |
# 1. Download any audio file with metadata from YouTube or Youtube Music, e.g. | |
# $ youtube-dl \ | |
# --extract-audio \ | |
# --audio-format flac \ | |
# --audio-quality 0 \ |
View .gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
# ... | |
# signingkey = <key> | |
# git config user.signingkey ... -- установить ключ | |
[commit] | |
gpgSign = true | |
[tag] | |
gpgSign = true | |
[push] | |
default = current |
View inotifywait-cp.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# My use case: | |
# syncthing synchronizes ALL changes in DCIM directory on my android to PC. | |
# I wanted files to be copied somewhere else on my PC to stay forever, so I | |
# could sort them later and safely free some space on mobile without loss. | |
# Also I wish to have some stupid log with history of such events. | |
# inotify-tools package must be installed! | |
# CHANGE THIS PARAMETERS to ones you needed |
View s3-backup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################################### | |
# # | |
# Stupidly simple backup script for own projects # | |
# # | |
# Author: Anthony Axenov (Антон Аксенов) # | |
# Version: 1.2 # | |
# License: WTFPLv2 More info (RU): https://axenov.dev/?p=1272 # | |
# # | |
##################################################################### |
View .bash_aliases
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# alias bashrc='source ~/.bashrc' | |
alias zshrc='source ~/.zshrc' | |
alias realias='source ~/.bash_aliases' | |
alias ..="cd .." | |
alias chmod="chmod --preserve-root" | |
alias chown="chown --preserve-root" | |
alias free="free -h" |
View quick-backup.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
##################################################################### | |
# # | |
# Stupidly simple backup script for own projects # | |
# # | |
# Author: Anthony Axenov (Антон Аксенов) # | |
# Version: 1.0 # | |
# License: WTFPLv2 More info: https://axenov.dev/?p=1423 # | |
# # | |
##################################################################### |
View dc.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINER="ds-php" # the name of the container in which to 'exec' something | |
CONFIG="$(dirname $([ -L $0 ] && readlink -f $0 || echo $0))/docker-compose.yml" # path to compose yml file | |
CMD="docker-compose -f $CONFIG" # docker-compose command | |
APP_URL='http://localhost:8000/' | |
open_browser() { | |
if which xdg-open > /dev/null; then | |
xdg-open "$1" </dev/null >/dev/null 2>&1 & disown | |
elif which gnome-open > /dev/null; then |
View convert.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/php | |
<?php | |
/*********************************************************************************************************************** | |
* Simple Postman Collection Converter | |
* | |
* Author: Anthony Axenov (c) 2021 | |
* Version: v1.1 | |
* License: MIT | |
* Dependecies: php8.0, php-json |
View install-golang.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# GoLang installer | |
# https://golang.org/doc/install | |
# https://www.vultr.com/docs/install-the-latest-version-of-golang-on-ubuntu | |
# if [ "$EUID" -ne 0 ] | |
# then echo "*** root permissions required ***" | |
# exit |
NewerOlder