This file contains hidden or 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 | |
# First upgrade current packages | |
apt update | grep upgradable && apt upgrade -y | |
# Change debian repository to 10 (Buster) | |
sed -i 's/stretch/buster/gm' /etc/apt/sources.list | |
# Upgrade packages with Debian 10 repository | |
apt update && apt upgrade -y |
This file contains hidden or 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 | |
showUsage() { | |
echo -e "Usage is /scripts/tochpad.sh [OPTIONS]\n\t-e To enable touch pad\n\t-d For Disable touch pad\n\t-h for this Help" | |
} | |
if [ "$#" -eq 0 ] | |
then | |
showUsage | |
exit 1 | |
fi |
This file contains hidden or 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
daemon off; | |
error_log logs/error.log; | |
events { | |
worker_connections 1024; | |
} | |
rtmp { | |
server { | |
listen 1935; # Listen on standard RTMP port | |
chunk_size 4000; | |
application show { |
This file contains hidden or 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
events{} | |
rtmp { | |
server { | |
listen 1935; | |
application live { | |
live on; | |
interleave on; | |
hls on; | |
hls_path /tmp/hls; |
This file contains hidden or 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 | |
# Show one line before (-B 1) and one line after (-A 1) matched | |
# .venv excluded | |
# Used -n to show line number | |
# -s for prevent displaying error messages | |
# -r for recursive, in some versions of grep -r doesn't exists | |
grep 'TODO' -B 1 -A 1 --color --exclude-dir=.venv -nsr ./ |
This file contains hidden or 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 -x | |
# database credentials | |
db_user="" | |
db_pass="" | |
db_name="" | |
db_host="" # e.g 127.0.0.1 or localhost | |
# FTP credentials | |
ftp_url="" e.g ftp://ftp.example.com |
This file contains hidden or 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 | |
install_brctl_in_debian(){ | |
apt update && apt install -y bridge-utils && \ | |
} | |
install_brctl_in_rhell(){ | |
yum makecache && yum install -y bridge-utils && \ | |
} |
This file contains hidden or 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 -x | |
showUsage() { | |
echo -e "Usage is /scripts/tochpad.sh [OPTIONS]\n\t-e To enable touch pad\n\t-d For Disable touch pad\n\t-h for this Help" | |
} | |
if [ "$#" -eq 0 ] | |
then | |
showUsage | |
exit 1 | |
fi |
This file contains hidden or 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 | |
function check_status { | |
# $1 is VPN name | |
vpnName=$1 | |
vpnIP=`nmcli connection show $vpnName | grep 'IP4.ADDRESS\[1\]' | awk '{print $2}' | cut -d'/' -f1` | |
vpnGateway=`nmcli connection show $vpnName | grep IP4.GATEWAY | awk '{print $2}'` | |
if [ "$vpnGateway" == "--" ] | |
then | |
vpnGateway=`echo $vpnIP | sed 's/\.[0-9]\{1,3\}$/\.1/'` |
This file contains hidden or 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] | |
email = MyMail | |
name = Mohammad Parvin | |
[alias] | |
a = add | |
b = branch | |
s = status | |
c = clone | |
i = init | |
p = push |
OlderNewer