Skip to content

Instantly share code, notes, and snippets.

View jdye64's full-sized avatar
🦬

Jeremy Dyer jdye64

🦬
  • Nvidia
  • Atlanta, GA
View GitHub Profile
sudo su && yum install -y wget
cd /opt
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.tar.gz"
tar xzf jdk-8u131-linux-x64.tar.gz
cd /opt/jdk1.8.0_131/
alternatives --install /usr/bin/java java /opt/jdk1.8.0_131/bin/java 2
alternatives --config java
alternatives --install /usr/bin/jar jar /opt/jdk1.8.0_131/bin/jar 2
alternatives --install /usr/bin/javac javac /opt/jdk1.8.0_131/bin/javac 2
alternatives --set jar /opt/jdk1.8.0_131/bin/jar
#!/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
@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
@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
wget http://sourceforge.net/projects/nmon/files/nmon16e_x86_rhel72
chmod +x nmon16e_x86_rhel72
./nmon16e_x86_rhel72
@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
@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 / 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 / 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 / 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":