Skip to content

Instantly share code, notes, and snippets.

# 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':
@pulecp
pulecp / redis-stats.php
Last active June 15, 2016 03:56 — forked from VerosK/redis-stats.php
Test redis status
<?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);
}
@pulecp
pulecp / rm-corrupt.sh
Last active March 31, 2016 09:49 — forked from codepunkt/rm-corrupt.sh
find/delete corrupt whisper-files
#!/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
#!/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)
@pulecp
pulecp / setup.sh
Created April 14, 2017 22:23
Counter Strike 1.6 Server
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; \