Skip to content

Instantly share code, notes, and snippets.

majormoses / zoom-osx-prevent-webserver-reinstall.bash
Last active July 10, 2019 19:59
A script to mitigate concerns with zoom RCE and video through the installed webserver, see for more details
if [[ "$OSTYPE" == "darwin"* ]]; then
# detect os
echo "detected: ${OSTYPE}"
# delete the `.zoomus` if its a folder
if [[ -d ~/.zoomus ]]; then
rm -rf ~/.zoomus
majormoses / gist:e22b1fb88d88bf6c333cbb1aa478a417
Created May 13, 2017 02:21
Finally reproduced issue with sensu-plugins-memcached install on newer versions of sensu
# get into a debian container
$ docker run -it debian:jessie /bin/bash
Unable to find image 'debian:jessie' locally
jessie: Pulling from library/debian
Digest: sha256:476959f29a17423a24a17716e058352ff6fbf13d8389e4a561c8ccc758245937
Status: Downloaded newer image for debian:jessie
# install some pre-reqs
root@62b7a91a1fd8:/# apt-get update
Get:1 jessie/updates InRelease [63.1 kB]
majormoses / gist:c78c4b2395625df273900d7c147e72c7
Created June 4, 2017 23:56
listing installed packages:
acl install
adduser install
apt install
base-files install
base-passwd install
bash install
binutils install
bsdutils install
build-essential install
# same docker setup with installing deps first
$ docker run -it anroots/sensu-client /bin/bash
# install deps
root@8614d21723f2:/# apt-get update
Get:1 jessie/updates InRelease [63.1 kB]
Ign jessie InRelease
Get:2 jessie-updates InRelease [145 kB]
Get:3 jessie/updates/main amd64 Packages [510 kB]
Get:4 jessie Release.gpg [2373 B]
majormoses / gist:ecf0a3404c2d140bb32fa5c01c638bd2
Created May 13, 2017 01:59
Attempting to replicate install failure with sensu-plugins-memcached inside docker
# run a docker image and shell in
$ docker run -it anroots/sensu-client /bin/bash
Unable to find image 'anroots/sensu-client:latest' locally
latest: Pulling from anroots/sensu-client
fdd5d7827f33: Pull complete
a3ed95caeb02: Pull complete
a050c2b80c6b: Pull complete
f4beaf51b556: Pull complete
992c0cff1787: Pull complete
a3a48c2b3aa6: Pull complete
majormoses / ubuntu-1604.log
Last active April 26, 2019 01:52
$ bundle exec kitchen converge default-ubuntu-1604
-----> Starting Kitchen (v1.21.2)
-----> Creating <default-ubuntu-1604>...
Creating kitchen sandbox at /home/babrams/.dokken/kitchen_sandbox/c488ee9495-default-ubuntu-1604
Creating verifier sandbox at /home/babrams/.dokken/verifier_sandbox/c488ee9495-default-ubuntu-1604
Building work image..
Creating container c488ee9495-default-ubuntu-1604
Finished creating <default-ubuntu-1604> (0m17.72s).
-----> Converging <default-ubuntu-1604>...
Creating kitchen sandbox in /home/babrams/.dokken/kitchen_sandbox/c488ee9495-default-ubuntu-1604
majormoses / logs-install-aws-plugin-docker.txt
Last active November 5, 2018 23:47
This is a log of install (including timing) of `sensu-plugins-aws` gem
# clone my repo for quick testing of plugins in an isolated container
$ git clone
Cloning into 'sensu-plugin-install-test'...
remote: Counting objects: 26, done.
remote: Total 26 (delta 0), reused 0 (delta 0), pack-reused 26
Receiving objects: 100% (26/26), 7.84 KiB | 7.84 MiB/s, done.
Resolving deltas: 100% (9/9), done.
# created Gemfile, showing contents
$ cat app/Gemfile
majormoses / check_SOME_portal.rb
Last active September 1, 2018 00:32
How to manage checks with chef and a various collection of sensu configuration artifacts such as filters, handler configs, etc.
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['some_portal_monitoring']['command'] = "check-http.rb -u #{node['MY_CUSTOM_NAMESPACE']['sensu']['monitoring']['SOME_portal_monitoring']['url']} -q SOME_STRING"
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['some_portal_monitoring']['handlers'] = ['pagerduty']
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['some_portal_monitoring']['subscribers'] = ['MY_SUBSCRIPTION']
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['some_portal_monitoring']['interval'] = 30
default['MY_CUSTOM_NAMESPACE']['sensu']['checks']['some_portal_monitoring']['additional'] = {
'pager_team' => 'urgent',
'notification' => 'Some_PORTAL is not reachable',
'occurrences' => 4,
'runbook' => '<REDACTED>'
majormoses / sensu-test-dokken-systemd.log
Created July 19, 2018 03:35
Attempting to replicate systemd issues with sensu in `kitchen-dokken`
$ bundle exec kitchen converge minimal-ubuntu-1604
-----> Starting Kitchen (v1.22.0)
-----> Creating <minimal-ubuntu-1604>...
Creating kitchen sandbox at /home/babrams/.dokken/kitchen_sandbox/3429c7f89b-minimal-ubuntu-1604
Creating verifier sandbox at /home/babrams/.dokken/verifier_sandbox/3429c7f89b-minimal-ubuntu-1604
Building work image..
Creating container 3429c7f89b-minimal-ubuntu-1604
Finished creating <minimal-ubuntu-1604> (0m1.94s).
-----> Converging <minimal-ubuntu-1604>...
Creating kitchen sandbox in /home/babrams/.dokken/kitchen_sandbox/3429c7f89b-minimal-ubuntu-1604
$ ./gradlew packagingTest -Pvagrant.boxes=centos-6,ubuntu-1404
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon:
Daemon will be stopped at the end of the build stopping after processing
> Configure project :benchmarks
Elasticsearch Build Hamster says Hello!
Gradle Version : 4.7
OS Info : Linux 4.15.0-23-generic (amd64)