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 | |
if [ ! -x /usr/bin/curl ]; then | |
echo "Please install curl" | |
exit 1 | |
fi | |
if [ ! -x /usr/bin/jq ]; then | |
echo "Please install jq" | |
exit 1 |
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 /usr/lib/vmware/modules/source | |
tar xvf vmmon.tar | |
sed -i s/get_user_pages/get_user_pages_remote/g ./vmmon-only/linux/hostif.c | |
tar cvf vmmon.tar vmmon-only | |
rm -rf vmmon-only | |
tar xvf vmnet.tar | |
sed -i s/get_user_pages/get_user_pages_remote/g ./vmnet-only/userif.c | |
tar cvf vmmon.tar vmnet-only | |
rm -rf vmnet-only |
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 | |
#title :wildfly-install.sh | |
#description :The script to install Wildfly 10.x | |
#usage :/bin/bash wildfly-install.sh | |
#tested-version1 :10.0.0.Final | |
#tested-distros1 :Ubuntu 15.10; Debian 7,8; CentOS 7; Fedora 22 | |
#tested-version2 :10.1.0.Final | |
#tested-distros2 :Debian 8, Centos 6 | |
WILDFLY_VERSION=10.1.0.Final |
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 | |
hook_url='https://hooks.slack.com/services/' | |
hook_hash='XXXXXXXXXXXXXXX/YYYYYYYYYYYYYYYYYYYYYYYYYY' | |
username='INFRA-BOT' | |
url="$hook_url/$hook_hash" | |
to="${1:-"#lichtiteste"}" |
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 | |
hook_url='https://hooks.slack.com/services/' | |
hook_hash='XXXXXXXXXXXXXXXXXXXXXXXXXX' | |
username='INFRA-BOT' | |
url="$hook_url/$hook_hash" | |
to="${1:-"#generic"}" |
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
:global lastTimeLogingFailure; | |
:local varEmail "[email protected]"; | |
:local varEmailSubj "failure login"; | |
:local Hostname [/system identity get name]; | |
:local filter "login failure"; | |
:local varDate [/system clock get date]; | |
:local varMonth [:pick $varDate 0 3]; | |
:local varDay [:pick $varDate 4 6]; |
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
:log info "backup beginning now"; | |
:local varEmail "[email protected]"; | |
:local varEmailSubj "Backup"; | |
:local Hostname [/system identity get name]; | |
:local varDate [/system clock get date]; | |
:local varMonth [:pick $varDate 0 3]; | |
:local varDay [:pick $varDate 4 6]; | |
:local varYear [:pick $varDate 7 11]; |
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
zcat my-full-backup.sql.gz | sed -n '/^-- Table structure for table `mytable`/,/^-- Table structure for table /p' > my-table.sql |
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
while read line; do if [ $(echo $line | cut -d: -f3) -ge $(grep -w UID_MIN /etc/login.defs | awk '{print $2}') ] && [ $(echo $line | cut -d: -f3) -lt $(grep -w UID_MAX /etc/login.defs | awk '{print $2}') ]; then echo "$(date +%d/%m/%Y-%H:%M) => $(id $(echo $line | cut -d: -f1))"; fi; done < /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
Find the key ID on the fingerprint. The fingerprint will have an 8-character ID listed after the key size. Typically it looks like this: '1024D/64011A8B'. The actual ID portion is the '64011A8B'. You'll notice this is also the last 8 characters of the fingerprint itself. | |
Fetch the public key using the key ID. If you're running GnuPG on the command line, you can do this by typing | |
gpg --keyserver pgp.mit.edu --recv-keys <KeyID> | |
(where KeyID is obviously the ID of the key you want). | |
Check that the fingerprint of the key you've just fetched matches the fingerprint on the slip of paper: run | |
gpg --fingerprint <KeyID> | |
and compare it with the hard copy in front of you. | |
If (and only if) you are happy that the fingerprints match and the person showed you sufficient ID, you can do the actual 'signing' part of the process: type |