Skip to content

Instantly share code, notes, and snippets.

View ctrombley's full-sized avatar

Chris Trombley ctrombley

View GitHub Profile
@ctrombley
ctrombley / big-org.tf
Created February 26, 2024 23:42
Provision a large TFE org with Terraform
terraform {
cloud {
organization = "<YOUR_ORG>"
hostname = "<YOUR_HOST>"
workspaces {
tags = ["big-org-config"]
}
}
}
@ctrombley
ctrombley / environment_info.sh
Last active May 10, 2022 19:45
Dump environment info
echo "\n======\nOS\n======\n"
echo "MacOS Version:"
echo "$(sw_vers | sed 's/^/ /')"
echo "XCode Command Line Tools Version: $(pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version)"
echo "Homebrew Version:"
echo "$(brew --version | sed 's/^/ /')"
echo "\n======\nPYTHON\n======\n"
echo "pyenv version: $(pyenv --version)"
echo "pyenv location: $(pyenv --version)"
echo "Current VIRTUAL_ENV value: $VIRTUAL_ENV"
panic: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 64 [running]:
github.com/grafana/terraform-provider-grafana/grafana.ReadAlertNotification(0xeaee08, 0xc0004e2b40, 0xc00032f200, 0xc4b7c0, 0xc0002404b0, 0xc0004eab70, 0xc0004dd908, 0x40e0f8)
github.com/grafana/terraform-provider-grafana/grafana/resource_alert_notification.go:163 +0xc85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0002b6000, 0xeaed98, 0xc000485b40, 0xc00032f200, 0xc4b7c0, 0xc0002404b0, 0x0, 0x0, 0x0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/helper/schema/resource.go:347 +0x17f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0002b6000, 0xeaed98, 0xc000485b40, 0xc0004a7490, 0xc4b7c0, 0xc0002404b0, 0xc0004b6848, 0x0, 0x0, 0x0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.7.0/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc0000b0

Keybase proof

I hereby claim:

  • I am ctrombley on github.
  • I am ctrombley (https://keybase.io/ctrombley) on keybase.
  • I have a public key ASAPCSK2UtjKo9f5yS57f10qixDQ5pAY7e_NYxeHZ9nZvQo

To claim this, I am signing this object:

@ctrombley
ctrombley / LSI.yaml
Last active February 4, 2021 22:20
Recipe definition with recommendationPreReq section
name: language-agent
displayName: Some languaage agent
description: New Relic install recipe for some laanguage agent
repository: https://github.com/newrelic/whatever
installTargets:
- type: ...
os: ...
platform: ...
@ctrombley
ctrombley / httr_yahoo_oauth2_oob.R
Last active November 8, 2018 05:56
Working Yahoo OAuth2.0 OOB flow
# Requires httr fork available here:
# https://github.com/ctrombley/httr
library(httr)
library(httpuv)
endpoint <- oauth_endpoint("get_request_token", "request_auth", "get_token",
base_url = "https://api.login.yahoo.com/oauth2")
app <- oauth_app("yahoo",
{
renderedDate: '11/11/2016',
user: {
// guid: userid, // for posting data to backend
firstname: '',
lastname: ''
},
// toast: {category: 'fluff'},
status: 'green',
progress: 50,
@ctrombley
ctrombley / justify.rb
Created June 20, 2016 19:06
justify.rb
require 'minitest/autorun'
describe "JustifySolver" do
let (:solver) { JustifySolver.new }
it "should justify a sentence" do
solver.solve("The quick brown fox jumps over the lazy dog.", 5)
.must_equal("The \n" \
"quick\n" \
"brown\n" \
"fox \n" \
@ctrombley
ctrombley / languages.rb
Created June 20, 2016 18:16
languages.rb
require 'minitest/autorun'
describe "LanguageSolver" do
let (:solver) { LanguageSolver.new }
it "should generate pairs for comparison" do
solver.pairs(['ccda','ccbk', 'cd', 'a', 'ab', 'abd', 'aba'])
.must_equal([['d','b'],['c','d'],['c','a'],['d','a']])
end
end
require 'minitest/autorun'
describe "LanguageSolver" do
let (:solver) { LanguageSolver.new }
it "should generate pairs for comparison" do
solver.pairs(['ccda','ccbk', 'cd', 'a', 'ab', 'abd', 'aba'])
.must_equal([['d','b'],['c','d'],['c','a'],['d','a']])
end
end