Skip to content

Instantly share code, notes, and snippets.

@ryanking
ryanking / __init__.py
Created September 29, 2021 16:08
pytest honeycomb tracing
import os
import libhoney
# If buildevents is configured, set up a libhoney client to send spans for each test
writekey = os.environ.get('BUILDEVENT_APIKEY')
if writekey:
libhoney.init(writekey=writekey, dataset="buildevents", debug=True)

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@ryanking
ryanking / powerball.rb
Last active January 11, 2016 02:31
powerball number generator
#!/usr/bin/env ruby
require 'colorize'
white_ball_drum = (1..69).to_a
red_ball_drum = (1..26).to_a
white_balls = []
red_ball = nil
select(0x0, 0x0, 0x0, 0x0, 0x208C55F38) = 0 0
This file has been truncated, but you can view the full file.
^C~/code/bolt/infrastructure/terraform2 (master)*TF_LOG=1 terraform plan
2015/07/29 10:29:31 [INFO] Terraform version: 0.6.0 e40127fda6766dbea2749c17ba61f97b78c6c468
2015/07/29 10:29:31 Detected home directory from env var: /Users/ryanking
2015/07/29 10:29:31 [DEBUG] Discovered plugin: atlas = /Users/ryanking/bin/terraform-provider-atlas
2015/07/29 10:29:31 [DEBUG] Discovered plugin: aws = /Users/ryanking/bin/terraform-provider-aws
2015/07/29 10:29:31 [DEBUG] Discovered plugin: azure = /Users/ryanking/bin/terraform-provider-azure
2015/07/29 10:29:31 [DEBUG] Discovered plugin: cloudflare = /Users/ryanking/bin/terraform-provider-cloudflare
2015/07/29 10:29:31 [DEBUG] Discovered plugin: cloudstack = /Users/ryanking/bin/terraform-provider-cloudstack
2015/07/29 10:29:31 [DEBUG] Discovered plugin: consul = /Users/ryanking/bin/terraform-provider-consul
2015/07/29 10:29:31 [DEBUG] Discovered plugin: digitalocean = /Users/ryanking/bin/terraform-provider-digitalocean
~/code/bolt/infrastructure/terraform2 (master)*$ TF_LOG=1 tf plan
2015/07/16 16:02:49 [INFO] Terraform version: 0.6.0 e40127fda6766dbea2749c17ba61f97b78c6c468
2015/07/16 16:02:49 Detected home directory from env var: /Users/ryanking
2015/07/16 16:02:49 [DEBUG] Discovered plugin: atlas = /Users/ryanking/bin/terraform-provider-atlas
2015/07/16 16:02:49 [DEBUG] Discovered plugin: aws = /Users/ryanking/bin/terraform-provider-aws
2015/07/16 16:02:49 [DEBUG] Discovered plugin: azure = /Users/ryanking/bin/terraform-provider-azure
2015/07/16 16:02:49 [DEBUG] Discovered plugin: cloudflare = /Users/ryanking/bin/terraform-provider-cloudflare
2015/07/16 16:02:49 [DEBUG] Discovered plugin: cloudstack = /Users/ryanking/bin/terraform-provider-cloudstack
2015/07/16 16:02:49 [DEBUG] Discovered plugin: consul = /Users/ryanking/bin/terraform-provider-consul
2015/07/16 16:02:49 [DEBUG] Discovered plugin: digitalocean = /Users/ryanking/bin/terraform-provider-digitalocean
$ terraform remote config -state=state/state.tfstate -backend=S3 -backend-config="bucket=boltops" -backend-config="key=terraform-state" -backend-config="region=us-west-1"
Remote state management enabled
Error while performing the initial pull. The error message is shown
below. Note that remote state was properly configured, so you don't
need to reconfigure. You can now use `push` and `pull` directly.
Error reloading remote state: RequestError: send request failed
caused by: Get : 301 response missing Location header
### Keybase proof
I hereby claim:
* I am ryanking on github.
* I am ryanking (https://keybase.io/ryanking) on keybase.
* I have a public key whose fingerprint is 8376 0403 7FD2 E5AA 9DB4 6D1C EA44 1C28 C205 A9F6
To claim this, I am signing this object:
provisioner "local-exec" {
command = "aws elb create-load-balancer-policy --load-balancer-name ${var.deploy_environment}-storm-elb --policy-name EnableProxyProtocol --policy-type-name ProxyProtocolPolicyType --policy-attributes AttributeName=ProxyProtocol,AttributeValue=True"
}
provisioner "local-exec" {
command = "aws elb set-load-balancer-policies-for-backend-server --load-balancer-name ${var.deploy_environment}-storm-elb --instance-port 8000 --policy-names EnableProxyProtocol"
}