Skip to content

Instantly share code, notes, and snippets.

Gangstead's 6-Step Plan to Terraform Happiness

  1. Use Terragrunt
    • If you hit a rough edge with Terraform it's probably addressed by Terragrunt
  2. Look at plan before proceeding with apply
  3. Thou shalt not use someone else's module
    • Look at the module's source and copy/paste the terraform therein
  • You can make your TF simpler and you won't have to keep up with the multiple updates per month, with breaking changes, that the module makes.
@gangstead
gangstead / forscan_wine.md
Last active September 30, 2024 20:11
Forscan on MacOS Montery with wine/wineskin

FORscan is windows only software. You want to run on a Mac. You can download a big windows VirtualBox image (20 GB), run Boot camp, or pay for something like Parallels ($80) or CrossOver ($60, built on Wine).

Instead you can pay with your time and try to get wine running. Problem: wine development for MacOS seems to have died with Catalina (10.15) dropped any support for 32 bit applications. Also every wine setup tutorial you find for a Mac is tightly coupled to the exact version of Mac/Wine/direction of the wind/ shoe size of the author on the day the tutorial was made and will not work for you. With that said here's what it took for me:

Wineskin

https://github.com/Gcenx/WineskinServer Follow the official instructions which use homebrew

brew install --no-quarantine gcenx/wine/unofficial-wineskin
@gangstead
gangstead / bash.sh
Created November 16, 2021 22:43
So you've committed to main, but your main is behind origin main and the push gets rejected...
➜ git commit -am "my commit to main"
[main 10bc4d8] my commit to main
1 file changed, 11 deletions(-)
➜ git push
To github.com:myorg/myrepo.git
! [rejected] main -> main (non-fast-forward)
error: failed to push some refs to 'github.com:myorg/myrepo.git'
hint: Updates were rejected because the tip of your current branch is behind
hint: its remote counterpart. Integrate the remote changes (e.g.
hint: 'git pull ...') before pushing again.
@gangstead
gangstead / git_crashcourse.sh
Last active February 25, 2021 16:33
Minimal git commands
## Happy path
# Create a new branch to put your code on
git checkout -b my-new-branch
# Add all your changed files to a commit (will not start tracking new files)
git commit -am "description of my new changes"
# Push your new branch to github. Then go to github to make a PR
git push -u origin my-new-branch
@gangstead
gangstead / list-users.js
Created January 12, 2021 22:57
Node.js script to make report very similar to iam users home https://console.aws.amazon.com/iam/home
// Print report very similar to iam users home https://console.aws.amazon.com/iam/home
// But output is in a more easily digestable format (hint: it goes in a spreadsheet)
// 0a. Make sure you have aws cli 2.0 installed and configured
// 0b. `npm install` there should be a package.json with this, but you need lodash, moment, bluebird
// 1. Usage: `node list-users.js`
const exec = require("child_process").exec;
const _ = require("lodash");
const B = require("bluebird");
const moment = require("moment");
@gangstead
gangstead / ScalaDays.md
Last active August 29, 2015 14:17
Scala Days Notes

Scala Days 2015

notes by Steven Gangstead

Monday March 16th

Key Note: Scala - where it came from, where it's going

Martin Odersky @odersky

  • Doesn't feel like talking about the announced topic
{
init: function(elevators, floors) {
console.log('elev:' + elevators.length + ' flrs:'+floors.length);
elevators.forEach(function(elevator,index){
elevator.on("idle", function() {
console.log(index + " the devil's plaything");
var idleFloor = [0,0,0,0,0,7,0,0,0,0];
goToFloorSafe(elevator,idleFloor[index]);
elevator.goingUpIndicator(true);
elevator.goingDownIndicator(true);
@gangstead
gangstead / notes.md
Last active June 6, 2023 03:36
Typesafe webinar notes: Spray & Akka HTTP - Mathias Doenitz

Typesafe webinar notes: Spray & Akka HTTP

Presenter - Mathias Doenitz

Spary.io

  • embeddable http stack built on Akka actors
  • Just an HTTP integration layer, not for building full web apps
  • Server & client side
@gangstead
gangstead / README.md
Last active August 29, 2015 14:11
RankTank API

ranktank

The back end of Rank Tank

Building

> npm install
@gangstead
gangstead / Day 1.md
Last active December 20, 2015 15:21
PNW Scala Nodes

Friday 11/14/14

notes by Steven Gangstead

Rapture Art of One-liner - Jon Pretty @propensive

rapture.io -collection of libraries for scala

jawn json parser. Quicker than Jackson, and I guess Jackson must normally be considered the quickest.

My thoughts: Awesome talk. Look into rapture, looks useful. Jon is smart.