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 | |
######################################################################### | |
# # | |
# Argument parser for bash scripts # | |
# # | |
# Author: Anthony Axenov (Антон Аксенов) # | |
# Version: 1.5 # | |
# License: MIT # | |
# # | |
######################################################################### |
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 | |
######################################################################### | |
# # | |
# Set display resolution # | |
# # | |
# Author: Anthony Axenov (Антон Аксенов) # | |
# Version: 1.0 # | |
# License: WTFPL # | |
# # | |
######################################################################### |
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 | |
declare(strict_types = 1); | |
namespace Tests; | |
use Illuminate\Support\Collection; | |
use PHPUnit\Framework\TestCase; | |
class BasicTestCase extends TestCase |
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 | |
function output(...$data) | |
{ | |
$result = []; | |
foreach ($data as $something) { | |
if ($something instanceof Illuminate\Support\Collection) { | |
$something = $something->toArray(); | |
} | |
if (is_array($something)) { | |
$something = var_export($something, true); |
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 |
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 | |
// This gist was erased. | |
// I recommend you to take a closer look at my new cli-tool: | |
// | |
// https://packagist.org/packages/axenov/pm-convert | |
// | |
// It can convert multple collections v2.1 to http/wget/curl formats | |
// very quickly and without 3rd-party dependencies. |
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 |
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 # | |
# # | |
##################################################################### |
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 reload='exec ${SHELL} -l' | |
alias sudo='sudo ' # enable aliases to be sudo’ed | |
alias g='git' | |
alias hosts="sudo nano /etc/hosts" | |
alias shrug="echo '¯\_(ツ)_/¯' | xclip -selection c" |
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 # | |
# # | |
##################################################################### |