Skip to content

Instantly share code, notes, and snippets.

View gulducat's full-sized avatar

Daniel Bennett gulducat

View GitHub Profile
@gulducat
gulducat / cli-prompt.go
Created March 29, 2023 19:14
mitchellh/cli with a little UI prompt
package main
import (
"log"
"os"
"github.com/mitchellh/cli"
)
func main() {
@gulducat
gulducat / csvdecode.tf
Created June 3, 2020 14:53
example usage of Terraform csvdecode()
# very slightly altered from
# https://www.terraform.io/docs/configuration/functions/csvdecode.html#use-with-the-for_each-meta-argument
locals {
csv_data = <<-CSV
local_id,instance_type,ami
foo1,t2.micro,ami-54d2a63b
foo2,t2.micro,ami-54d2a63b
CSV

Keybase proof

I hereby claim:

  • I am gulducat on github.
  • I am koalia (https://keybase.io/koalia) on keybase.
  • I have a public key whose fingerprint is D863 86D7 7A82 5480 F8CD 1545 1131 7FAC 41CE 2AFE

To claim this, I am signing this object:

@gulducat
gulducat / blaher.py
Last active January 18, 2018 15:01
You know how most classes do helpful things? This is the opposite of that.
#!/usr/bin/env python
# vim: ts=8 et sw=4 sts=4
from __future__ import print_function
import random, time # pep8? blah.
def pause_for_dramatic_effect(*a):
time.sleep(random.choice(list(range(3,5))))
class Blaher: # one who actively does not give a fuck.
@classmethod # classy tho.
def summon(cls): # if anyone should dare..
pause_for_dramatic_effect() # make em wait.
@gulducat
gulducat / badfs.php
Last active December 16, 2017 22:10
terrible wordpress plugin that is super mean to the filesystem on purpose
<?php
/*
Plugin Name: BadFS
Plugin URI: http://wpengine.com/
Description: Be intentionally terrible to the filesystem to test storage performance.
Version: 1.0.0
Author: Daniel Bennett
Author URI: http://wpengine.com/
*/