Skip to content

Instantly share code, notes, and snippets.

View peavers's full-sized avatar
💭
I'm ready. Lets go.

Chris Turner peavers

💭
I'm ready. Lets go.
  • Seattle, Washington
View GitHub Profile
@peavers
peavers / colors.json
Created January 2, 2022 06:00
Random colors with name and hex
[
{
"name": "boysenberry",
"hex": "#873260"
},
{
"name": "tea_green",
"hex": "#d0f0c0"
},
{
@peavers
peavers / FluxUtils.java
Last active October 30, 2021 21:59
Utility class for working with Flux publishers.
import java.time.Duration;
import lombok.experimental.UtilityClass;
import org.reactivestreams.Publisher;
import reactor.core.publisher.Flux;
import reactor.util.function.Tuple2;
@UtilityClass
public class FluxUtils {
/**
@peavers
peavers / AboutDialog.java
Last active October 20, 2021 02:55
Standalone "About" dialog for apps that just run in the task tray.
package space.forloop.stardew.desktop.system;
import java.awt.*;
import javax.swing.*;
import javax.swing.border.EmptyBorder;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.jetbrains.annotations.NotNull;
import space.forloop.stardew.desktop.utils.ImageUtils;
@peavers
peavers / git-cheats.sh
Last active February 13, 2024 15:47
Quick helper for git commands when dealing with fussy tech leads
##################
# Squashing all commits to a single commit on your feature branch
git checkout feature_branch
git reset --soft develop #Whatever branch you're merging into
git add -A
git commit -m "feat: Add new meaningful feature"
git push
##################
@peavers
peavers / .env
Created April 17, 2021 07:10
Complete SonarQube with reverse proxy
# SSL Certificates
DOMAIN=example.copm # Set this to the domain you want a certificate for, sonar will be available at it on /sonar
EMAIL=sonar@example.com # Need a valid email for the certificate generation
# Directories
USERDIR=/${HOME}/docker # Change this to where you'd like to store SonarQube configuration on your host machine
# Sonar
SONAR_DATABASE_USER=sonar # Make sure to change this
SONAR_DATABASE_PASSWORD=sonar # Make sure to change this
@peavers
peavers / .env
Created April 17, 2021 07:02
SonarQube env file
# SSL Certificates
DOMAIN=example.copm # Set this to the domain you want a certificate for, sonar will be available at it on /sonar
EMAIL=sonar@example.com # Need a valid email for the certificate generation
# Directories
USERDIR=/${HOME}/docker # Change this to where you'd like to store SonarQube configuration on your host machine
# Sonar
SONAR_DATABASE_USER=sonar # Make sure to change this
SONAR_DATABASE_PASSWORD=sonar # Make sure to change this
@peavers
peavers / docker-compose.yml
Last active April 17, 2021 07:35
SonarQube for SonarQube docker-compose snippet
sonarqube:
container_name: sonarqube
image: sonarqube:latest
restart: unless-stopped
cpus: 0.5
mem_limit: 4096M
mem_reservation: 1024M
ports:
- 9000:9000
environment:
@peavers
peavers / docker-compose.yml
Created April 17, 2021 06:54
Postgres for SonarQube docker-compose snippet
sonarqube-postgres:
container_name: sonarqube-postgres
image: postgres
restart: unless-stopped
environment:
- POSTGRES_USER=${SONAR_DATABASE_USER}
- POSTGRES_PASSWORD=${SONAR_DATABASE_PASSWORD}
volumes:
- postgresql:/var/lib/postgresql
- postgresql_data:/var/lib/postgresql/data
@peavers
peavers / docker-compose.yml
Created April 17, 2021 06:49
Traefik setup for reverse proxy with http to https redirect
version: "3"
services:
# https://hub.docker.com/_/traefik
traefik:
container_name: traefik
image: traefik:v2.2
restart: unless-stopped
command:
- --api
@peavers
peavers / .env
Last active April 15, 2021 12:25
Start the latest SonarQube with a reverse proxy which automatically creates certificates and serves it over HTTPS and a context path.
# SSL Certificates
DOMAIN=example.com
EMAIL=example@example.com
# Data Directories
USERDIR=${HOME}/docker
# Sonar
SONAR_DATABASE_USER=sonar
SONAR_DATABASE_PASSWORD=sonar