Skip to content

Instantly share code, notes, and snippets.

Verifying that +rk is my openname (Bitcoin username). https://onename.io/rk
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"
}
### 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:
$ 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
~/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
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
select(0x0, 0x0, 0x0, 0x0, 0x208C55F38) = 0 0
[ryan@MBP Desktop]$ git clone git://github.com/nex3/haml.git
Initialized empty Git repository in /Users/ryan/Desktop/haml/.git/
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates.
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates.
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates.
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates.
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates.
remote: error: object directory /data/git/repositories/2/26/64/f0/danbarry/haml.git/objects does not exist; check .git/objects/info/alternates.
remote: error: object di
# put this in .irbrc and you can open the files that define constants
def mate mod
file = ActiveSupport::Dependencies.search_for_file(ActiveSupport::Dependencies.qualified_name_for(Kernel, mod).underscore)
`mate #{file}`
nil
end
@ryanking
ryanking / find id fields without indexes
Created February 22, 2009 20:56
These fields almost always need an index in rails.
select table_name, column_name, column_key from columns where table_schema='YOURDB' and column_name like '%id' and column_key='';