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
[lynis] | |
name=CISOfy Software - Lynis package | |
baseurl=https://packages.cisofy.com/community/lynis/rpm/ | |
enabled=1 | |
gpgkey=https://packages.cisofy.com/keys/cisofy-software-rpms-public.key | |
gpgcheck=1 | |
priority=2 |
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
w --no-header --ip-addr | awk '{print $3}' |
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
axel -a -n 10 https://buildlogs.centos.org/rolling/7/isos/x86_64/$(curl -s https://buildlogs.centos.org/rolling/7/isos/x86_64/ | grep Minimal | tail -4 | head -1 | awk '{print substr($0, index($0, "CentOS"), 35)}') |
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
require 'formula' | |
class Sshpass < Formula | |
desc 'Sshpass is a tool for non-interactivly performing password authentication with SSH\'s so called "interactive keyboard password authentication". Most user should use SSH\'s more secure public key authentiaction instead.' | |
url 'https://downloads.sourceforge.net/project/sshpass/sshpass/1.10/sshpass-1.10.tar.gz' | |
homepage 'https://sourceforge.net/projects/sshpass/' | |
sha256 'ad1106c203cbb56185ca3bad8c6ccafca3b4064696194da879f81c8d7bdfeeda' | |
version '1.10' | |
def install |
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
yum --assumeyes install yum-utils && \ | |
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \ | |
yum --assumeyes install docker-ce && \ | |
systemctl start docker && \ | |
systemctl enable docker |
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
curl --location \ | |
--output /usr/local/bin/docker-compose \ | |
$(curl --silent --show-error \ | |
https://api.github.com/repos/docker/compose/releases/latest \ | |
| grep 'Linux-x86_64"' \ | |
| grep url \ | |
| cut --delimiter='"' --fields=4 \ | |
) && \ | |
chmod +x /usr/local/bin/docker-compose |
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 | |
_PIDS=(`pgrep httpd`) | |
_PROC_COUNT=${#_PIDS[@]} | |
_MEMORY_TOTAL=`free | grep Mem | awk '{print $2;};'` | |
#_MEMORY_FREE=`vmstat -a | awk 'NR==3{print $4+$5;};'` | |
_RSS_TOTAL=0 | |
_SHARED_TOTAL=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
#!/bin/sh | |
echo -e "PID\tVSZ\tRSS\tShared" | |
for pid in $@; do | |
smaps="/proc/$pid/smaps" | |
vsz=$(grep -E "^Size" $smaps | awk 'BEGIN{ num = 0 } { num += $2 } END{ print num }') | |
rss=$(grep -E "^Rss" $smaps | awk 'BEGIN{ num = 0 } { num += $2 } END{ print num }') | |
shared=$(grep -E "^Shared" $smaps | awk 'BEGIN{ num = 0 } { num += $2 } END{ print num }') | |
percent=$(echo "scale=2; ($shared / $rss) * 100" | bc | cut -d "." -f 1) | |
echo -e "$pid\t${vsz}KB\t${rss}KB\t${shared}KB(${percent}%)" |
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 | |
# $1 process name | |
if [ $# -ne 1 ]; then | |
exit | |
fi | |
# print header | |
printf "PID\tRSS\tSHARED\n" | |
NewerOlder