Skip to content

Instantly share code, notes, and snippets.

View jdye64's full-sized avatar
🦬

Jeremy Dyer jdye64

🦬
  • Nvidia
  • Atlanta, GA
View GitHub Profile
@jdye64
jdye64 / HWXSandboxKerberos.sh
Last active August 29, 2015 14:19
CentOS Kerberos KDC Installation
#!/bin/bash
#To use this script directly in the Hortonworks Sandbox I use this command
#wget https://gist.github.com/jdye64/76d4dc92018c3e613f66/download -O hwx_sand_krb.tar.gz && tar zxvf ./hwx_sand_krb.tar.gz -C ./. --strip-components=1 && chmod 777 ./HWXSandboxKerberos.sh && ./HWXSandboxKerberos.sh
#Case sensitive. This will bite you if not careful
#KDC Host - sandbox.hortonworks.com
#Realm Name - HORTONWORKS.COM
#Domains - .hortonworks.com,hortonworks.com
#kadmin host - sandbox.hortonworks.com
@jdye64
jdye64 / gist:ca07e01ff3d8e93210c3
Created June 23, 2015 03:59
Convert .dav files in current directory to .mp4
#!/usr/bin/python
print "Converting all of the .dav files in this current directory into .mp4 files using ffmpeg"
import os
from subprocess import call
files = [f for f in os.listdir('.') if os.path.isfile(f)]
for f in files:
ext = f.split(".")[-1]
if ext == "dav" or ext == "DAV":
@jdye64
jdye64 / gist:edc12e9e11a92e088818
Last active March 1, 2021 18:47
Ambari V1 REST API Reference
#!/bin/bash
# These are examples for the stable V1. They will not be broken by any future V1 releases.
# Global Variables
USER="admin"
PASS="admin"
AMBARI_HOST="localhost"
AMBARI_PORT=8080
# -------- BEGIN HDP Stack Admin Actions --------
@jdye64
jdye64 / P12ToOpenSSHPublic
Created September 10, 2015 20:30
Extract OpenSSH Public key from Google Cloud p12 file
cat filename.p12 | openssl pkcs12 -nodes -nocerts -passin pass:notasecret | openssl rsa > secret.pem
chmod 600 secret.pem
ssh-keygen -y -f secret.pem > OpenSSHPublicKey.pub
@jdye64
jdye64 / DockerConsulSetup_MacOSX.sh
Last active April 8, 2016 00:41
Script for installing Consul, Swarm, and Nginx on MacOSX
echo "Setting up Docker infrastructure for Service Discovery and DNS capabilities"
MANAGER_IP=$(docker-machine ip manager)
AGENT1_IP=$(docker-machine ip agent1)
AGENT2_IP=$(docker-machine ip agent2)
if [ ! $MANAGER_IP ]; then
echo "No 'manager' virtualbox VM available. Creating one now"
docker-machine create -d virtualbox manager
MANAGER_IP=$(docker-machine ip manager)
@jdye64
jdye64 / # opencv3 - 2016-06-21_20-02-43.txt
Created June 22, 2016 00:05
opencv3 (homebrew/science/opencv3) on Mac OS X 10.11.5 - Homebrew build logs
Homebrew build logs for homebrew/science/opencv3 on Mac OS X 10.11.5
Build date: 2016-06-21 20:02:43
wget http://sourceforge.net/projects/nmon/files/nmon16e_x86_rhel72
chmod +x nmon16e_x86_rhel72
./nmon16e_x86_rhel72
@jdye64
jdye64 / Delete Large File from Git History
Created July 21, 2016 12:07
Deletes a file completely from the git history allowed you to remove large files that cannot be pushed to remote git repo
git filter-branch --index-filter 'git rm -r --cached --ignore-unmatch <file/dir>' HEAD
@jdye64
jdye64 / DockerRHEL7Install.sh
Last active August 16, 2018 23:51
Script for installing Docker Engine, Compose, and Swarm on RHEL 7.2
#!/bin/bash
#### CHANGE DOCKER ROOT DIRECTORY ####
# For Azure VM edit vi /lib/systemd/system/docker.service to add the -g flag to the directory that you want be the Docker root directory
# systemctl daemon-reload
# systemctl restart docker
#### REDHAT 7 STOPPING FIREWALLD ####
# service firewalld stop
# systemctl disable firewalld
#!/bin/bash
# Enter the name of the file.
read -p "Enter file name: " filename
# Remove any spaces in the file name.
filename=$(echo "$filename" | sed 's/ /-/g')
# This is for metadata. It will show up in the media player playlist or after clicking Properties (in OS X Info) on the file context menu.
read -p "Enter a description: " details