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
@echo off | |
cls | |
echo [101;93m STYLES [0m | |
echo ^<ESC^>[0m [0mReset[0m | |
echo ^<ESC^>[1m [1mBold[0m | |
echo ^<ESC^>[4m [4mUnderline[0m | |
echo ^<ESC^>[7m [7mInverse[0m | |
echo. | |
echo [101;93m NORMAL FOREGROUND COLORS [0m | |
echo ^<ESC^>[30m [30mBlack[0m (black) |
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 | |
SUDO='' | |
if (( $EUID != 0 )); then | |
echo 'I will try without root access to perform' | |
echo 'but i cant guarantee it works' | |
echo 'Else use root account' | |
echo 'Continue [Enter] , Cancel [Ctrl+C]' | |
read | |
SUDO='sudo' |
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 | |
MYSQL_USER="root" | |
MYSQL_PASSWORD="" # Change this to your db password | |
function restore() { | |
( | |
echo "SET AUTOCOMMIT=0;" | |
echo "SET UNIQUE_CHECKS=0;" | |
echo "SET FOREIGN_KEY_CHECKS=0;" |
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
dpkg -l linux-{image,headers}-* | awk '/^ii/{print $2}' | egrep '[0-9]+\.[0-9]+\.[0-9]+' | grep -v $(uname -r) | xargs sudo apt-get -y purge |
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
# Authentication | |
gh auth login | |
gh auth logout | |
# Repositories | |
gh repo clone owner/repo | |
gh repo create my-new-repo --public | |
gh repo fork owner/repo | |
gh repo view owner/repo --web |
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/sh | |
# by Paul Colby (http://colby.id.au), no rights reserved ;) | |
# modified by Bakhda, Firesh | |
PREV_TOTAL=0 | |
PREV_IDLE=0 | |
for INDEX in 1 2 3 4 5; do | |
# Get the total CPU statistics, discarding the 'cpu ' prefix. | |
CPU=$(sed -n 's/^cpu\s//p' /proc/stat) |
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
alias ll='ls -la' | |
alias sshlist='awk '\''BEGIN { printf("%-30s %-30s %-10s %-s\n", "Host", "HostName", "Port", "User") } /^Host / {host=$2} /Hostname / {hostname=$2} /Port / {prt=$2} /User / {usr=$2; printf "%-30s %-30s %-10s %s\n", host, hostname, (prt ? prt : "NA"), (usr ? usr : "NA" | |
)}'\'' ~/.ssh/config' |