Skip to content

Instantly share code, notes, and snippets.

View gjreasoner's full-sized avatar
:octocat:
Working

Justin Reasoner gjreasoner

:octocat:
Working
View GitHub Profile
@gjreasoner
gjreasoner / main.go
Created November 1, 2024 08:55
Nested viper and unmarshal into config
package main
import (
"fmt"
"strings"
viper "github.com/spf13/viper"
)
type Config struct {
Stripe Stripe
We can't make this file beautiful and searchable because it's too large.
"Zipcode","ZipCodeType","City","State","LocationType","Lat","Long","Location","Decommisioned","TaxReturnsFiled","EstimatedPopulation","TotalWages"
"00705","STANDARD","AIBONITO","PR","PRIMARY",18.14,-66.26,"NA-US-PR-AIBONITO","false",,,
"00610","STANDARD","ANASCO","PR","PRIMARY",18.28,-67.14,"NA-US-PR-ANASCO","false",,,
"00611","PO BOX","ANGELES","PR","PRIMARY",18.28,-66.79,"NA-US-PR-ANGELES","false",,,
"00612","STANDARD","ARECIBO","PR","PRIMARY",18.45,-66.73,"NA-US-PR-ARECIBO","false",,,
"00601","STANDARD","ADJUNTAS","PR","PRIMARY",18.16,-66.72,"NA-US-PR-ADJUNTAS","false",,,
"00631","PO BOX","CASTANER","PR","PRIMARY",18.19,-66.82,"NA-US-PR-CASTANER","false",,,
"00602","STANDARD","AGUADA","PR","PRIMARY",18.38,-67.18,"NA-US-PR-AGUADA","false",,,
"00603","STANDARD","AGUADILLA","PR","PRIMARY",18.43,-67.15,"NA-US-PR-AGUADILLA","false",,,
"00604","PO BOX","AGUADILLA","PR","PRIMARY",18.43,-67.15,"NA-US-PR-AGUADILLA","false",,,
@gjreasoner
gjreasoner / readme.md
Last active September 19, 2023 11:29
OpenObserve w/ WordPress

OpenObserve w/ WordPress

A dive into opentelemetry with OpenObserve a single binary that provides full stack observability.

This was a quick exploritory dive into this world, so things are a little less polished here, just wanted to get up and testing as quick as possible.

Screenshot 2023-09-19 at 7 06 54 AM

Screenshot 2023-09-19 at 7 13 39 AM

@gjreasoner
gjreasoner / readme.md
Created December 25, 2022 17:55
k3 tls
@gjreasoner
gjreasoner / caddy-config.json
Created June 1, 2022 05:09
Caddy remote config url via config_loaders url
{
"apps": {
"http": {
"servers": {
"example": {
"listen": [
":80"
],
"routes": [
{
@gjreasoner
gjreasoner / readme.md
Last active February 15, 2022 04:23
Test herokuish buildpack at a certain version
# Enter herokuish
docker run --rm -it -v $(pwd):/tmp/app gliderlabs/herokuish:latest-18 bash

# Command for running herokuish and checking current versions
herokuish version

herokuish: 0.5.34
buildpacks:
  heroku-buildpack-multi     v1.0.0
@gjreasoner
gjreasoner / readme.md
Last active February 6, 2022 14:15
Install 7kaa on MacOS

Download and install homebrew to get other required dependencies like SDL2

https://brew.sh/

brew install openal-soft
brew install sdl2
brew install sdl
brew install enet

Only need to do this to build it, if you have 7kaa already, you can skip:

@gjreasoner
gjreasoner / gpg-readme.md
Last active January 20, 2022 01:00
GPG Key Mac

Install dependencies

brew install gpg pinentry-mac

Temp hack

Because pinentry-mac didn't work for me, I replaced the default pinentry app with the following:

rm /usr/local/opt/pinentry/bin/pinentry
ln -s /usr/local/bin/pinentry-mac /usr/local/opt/pinentry/bin/pinentry
@gjreasoner
gjreasoner / main_go_diff.patch
Created January 16, 2022 12:46
gqlgen cors with Mux
Index: server.go
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/server.go b/server.go
--- a/server.go
+++ b/server.go (date 1642337159905)
@@ -1,16 +1,15 @@
package main
@gjreasoner
gjreasoner / README.md
Last active November 10, 2024 14:36
Expand Ubuntu 20 Proxmox Disk
# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button

# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME                      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda                         8:0    0    1T  0 disk
├─sda1                      8:1    0    1M  0 part
├─sda2                      8:2    0    1G  0 part /boot
└─sda3                      8:3    0    1T  0 part