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 | |
FILE=$1 | |
MESSAGE=$(cat $FILE) | |
REGEX_ISSUE_ID="^((ISSUE|TASK)\-[0-9]+:\s)" | |
ISSUE_ID_IN_COMMIT=$(echo $MESSAGE | grep -o -E "$REGEX_ISSUE_ID") | |
if [[ -z "$ISSUE_ID_IN_COMMIT" ]]; then | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
echo "$BRANCH_NAME: $MESSAGE" > $FILE |
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
# show, delete | |
iptables -t nat -v -L PREROUTING -n --line-number | |
iptables -t nat -D PREROUTING 5 | |
# forward | |
iptables -t nat -A PREROUTING -i ens3 -p tcp --dport 33080 -j DNAT --to 10.0.27.67:33080 | |
# Global IP to Local IP Ubuntu | |
iptables -t nat -A OUTPUT -p all -d 123.45.67.89 -j DNAT --to-destination 127.0.0.1 |
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
# http://maq.kz/123/ | |
RewriteRule ^([1-9]+)/$ index.php?article=$1 [L] | |
## ajax http://maq.kz/dnfksnfsk/scripts/mslmflsmfsl/ | |
RewriteRule ^(.+)/scripts/ scripts.php [L] | |
## pages http://maq.kz/page/123 | |
RewriteRule ^page/(.*)$ index.php?a=1&b=2&c=$1 [L] | |
## |
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 | |
REGEX_ISSUE_ID="^((ISSUE|TASK)\-[0-9]+)" | |
ISSUE_ID_IN_COMMIT=$(echo $(cat "$1") | grep -o -E "$REGEX_ISSUE_ID") | |
if [[ -z "$ISSUE_ID_IN_COMMIT" ]]; then | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color |
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 | |
REGEX_ISSUE_ID="^((ISSUE|TASK)\-[0-9]+)" | |
ISSUE_ID_IN_BRANCH=$(echo $(git rev-parse --abbrev-ref HEAD) | grep -o -E "$REGEX_ISSUE_ID") | |
if [[ -z "$ISSUE_ID_IN_BRANCH" ]]; then | |
RED='\033[0;31m' | |
NC='\033[0m' # No Color |
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
# mysqldump requires at least the SELECT privilege for dumped tables, SHOW VIEW | |
# for dumped views, TRIGGER for dumped triggers, LOCK TABLES if the | |
# --single-transaction option is not used, and (as of MySQL 8.0.21) PROCESS if | |
# the --no-tablespaces option is not used. Certain options might require other | |
# privileges as noted in the option descriptions. | |
# .my.cnf | |
[mysqldump] | |
user=backup | |
password="PASSWORD" |
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
sudo add-apt-repository ppa:ondrej/php | |
sudo apt update | |
sudo apt install \ | |
git \ | |
vim \ | |
nano \ | |
php8.1 php8.1-{cli,fpm,gd,zip,mbstring,mysql,dom,xml,curl,redis,memcached} \ | |
php7.4 php7.4-{cli,fpm,gd,zip,mbstring,mysql,dom,xml,curl,redis,memcached} \ | |
mysql-server-8.0 \ | |
nginx |
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
wget https://gist.githubusercontent.com/Max95Cohen/7af5c9db2c003cb0c032265c77a14907/raw/1d51080f12a88846e6ff6188cace28c8cae58530/git.sh | |
wget https://gist.githubusercontent.com/Max95Cohen/e86448c0e258703d604c98992fb5e55d/raw/3c824eddd6f1b42dfc8b888510083e00dfe2b0c4/.vimrc | |
sed -i 's/ls --color=auto/ls --color=auto --group-directories-first/' .bashrc | |
sed -i '59i PROMPT_COMMAND="source /home/aibekq/git.sh";' .bashrc | |
sed -i '60i \ ' .bashrc | |
echo "PS1='${debian_chroot:+($debian_chroot)}[\e[0;33m\t\e[0m] \e[1;36m\w \e[0;30m\j \e[1;31m$git_branch\n\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\] $ '" >> .bashrc | |
echo "alias rm='rm -i';" >> .bashrc | |
echo "eval \$(ssh-agent);" >> .bashrc |
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
A File Icon | |
Emmet | |
Auto-save | |
HTML-CSS-JS Prettify | |
Pretty JSON | |
syncviewscroll | |
Inspired Github Color Theme |