Skip to content

Instantly share code, notes, and snippets.

#!/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');
@bbhenry
bbhenry / benchmark.sh
Last active August 29, 2015 13:57 — forked from ochronus/commands.sh
# 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
input {
file {
path => [ "/var/log/messages", "/var/log/kern.log" ]
type => "linux-syslog"
}
file {
path => "/var/log/apache2/access.log"
type => "apache-access"
}
# 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;
@bbhenry
bbhenry / script-template.sh
Created July 21, 2022 05:36 — forked from m-radzikowski/script-template.sh
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/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...]