Skip to content

Instantly share code, notes, and snippets.

Michael T. DeGuzis mtdeguzis

  • Geisinger Health System
Block or report user

Report or block mtdeguzis

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mtdeguzis
mtdeguzis / setup_knoxSSO_hdp265.sh
Created Feb 12, 2019 — forked from abajwa-hw/setup_knoxSSO_hdp265.sh
Setup Knox SSO for Ambari/Ranger/Atlas on HDP 2.6.5
View setup_knoxSSO_hdp265.sh
#!/usr/bin/env bash
export cluster_name=$1
export host=$(hostname -f)
export ambari_pass=$2
export knox_ldap_pass=$3
hostname=$(hostname -f)
current_dir=$(pwd)
cd /tmp
#Copy config-update to /tmp
cp /tmp/masterclass/ranger-atlas/HortoniaMunichSetup/config_update.py .
View how-to-create-an-rpm-repository.sh
# How to create an RPM repository
# This is for Redhat 64 bit versions of Linux. You can create your own RPM repository # to host your custom RPM packages.
#
# See "How to create an RPM from source with spec file" for more information.
# https://gist.github.com/1376973
# Step: 1
# Install createrepo
View gist:8883c3a2e570c64800bd51554c3d199d
1. Stop Kafka.
2. In Custom kafka-broker section in Ambari Configs, click Add Property and create
inter.broker.protocol.version with the following values and click Save.
Key: inter.broker.protocol.version
Value: CURRENT_KAFKA_VERSION
Where CURRENT_KAFKA_VERSION is the version of Kafka you are currently running. For
example, 0.10.1.
3. In Custom kafka-broker section in Ambari Configs, click Add Property and
createlog.message.format.version with the following values and click Save.
Key: log.message.format.version
View gist:dd335f2ecfbede3ea9cfd45e5db6af64
https://blog.seocahill.com/docker-postgres-cluster-with-high-availability-and-disaster-recovery/
https://github.com/paunin/PostDock
https://github.com/zalando/spilo
https://github.com/sorintlab/stolon
View gist:a6464bff942934c64607698218590710
#!/bin/bash
# If specified value is true, return valid
# Else return invalid
#
# Allows concatenation via && and ||
evaluate_boolean() {
if [ "${1}" == "True" ] || \
[ "${1}" == "true" ] || \
[ "${1}" == "1" ]; then
View gist:a3269f6a4ed54fbac8060578066f1dce
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "icinga_dbversion" does not exist
LINE 1: SELECT icinga_dbversion.version FROM icinga_dbversion
^, query was: SELECT icinga_dbversion.version FROM icinga_dbversion
#0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array)
#2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(String, Array)
#3 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(816): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#4 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(1400): Zend_Db_Adapter_Abstract->fetchOne(Object(Zend_Db_Select))
#5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(832): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->getIdoVers
View gist:605da6fd3a745363586cdc4270c5842f
SQLSTATE[42P01]: Undefined table: 7 ERROR: relation "icinga_dbversion" does not exist
LINE 1: SELECT icinga_dbversion.version FROM icinga_dbversion
^, query was: SELECT icinga_dbversion.version FROM icinga_dbversion
#0 /usr/share/icingaweb2/library/vendor/Zend/Db/Statement.php(297): Zend_Db_Statement_Pdo->_execute(Array)
#1 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(470): Zend_Db_Statement->execute(Array)
#2 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Pdo/Abstract.php(238): Zend_Db_Adapter_Abstract->query(String, Array)
#3 /usr/share/icingaweb2/library/vendor/Zend/Db/Adapter/Abstract.php(816): Zend_Db_Adapter_Pdo_Abstract->query(Object(Zend_Db_Select), Array)
#4 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(1400): Zend_Db_Adapter_Abstract->fetchOne(Object(Zend_Db_Select))
#5 /usr/share/icingaweb2/modules/monitoring/library/Monitoring/Backend/Ido/Query/IdoQuery.php(832): Icinga\Module\Monitoring\Backend\Ido\Query\IdoQuery->getIdoVers
@mtdeguzis
mtdeguzis / 0_python_email.md
Created Aug 2, 2018 — forked from nickoala/0_python_email.md
Use Python to send and receive emails
View 0_python_email.md

Use Python to:

  • send a plain text email
  • send an email with attachment
  • receive and filter emails according to some criteria
@mtdeguzis
mtdeguzis / supervisord.service
Created Feb 9, 2018 — forked from mozillazg/supervisord.service
install and configure supervisord on centos 7.
View supervisord.service
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/bin/supervisord -c /etc/supervisord/supervisord.conf
ExecReload=/bin/supervisorctl reload
ExecStop=/bin/supervisorctl shutdown
@mtdeguzis
mtdeguzis / docker-cleanup-resources.md
Created Feb 6, 2018 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks
View docker-cleanup-resources.md

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
You can’t perform that action at this time.