Skip to content

Instantly share code, notes, and snippets.

@majormoses
majormoses / zoom-osx-prevent-webserver-reinstall.bash
Last active Jul 10, 2019
A script to mitigate concerns with zoom RCE and video through the installed webserver, see https://link.medium.com/8iiKfpAyaY for more details
View zoom-osx-prevent-webserver-reinstall.bash
#!/bin/bash
if [[ "$OSTYPE" == "darwin"* ]]; then
# detect os
echo "detected: ${OSTYPE}"
# delete the `.zoomus` if its a folder
if [[ -d ~/.zoomus ]]; then
rm -rf ~/.zoomus
fi
@majormoses
majormoses / ubuntu-1604.log
Last active Apr 26, 2019
test-sensu-go-chef
View ubuntu-1604.log
$ KITCHEN_LOCAL_YAML=.kitchen.dokken.yml 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
majormoses / logs-install-aws-plugin-docker.txt
Last active Nov 5, 2018
This is a log of install (including timing) of `sensu-plugins-aws` gem
View logs-install-aws-plugin-docker.txt
# clone my repo for quick testing of plugins in an isolated container
$ git clone git@github.com:majormoses/sensu-plugin-install-test.git
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
majormoses / sensu-test-dokken-systemd.log
Created Jul 19, 2018
Attempting to replicate systemd issues with sensu in `kitchen-dokken`
View sensu-test-dokken-systemd.log
$ KITCHEN_YAML=.kitchen.dokken.yml 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
View es-tests-pr-31285.log
$ ./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: https://docs.gradle.org/4.7/userguide/gradle_daemon.html.
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)
@majormoses
majormoses / testing-artifact
Created Mar 17, 2018
Testing artifact for fixing sensu-plugins-ssl #35
View testing-artifact
# test without debug and default options
$ time bundle exec ./bin/check-ssl-qualys.rb -d google.com
CheckSSLQualys OK: google.com rated A
real 2m48.673s
user 0m0.208s
sys 0m0.020s
# test without debug and default options
$ time bundle exec ./bin/check-ssl-qualys.rb -d google.com
View keybase.md

Keybase proof

I hereby claim:

  • I am majormoses on github.
  • I am majormoses (https://keybase.io/majormoses) on keybase.
  • I have a public key ASDkf6DeBHYQYgrqCPmlhZXXHQ3YGmhjcg6xWRPUh-wI-Ao

To claim this, I am signing this object:

View logstash6_compat.patch
diff --git a/bin/metrics-logstash-node.rb b/bin/metrics-logstash-node.rb
index d8251b3..3975230 100755
--- a/bin/metrics-logstash-node.rb
+++ b/bin/metrics-logstash-node.rb
@@ -112,32 +112,62 @@ class LogstashNodeMetrics < Sensu::Plugin::Metric::CLI::Graphite
metrics['process.open_file_descriptors'] = node['process']['open_file_descriptors']
metrics['process.peak_open_file_descriptors'] = node['process']['peak_open_file_descriptors']
metrics['process.max_file_descriptors'] = node['process']['max_file_descriptors']
-
- node['pipeline']['events'].each do |key, value|
@majormoses
majormoses / jenkins_recipe.rb
Last active Nov 8, 2017
Example of how to restart a service, wait for it to come up, and then do more things
View jenkins_recipe.rb
# drop in a template and immediately restart jenkins
template "#{node['jenkins']['master']['home']}/config.xml" do
source 'config.xml.erb'
variables({
'github_client_id' => <REDACTED>,
'github_client_secret' => <REDACTED>
})
owner node['jenkins']['master']['user']
group node['jenkins']['master']['group']
mode '0600'
@majormoses
majormoses / check-http-healthcheck.rb
Created Oct 12, 2017
A script that checks an http endpoint, parses json, and alerts when healthchecks fail
View check-http-healthcheck.rb
#! /usr/bin/env ruby
#
# check-cc-heap-limit
#
# DESCRIPTION:
# A script that checks an http endpoint, parses json, and alerts when healthchecks fail
#
# OUTPUT:
# plain-text
#
You can’t perform that action at this time.