Skip to content

Instantly share code, notes, and snippets.

View jghorton14's full-sized avatar
🎯
Focusing

Jarrett Horton jghorton14

🎯
Focusing
View GitHub Profile
@jghorton14
jghorton14 / update-all.ps1
Created October 11, 2021 19:00
Desktop Shortcut to Update all Choco Packages
# Create a desktop shortcut with path:
# C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy Bypass -File C:\Users\{user}\Documents\scripts\update-all.ps1
$var = 'choco upgrade all -y'
Start-Process -Verb RunAs cmd.exe -Args '/c', $var
@jghorton14
jghorton14 / .bashrc
Last active October 15, 2020 01:33
Show your branch name on your terminal with colors
# Credit: https://askubuntu.com/a/946716/886435
### Show git branch name ###
force_color_prompt=yes
color_prompt=yes
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
@jghorton14
jghorton14 / renamePictureFileToDateFormat.sh
Last active September 25, 2020 16:16
Im terrible at bash... But a bash script that organizes your files by a date format to be easily sorted
#!/bin/bash
# Install exiftool to grab metadata from picture
sudo apt-get install libimage-exiftool-perl
# Create Directory to format
mkdir Formatted
# jpg
for f in *.jpg
@jghorton14
jghorton14 / startDockerNifi.sh
Created September 22, 2020 12:51
Start Created Docker container named Nifi
#!/bin/bash
sudo docker start nifi
echo "-------------Started nifi on http://localhost:8080/nifi --------------"
@jghorton14
jghorton14 / runNewDockerNifi.sh
Created September 22, 2020 12:50
Create new Docker Container and run on localhost:8080
#!/bin/bash
sudo docker run --name nifi \
-p 8080:8080 \
-d \
apache/nifi:latest
echo "----------Docker is create new container and run on http://localhost:8080/nifi ----------"
@jghorton14
jghorton14 / installNifiDocker.sh
Created September 22, 2020 12:36
Install nifi on docker
#!/bin/bash
sudo apt-get update
echo "----------Updated---------------"
sudo docker pull apache/nifi
echo "----------Downloaded nifi-------"
@jghorton14
jghorton14 / installDockerx86.sh
Created September 22, 2020 12:33
Install docker on ubuntu x86
#!/bin/bash
sudo apt-get update
echo "----------Updated---------------"
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
#include <stdio.h>
int main() {
printf("Hello World\n");
return 0;
}
@jghorton14
jghorton14 / createAndTestNamedProfile.sh
Created May 1, 2020 03:26
Create AWS named Profile and return IAM user details
aws configure --profile PROFILENAME
aws sts get-caller-identity --profile PROFILENAME
@jghorton14
jghorton14 / create-add-push.sh
Last active November 29, 2019 20:54
Create new github repo from cmd line and push code to github
curl -u 'USER' https://api.github.com/user/repos -d '{"name":"REPO"}'
echo "# REPO" >> README.md
git init
git add .
git commit -m "first commit"
git remote add origin https://github.com/USER/REPO.git
git push -u origin master