Skip to content

Instantly share code, notes, and snippets.

View jarrod180's full-sized avatar
๐Ÿš€

Jarrod jarrod180

๐Ÿš€
View GitHub Profile
@jarrod180
jarrod180 / gist:82b94a132584362e4d351e224fec9516
Last active December 18, 2024 10:21
Create a CA and self signed certificates for testing locally using openssl
# Create a CA key
openssl genrsa 2048 > ca-key.pem
# Create a CA cert
openssl req -new -x509 -nodes -days 365000 -key ca-key.pem -out ca-cert.pem
# Create a server key
openssl req -newkey rsa:2048 -nodes -days 365000 -keyout server-key.pem -out server-req.pem
# Create a client key
@jarrod180
jarrod180 / Ubuntu OVA VMWare Cloud-init Deploy
Last active October 9, 2023 04:50
Deploy a ubuntu OVA to VMWare ESXi with cloud init user-data yaml
First create a cloud config YAML file, save it for example, as "my-user-data.yaml"
---
#cloud-config
hostname: ubuntu-vm1
users:
- default
- name: someuser
@jarrod180
jarrod180 / tmux.txt
Last active January 25, 2019 05:43
TMUX CHEAT SHEET
# Tmux Config File Location
~/.tmux.conf
# tmux Config Not Applied
# All TMUX sessions must be killed first
# Kill tmux server
tmux kill-server
# or
killall tmux
@jarrod180
jarrod180 / foo.sh
Created January 23, 2019 08:50
OpenSSL Create a CA and Client Cert
openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 1000 -key ca.key -out ca.crt
openssl genrsa -des3 -out client.key 4096
openssl req -new -key client.key -out client.csr
openssl x509 -req -days 1000 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt
openssl pkcs12 -export -clcerts -in client.crt -inkey client.key -out client.p12
openssl pkcs12 -in client.p12 -out client.pem -clcerts
@jarrod180
jarrod180 / haproxy.cfg
Created January 22, 2019 11:12 — forked from carlchan/haproxy.cfg
HAProxy - Client SSL Auth "knocking" and automatic certbot
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
@jarrod180
jarrod180 / tmux.conf
Created January 22, 2019 10:48 — forked from spicycode/tmux.conf
The best and greatest tmux.conf ever
# 0 is too far from ` ;)
set -g base-index 1
# Automatically set window title
set-window-option -g automatic-rename on
set-option -g set-titles on
#set -g default-terminal screen-256color
set -g status-keys vi
set -g history-limit 10000
sudo apt-get install xrdp xorgxrdp
echo xfce4-session > ~/.xsession && chmod a+x ~/.xsession
sudo service xrdp restart
@jarrod180
jarrod180 / pom.xml
Last active October 19, 2017 11:15
Maven Executable Jar With Dependencies - Add to pom.xml - simply set the main class
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>