Skip to content

Instantly share code, notes, and snippets.

View ethanmdavidson's full-sized avatar
🛠️
Glorified Plumber

Ethan Davidson ethanmdavidson

🛠️
Glorified Plumber
View GitHub Profile
@ethanmdavidson
ethanmdavidson / BoxStarter Dev Setup
Last active August 29, 2015 14:24
basic dev setup with boxstarter
#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
$Boxstarter.RebootOk=$true
$Boxstarter.NoPassword=$false
$Boxstarter.AutoLogin=$true
#windows options
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions
#install programs
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: 2.6.14.4
@ethanmdavidson
ethanmdavidson / gradle_tests_report.gradle.kts
Created February 9, 2021 15:18
Fancy gradle test result logging, in kotlin
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:
* https://gist.github.com/lwasyl/f5b2b4ebe9e348ebbd8ee4cb995f8362
*/
var testResults by extra(mutableListOf<TestOutcome>()) // Container for tests summaries
@ethanmdavidson
ethanmdavidson / preemptible-builder.pkr.hcl
Last active March 14, 2023 21:10
Packer Configuration for GCP spot/preemptible instances
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)