Skip to content

Instantly share code, notes, and snippets.

Glorified Plumber

Ethan Davidson ethanmdavidson

Glorified Plumber
View GitHub Profile
ethanmdavidson / preemptible-builder.pkr.hcl
Last active March 14, 2023 21:10
Packer Configuration for GCP spot/preemptible instances
View preemptible-builder.pkr.hcl
source googlecompute preemptible-builder {
project_id = "<PROJECT_ID>"
zone = "us-west4-b" # using us-west4 because they have much cheaper spot prices right now.
ssh_username = "packer"
source_image = "debian-11-bullseye-v20230306"
wrap_startup_script = false
disk_size = 10
preemptible = true
metadata = {
#if instance gets preempted, send SIGINT to packer (prevents packer from hanging for 20m trying to reconnect)
ethanmdavidson / gradle_tests_report.gradle.kts
Created February 9, 2021 15:18
Fancy gradle test result logging, in kotlin
View gradle_tests_report.gradle.kts
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.gradle.api.tasks.testing.logging.TestLogEvent
import groovy.time.TimeCategory
import java.util.Date
* based on the groovy code by lwasyl:
var testResults by extra(mutableListOf<TestOutcome>()) // Container for tests summaries
View vagrant.log
vagrant : INFO global: Vagrant version: 2.2.7
At line:1 char:1
+ vagrant up --debug 2>&1 | Tee-Object -FilePath ".\vagrant.log"
+ ~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( INFO global: Vagrant version: 2.2.7:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
INFO global: Ruby version: 2.4.9
INFO global: RubyGems version:
ethanmdavidson / BoxStarter Dev Setup
Last active August 29, 2015 14:24
basic dev setup with boxstarter
View BoxStarter Dev Setup
#boxstarter options
#with this setup, boxstarter will ask you for your password when this script is run, and use it to login after each restart
#windows options
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
#install programs