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
uname -a | |
who | |
whoami | |
/etc/hosts | |
cat /etc/*-release | |
cat /proc/meminfo | |
ll /etc/sysconfig/network-scripts/ | |
nmtui | |
nmcli device |
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
## | |
## Bismillaahirrahmaanirrahiim.. | |
## Allahumma sholli 'alaa sayyidinaa Muhammad.. | |
## | |
## allowance.py | |
## created by marjuqi r. | |
## august 2018 | |
## | |
## run using : python allowance.py | |
## |
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
## | |
## Bismillaahirrahmaanirrahiim.. | |
## Allahumma sholli 'alaa sayyidinaa Muhammad.. | |
## | |
## fastest_car.py | |
## created by marjuqi r. | |
## august 2018 | |
## | |
## run using : python fastest_car.py | |
## |
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 | |
########################################################################################## | |
########################################################################################## | |
## Bismillaahirrahmaanirrahiim.. | |
## Allahumma sholli 'alaa sayyidinaa Muhammad.. | |
## | |
## create_md5sum_all_file.sh | |
## created by marjuqi r. | |
## august 2018 |
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
mysql -uroot | |
-- | |
-- SHOW TABLES SIZE OF EACH DATABASES | |
-- | |
SELECT | |
table_schema as `Database`, | |
table_name AS `Table`, | |
round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` | |
FROM information_schema.TABLES |
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
# find all files under current active directory | |
find -type f | |
# generate MD5SUM hash of all files under current active directory and store in file MDSUM.txt | |
find -type f | xargs -I{} md5sum {} > MD5SUM.txt | |
# validate the content of file MD5SUM.txt (files and their MD5SUM hash) |
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
# List users and their groups: | |
for user in $(awk -F: '{print $1}' /etc/passwd); do groups $user; done | |
# List groups and their users: | |
cat /etc/group | awk -F: '{print $1, $3, $4}' | while read group gid members; do | |
members=$members,$(awk -F: "\$4 == $gid {print \",\" \$1}" /etc/passwd); |
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
cd ~ | |
curl 'https://setup.ius.io/' -o setup-ius.sh | |
sudo bash setup-ius.sh | |
sudo yum remove php-cli mod_php php-common | |
sudo yum install mod_php70u php70u-cli php70u-mysqlnd | |
systemctl restart httpd | |
#ref : https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-centos-7 |
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
#################################################################################################### | |
#################################################################################################### | |
# | |
# ON-TIME BACKUP | |
# | |
# assuming we have large enough "/data" folder | |
# and we use root user without password | |
# then database will zipped using GZIP | |
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
fdisk -l | |
# we assume our new device/drive is named '/dev/sdb'. | |
fdisk /dev/sdb | |
################################################ | |
[/sociallocker] Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel |
OlderNewer