Skip to content

Instantly share code, notes, and snippets.

View mtdeguzis's full-sized avatar

Michael T. DeGuzis mtdeguzis

  • Geisinger Health System
View GitHub Profile
@mtdeguzis
mtdeguzis / pkguninst.sh
Created January 14, 2020 18:49 — forked from wallneradam/pkguninst.sh
MacOS Package Uninstaller
#!/bin/bash
############################################################
### Shell script to uninstall Mac Os X packages ###
### Based on pkgutil. ###
### Created by Adam Wallner <adam.wallner at gmail.comu> ###
### V1.0.1 ###
############################################################
IFS=$'\n'
function get_pkgid {
@mtdeguzis
mtdeguzis / setup_knoxSSO_hdp265.sh
Created February 12, 2019 23:01 — forked from abajwa-hw/setup_knoxSSO_hdp265.sh
Setup Knox SSO for Ambari/Ranger/Atlas on HDP 2.6.5
#!/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 .
# 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
@mtdeguzis
mtdeguzis / 0_python_email.md
Created August 2, 2018 13:58 — forked from nickoala/0_python_email.md
Use Python to send and receive emails

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 February 9, 2018 22:54 — forked from mozillazg/supervisord.service
install and configure supervisord on centos 7.
[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 February 6, 2018 22:47 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

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