Skip to content

Instantly share code, notes, and snippets.

View mtparet's full-sized avatar

Matthieu Paret mtparet

View GitHub Profile
@mtparet
mtparet / gist:7998ceffc7832e907504c36bda490462
Created December 27, 2019 22:08
Benchmark elasticsearch plan XXL with esrally 1.3.0
esrally --pipeline=benchmark-only --target-hosts=https://es-test.k8s.paret.fr/
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
@mtparet
mtparet / gist:dc9abc203213e9d6fa426b2e2316bd32
Created December 27, 2019 19:59
Benchmark elasticsearch plan XL with esrally 1.3.0
esrally --pipeline=benchmark-only --target-hosts=https://es-test.k8s.paret.fr/
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
@mtparet
mtparet / gist:111eb0961e88f56b12e491e7baa482c8
Created December 27, 2019 13:58
Benchmark elasticsearch plan M with esrally 1.3.0
esrally --pipeline=benchmark-only --target-hosts=https://es-test.k8s.paret.fr/
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
@mtparet
mtparet / gist:57a8e2e6c34fd05c74632c3bd7421f5d
Last active December 27, 2019 17:16
Benchmark elasticsearch plan L with esrally 1.3.0
$ esrally --pipeline=benchmark-only --target-hosts=https://es-test.k8s.paret.fr/
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
@mtparet
mtparet / gist:59d8e8292b4612deabba1c44e4b7a466
Last active December 27, 2019 09:12
Benchmark elasticsearch plan S with esrally 1.3.0
$ esrally --pipeline=benchmark-only --target-hosts=https://es-test.k8s.paret.fr/
____ ____
/ __ \____ _/ / /_ __
/ /_/ / __ `/ / / / / /
/ _, _/ /_/ / / / /_/ /
/_/ |_|\__,_/_/_/\__, /
/____/
@mtparet
mtparet / gist:7d92bae1ca5b62dd85318fada4105368
Last active May 25, 2018 15:16
docker rancher cleanup
#!/bin/sh
docker rm -f $(docker ps -qa)
docker volume rm $(docker volume ls -q)
docker rmi $(docker images -q)
cleanupdirs="/var/lib/etcd /etc/kubernetes /etc/cni /opt/cni /var/lib/cni /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
### Keybase proof
I hereby claim:
* I am mtparet on github.
* I am mtparet (https://keybase.io/mtparet) on keybase.
* I have a public key whose fingerprint is A644 68CF 5FC2 6F02 07E0 4174 A663 E4FA B8D7 C002
To claim this, I am signing this object:
@mtparet
mtparet / test_validation.rb
Created February 2, 2018 17:25
Polymorphic relation validation
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
@mtparet
mtparet / gist:fd34d820a862e3390cfbbfd3f28618e6
Created February 2, 2018 17:22
Test nested validations
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do
@mtparet
mtparet / activerecord_test_works.rb
Created February 2, 2018 13:56
Test which works for children validation
# frozen_string_literal: true
begin
require "bundler/inline"
rescue LoadError => e
$stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler"
raise e
end
gemfile(true) do