Skip to content

Instantly share code, notes, and snippets.

Farhad Shahbazi Grauwolf

  • Vienna
Block or report user

Report or block Grauwolf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Grauwolf
Grauwolf / mrped
Last active Jan 2, 2016 — forked from sts/mrped
View mrped
#!/usr/bin/env zsh
# MK's Remote Plugin Executor NG ;-)
#
# Workaround for check_mks inability to use scripts from a mrpe.d directory
# http://lists.mathias-kettner.de/pipermail/checkmk-en/2013-February/008646.html
#
# Make sure mrpe.cfg doesn't exist, or you will end up with two <<<mrpe>>>
# output sections.
#
View rm-corrupt.sh
#!/bin/bash
directory='/var/lib/graphite/whisper'
for file in $(find $directory -type f -name '*.wsp' -print); do
whisper-info $file > /dev/null 2>&1
[ $? -ne 0 ] && rm -v $file
done
@Grauwolf
Grauwolf / gist:8820089
Created Feb 5, 2014
resize whisper files
View gist:8820089
find /var/lib/graphite/whisper/ -type f -name \*.wsp -exec whisper-resize --nobackup {} 10s:7d 1m:30d 1h:90d 1d:395d \;
View gist:1315e7aa41033877d60c
### Keybase proof
I hereby claim:
* I am grauwolf on github.
* I am grauwolf (https://keybase.io/grauwolf) on keybase.
* I have a public key whose fingerprint is 2CE3 83BB 2545 86B4 6DC2 302B 0B29 8B50 F937 3A2A
To claim this, I am signing this object:
@Grauwolf
Grauwolf / get_alexa_1m_mx_rrs
Last active Aug 29, 2015 — forked from azet/get_alexa_1m_mx_rrs
Retrieves MX and A records for the 'Alexa Top 1 Million' list and prints them as nicely formatted JSON objects to stdout.
View get_alexa_1m_mx_rrs
#!/usr/bin/env bash
#
# Retrieves MX and A records for the 'Alexa Top 1 Million' list
# and prints them as nicely formatted JSON objects to stdout.
#
# Authors: Aaron Zauner <azet@azet.org>
# License: CC0 1.0 (https://creativecommons.org/publicdomain/zero/1.0)
#
set -e
@Grauwolf
Grauwolf / psd2tiff.sh
Created Mar 24, 2016
convert PSD files in directory to TIFF files
View psd2tiff.sh
#!/bin/bash
# psd2tiff - convert PSD files in directory to TIFF files
set -euo pipefail
input_dir=""
output_dir=""
show_help() {
cat << EOF
@Grauwolf
Grauwolf / ansible-staggered-minute.yml
Last active Jul 24, 2016
ansible generate staggered number (something like puppet's fqdn_rand)
View ansible-staggered-minute.yml
- name: get staggered minute for cronjob
shell: expr $((16#`echo "{{inventory_hostname}}" | md5sum | cut -c -4`)) % 30
args:
executable: /bin/bash
register: cron_staggered_minute
changed_when: false
always_run: yes
- name: cronjob
cron:
View prometheus-apt.pl
#!/usr/bin/perl
# generates output for prometheus-node-exporter textfile collector
# run as cronjob. eg.
# 0 * * * * root /usr/local/bin/prometheus-apt > /var/lib/prometheus-textfile/prometheus-apt.prom
use strict;
use warnings;
use feature 'say';
You can’t perform that action at this time.