This file contains hidden or 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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...] |
This file contains hidden or 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
# Nginx proxy for Elasticsearch + Kibana | |
# If you use this, you'll want to point config.js at http://FQDN:80/ instead of | |
# http://FQDN:9200 | |
server { | |
listen *:80 ; | |
server_name kibana.myhost.org; | |
access_log /var/log/nginx/kibana.myhost.org.access.log; | |
This file contains hidden or 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
input { | |
file { | |
path => [ "/var/log/messages", "/var/log/kern.log" ] | |
type => "linux-syslog" | |
} | |
file { | |
path => "/var/log/apache2/access.log" | |
type => "apache-access" | |
} |
This file contains hidden or 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
# install sysbench | |
$ apt-get install sysbench | |
# CPU benchmark, 1 thread | |
$ sysbench --test=cpu --cpu-max-prime=20000 run | |
# CPU benchmark, 64 threads | |
$ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=64 run | |
# Disk benchmark, random read. See .fio files in this gist |
This file contains hidden or 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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use Selenium::Remote::Driver; | |
use Test::More; | |
my $driver = Selenium::Remote::Driver->new; | |
my $driver2 = Selenium::Remote::Driver->new(remote_server_addr=>'10.4.20.1'); |