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
apt-get update | |
apt-get install unzip -y | |
apt-get install expect -y | |
# Counter strike | |
mkdir server ; mkdir steamcmd ; cd steamcmd | |
wget http://media.steampowered.com/installer/steamcmd_linux.tar.gz | |
tar -xvzf steamcmd_linux.tar.gz | |
expect -c 'set timeout 9999; \ |
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 [[ "$#" < "2" || "$#" > "3" ]]; then | |
cat <<END | |
Glusterfs GFID resolver -- turns a GFID into a real file path | |
Usage: $0 <brick-path> <gfid> [-q] | |
<brick-path> : the path to your glusterfs brick (required) | |
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 | |
options=('find' 'delete') | |
PS3='state your wish: ' | |
echo -e "\nfind/delete corrupt whisper-files" | |
[ -x /bin/whisper-info ] || { echo '/bin/whisper-info does not exists or it is not executable'; exit 1; } | |
select opt in "${options[@]}"; do | |
case $REPLY in |
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
<?php | |
/* Redis PHP stats dump | |
* Based on code https://gist.github.com/putzflorian/45c137a8d7868d4b6250 | |
*/ | |
define(REDIS_TIMEOUT, 2); | |
$fp = fsockopen('127.0.0.1', 6379, $errno, $errstr, REDIS_TIMEOUT); | |
if (!$fp) { | |
die($errstr); | |
} |
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 of severity levels | |
# ["emergency", "alert", "critical", "error", "warning", "notice", "informational", "debug"] | |
cron { 'Clean_debug_older_than_4_weeks_28_days': | |
command => '/usr/local/bin/purge_elasticsearch.sh -d 28 -l debug', | |
minute => '10', | |
hour => '5', | |
} | |
cron { 'Clean_informational_older_than_16_weeks_112_days': |