A collection of Splunk recipes for Heroku logs. Instructions for setting up Splunk Storm with Heroku can be found here. For the vast majority of these recipes you'll need to have enabled the Heroku labs feature, log-runtime-metrics, for your application.
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/sh | |
: ${1?"Usage: $0 ip subnet to scan. eg '192.168.1.'"} | |
subnet=$1 | |
for addr in `seq 0 1 255 `; do | |
# ( echo $subnet$addr) | |
( ping -c 3 -t 5 $subnet$addr > /dev/null && echo $subnet$addr is Alive ) & | |
done |
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
no_of_files=10; | |
counter=1; | |
while [[ $counter -le $no_of_files ]]; | |
do echo Creating file no $counter; | |
dd bs=1024 count=$RANDOM skip=$RANDOM if=/dev/urandom of=random-file.$counter; | |
let "counter += 1"; | |
done |
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
# Copy: | |
# /etc/init/delayed_job.conf | |
# Execute: | |
# ln -s /lib/init/upstart-job /etc/init.d/delayed_job | |
# Change user name | |
description "Start up the delayed_job service" | |
start on runlevel [2345] | |
stop on runlevel [06] |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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 | |
# CentOS rbenv system wide installation script | |
# Forked from https://gist.github.com/jpfuentes2/2002954 | |
# Installs rbenv system wide on CentOS 5/6, also allows single user installs. | |
# Install pre-requirements | |
yum groupinstall -y "Development Tools" | |
yum install -y gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel openssl-devel \ |