Skip to content

Instantly share code, notes, and snippets.

View steinybot's full-sized avatar

Jason Pickens steinybot

View GitHub Profile
@steinybot
steinybot / Bob.txt
Created March 30, 2018 00:58
This is a markdown test
Bob
@steinybot
steinybot / Scratch.java
Created March 28, 2019 05:19
Check if the operating system is 64-bit
import com.sun.jna.Platform;
import com.sun.jna.platform.win32.Kernel32;
import com.sun.jna.platform.win32.Kernel32Util;
import com.sun.jna.platform.win32.WinNT;
import com.sun.jna.ptr.IntByReference;
class Scratch {
public static void main(final String[] args) {
System.out.println("Is 64-bit OS? " + is64BitOS());
@steinybot
steinybot / README.md
Created July 15, 2019 07:13
How to Create a macOS Catalina Beta ISO

How to Create a macOS Catalina Beta ISO

Prerequisits

  1. Sign up for the Beta Program https://beta.apple.com/sp/betaprogram.
  2. Create a Time Machine Backup (just in case).

Download the Beta

  1. Cmd + Space -> Software Update.
@steinybot
steinybot / analyse-branch-tags.sh
Last active July 22, 2019 00:26
Script to determine if the head of each branch has a tag
#!/usr/bin/env bash
readonly REMOTE="${1:-origin}"
tagged=()
tagged_local=()
untagged=()
while read line; do
IFS=$'\t ' read -r -a parts <<< "${line}"
@steinybot
steinybot / CharacterGen.java
Last active August 6, 2019 03:53
junit-quickcheck generator which can generate an efficient generator for arbitrary character classes
package com.example.generator;
import com.pholser.junit.quickcheck.Pair;
import com.pholser.junit.quickcheck.generator.Gen;
import com.pholser.junit.quickcheck.generator.GenerationStatus;
import com.pholser.junit.quickcheck.generator.Generator;
import com.pholser.junit.quickcheck.generator.InRange;
import com.pholser.junit.quickcheck.generator.java.lang.IntegerGenerator;
import com.pholser.junit.quickcheck.random.SourceOfRandomness;
import com.squareup.javapoet.*;

Keybase proof

I hereby claim:

  • I am steinybot on github.
  • I am steinybot (https://keybase.io/steinybot) on keybase.
  • I have a public key ASAF_nkW-0m13F3vFwdFpb9a63hsGAj3nMOoIixpEL_hUAo

To claim this, I am signing this object:

@steinybot
steinybot / .bashrc
Last active October 14, 2019 01:05
Setup Lightbend Console local
function podsready {
kubectl --request-timeout=1s get --all-namespaces pod -o json | jq '.items[].status.containerStatuses[0].ready'
}
function wait_for_pods {
echo -n "waiting for pods to start"
sleep 1
until
podsready | grep -q true
do
@steinybot
steinybot / README.md
Last active November 8, 2019 03:43
Go Module confusion

I have a couple of cmd apps with some imports:

cmd/monitorrules/main.go:

package main

import (
	"bufio"
	"fmt"
	"io/ioutil"
@steinybot
steinybot / SbtUpdatesOnLoadPlugin.scala
Last active February 23, 2021 12:26
Run sbt-updates onLoad
import sbt._
import Keys._
import sbt.internal.BuildStructure
object SbtUpdatesOnLoadPlugin extends AutoPlugin {
override def trigger = allRequirements
override def globalSettings: Seq[Setting[_]] = Seq(
onLoad := {
@steinybot
steinybot / terraform-trace.log
Created March 17, 2020 05:36
Terraform tace log
❯ TF_LOG=trace terraform plan
2020/03/17 18:35:06 [INFO] Terraform version: 0.12.23
2020/03/17 18:35:06 [INFO] Go runtime version: go1.12.13
2020/03/17 18:35:06 [INFO] CLI args: []string{"/usr/local/Cellar/tfenv/1.0.2/versions/0.12.23/terraform", "plan"}
2020/03/17 18:35:06 [DEBUG] Attempting to open CLI config file: /Users/jason/.terraformrc
2020/03/17 18:35:06 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2020/03/17 18:35:06 [INFO] CLI command args: []string{"plan"}
2020/03/17 18:35:06 [TRACE] Meta.Backend: no config given or present on disk, so returning nil config
2020/03/17 18:35:06 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2020/03/17 18:35:06 [DEBUG] New state was assigned lineage "b7d7f93e-5dfa-a01a-61c0-8afc255a5b65"