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
| ### Use any one you like from down below. | |
| ## DHCPv6 | |
| ip -6 addr|awk '{print $2}'|grep -P '^(?!fe80)(?!fd).*/128'|grep '^2'|cut -d '/' -f1 | |
| # | |
| /sbin/ip -6 addr | grep inet6 | grep -vE 'fe80|host|fd|mngtmpaddr|temporary' | grep -F 'scope global dynamic' | sed -e 's/^.*inet6 \([^ ]*\)\/.*$/\1/;t;d' | |
| ## SLAAC | |
| ip -6 addr|grep -E 'inet6 [^!(fe80)!(fd)].*/64.*global dynamic'|awk '{print $2}'|cut -d/ -f1 | |
| # |
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 | |
| RD=$(echo "\033[01;31m") | |
| YW=$(echo "\033[33m") | |
| GN=$(echo "\033[1;92m") | |
| CL=$(echo "\033[m") | |
| BFR="\\r\\033[K" | |
| HOLD="${YW}+${CL}" | |
| CM="${GN}✓${CL}" | |
| CROSS="${RD}✗${CL}" |
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 | |
| # Define variables | |
| SUBJECT_ROOT="/C=US/O=Saud Iqbal/CN=Saud Iqbal Root ECDSA CA" | |
| SUBJECT_INTERMEDIATE="/C=US/O=Saud Iqbal/CN=Saud Iqbal Intermediate ECDSA CA" | |
| DAYS_VALID=3650 | |
| CONFIG_FILE="leaf_ext.cfg" | |
| SUBJECT_LEAF="/" | |
| RD=$(echo "\033[01;31m") |
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 | |
| # Define variables | |
| SUBJECT_ROOT="/C=US/O=Saud Iqbal/CN=Saud Iqbal Root RSA CA" | |
| DAYS_VALID=3650 | |
| CONFIG_FILE="leaf_ext.cfg" | |
| SUBJECT_LEAF="/" | |
| RD=$(echo "\033[01;31m") | |
| YW=$(echo "\033[33m") |
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
| #!/usr/bin/env bash | |
| # Source https://stackoverflow.com/a/59742762/1433252 | |
| sourcedir="/home/saudiqbal/Documents/ServerFiles/" | |
| destdir_prefix="/run/media/saudiqbal/HomeDrive/Temp/disk_" | |
| destdir_suffix="" | |
| mblimit=700 | |
| # DVD 4400 / 4300 | |
| # bytelimit=$(( mblimit * 1024 * 1024 )) # MB as measured by OS (MiB) | |
| bytelimit=$(( mblimit * 1000 * 1000 )) # MB as measured by marketeers | |
| disk=() # empty array |
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 | |
| # Define variables | |
| SUBJECT_ROOT="/C=US/O=Saud Iqbal/CN=Saud Iqbal Root ECDSA CA" | |
| DAYS_VALID=3650 | |
| CONFIG_FILE="leaf_ext.cfg" | |
| SUBJECT_LEAF="/" | |
| RD=$(echo "\033[01;31m") | |
| YW=$(echo "\033[33m") |
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
| ## Server Setup | |
| # SSH commands for creating user and download upload directories | |
| groupadd backupusers | |
| useradd -g backupusers -s /sbin/nologin backupuser | |
| mkdir -p /mnt/SystemAdmin/BackupStorage/{upload,download} | |
| chown backupuser:backupusers /mnt/SystemAdmin/BackupStorage/{upload,download} | |
| chown root:root /mnt/SystemAdmin/BackupStorage | |
| chmod 755 /mnt/SystemAdmin/BackupStorage |
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 | |
| RD=$(echo "\033[01;31m") | |
| YW=$(echo "\033[33m") | |
| GN=$(echo "\033[1;92m") | |
| CL=$(echo "\033[m") | |
| BFR="\\r\\033[K" | |
| HOLD="+" | |
| CM="${GN}✓${CL}" | |
| CROSS="${RD}✗${CL}" |
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
| <!DOCTYPE gui> | |
| <gui name="dolphin" translationDomain="kxmlgui6" version="41"> | |
| <MenuBar alreadyVisited="1"> | |
| <Menu alreadyVisited="1" name="file" noMerge="1"> | |
| <text translationDomain="kxmlgui6">&File</text> | |
| <Action name="file_new"/> | |
| <Separator weakSeparator="1"/> | |
| <Action name="new_menu"/> | |
| <Action name="file_new"/> | |
| <Action name="new_tab"/> |
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 | |
| IPv6PrefixFile=$HOME/IPv6Prefix.txt | |
| IPv6Prefix=$(cat $IPv6PrefixFile) | |
| __rfc5952_expand () { | |
| read addr mask < <(IFS=/; echo $1) | |
| quads=$(grep -oE "[a-fA-F0-9]{1,4}" <<< ${addr/\/*} | wc -l) | |
| grep -qs ":$" <<< $addr && { addr="${addr}0000"; (( quads++ )); } | |
| grep -qs "^:" <<< $addr && { addr="0000${addr}"; (( quads++ )); } |
NewerOlder