Skip to content

Instantly share code, notes, and snippets.

View juicedM3's full-sized avatar

Justin juicedM3

  • Philadelphia, PA
View GitHub Profile
@juicedM3
juicedM3 / glacier-archive-delete.go
Created May 26, 2025 00:35
Delete Glacier Archives quicker than shelling out to awscli every time.
package main
import "context"
import "bufio"
import "fmt"
import "log"
import "os"
import "github.com/aws/aws-sdk-go-v2/config"
import "github.com/aws/aws-sdk-go-v2/service/glacier"
@juicedM3
juicedM3 / dice_math.py
Created November 10, 2021 02:27
Taking my Ruby version and writing it in Python.
#!/usr/bin/env python
from random import choice
#
# Originally written in Ruby as a math learning tool for my 6 year old son. It
# is called 'DiceMath' because I wanted to add the visual for dice to help him
# count. I never got that far with adding images but I kept the name since I
# still think of it as rolling dice to select 2 random numbers.
#
!/usr/bin/env ruby
#
# My 6 year old has a home work assignment where he has to roll 2 dice and perform addition.
# I doubt we can find any dice in this house (thanks to him), so I wrote a quick script and
# probably took it too far. So based on the concept of "rolling 2 dice", but you can add,
# subtract, multiple and divide if you wish and pick the number of "sides" (default is 6).
# The division isn't as fun and my Ruby is super rusty so it's good practice.
#
class DiceMath
@juicedM3
juicedM3 / gist:2039af8e84e032101ea9a31808952ec7
Created November 15, 2018 20:38
Kubespray scaling: /usr/local/bin/etcd-scripts Read-only
"msg": "There was an issue creating /usr/local/bin/etcd-scripts as requested: [Errno 30] Read-only file system: '/usr/local/bin/etcd-scripts'",
"path": "/usr/local/bin/etcd-scripts",
@juicedM3
juicedM3 / gist:c631ab3381c6970ab65a22c6cf1cd653
Created November 15, 2018 20:27
Kubespray scaling: host unreachable, but the real issue is the python path.
Using module file /usr/local/lib/python2.7/site-packages/ansible/modules/commands/command.py
<10.250.199.12> ESTABLISH SSH CONNECTION FOR USER: core
<10.250.199.12> SSH: EXEC ssh -o ControlMaster=auto -o ControlPersist=30m -o ConnectionAttempts=100 -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=core -o ConnectTimeout=10 -o 'ProxyCommand=ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -W %h:%p [email protected]' -o ControlPath=/Users/jbedard/.ansible/cp/520dfddec1 10.250.199.12 '/bin/sh -c '"'"'sudo -H -S -n -u root /bin/sh -c '"'"'"'"'"'"'"'"'echo BECOME-SUCCESS-dpqyloobrgvjrzuwqspcstcyxqhozeme; no_proxy='"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"''"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"' https_proxy='"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"''"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"'"' http_pr
@juicedM3
juicedM3 / Makefile
Last active January 15, 2016 01:06
cassandra-mesos shutdown script in Go. Uses ZooKeeper to help with discovery of framework ID and app ID. If you do not want to shutdown your instance of canssandra-mesos DO NOT RUN THIS SCRIPT! It doesn't verify your decision, it does not backup any data, and will shutdown as long as it can discover all the necessary fields. My first Go script.
all: *.proto
protoc --proto_path=${GOPATH}/src:${GOPATH}/src/github.com/gogo/protobuf/protobuf:. --gogo_out=. *.proto