Skip to content

Instantly share code, notes, and snippets.

provider.aws.region
The region where AWS operations will take place. Examples
are us-east-1, us-west-2, etc.
Default: us-east-1
Enter a value: eu-west-1
aws_cognito_user_pool.pool: Refreshing state... (ID: eu-west-1_zP8yjvQZb)
An execution plan has been generated and is shown below.
@jyrkiput
jyrkiput / gist:47873e5fba67641175fdd8cc87e6af92
Created April 17, 2018 04:20
Terraform Cognito User Pool bug
provider.aws.region
The region where AWS operations will take place. Examples
are us-east-1, us-west-2, etc.
Default: us-east-1
Enter a value: eu-west-1
aws_cognito_user_pool.pool: Refreshing state... (ID: eu-west-1_c3IYGYinu)
An execution plan has been generated and is shown below.
#!/bin/bash
set -o errexit
set -o nounset
STACK_NAME=$1
STACKJSON=$(aws cloudformation describe-stacks --stack-name $STACK_NAME)
PARAMS=$(echo $STACKJSON | jq '.Stacks[0].Parameters | del( .[].ParameterValue) | .[]["UsePreviousValue"] = true')
@jyrkiput
jyrkiput / gist:0c0c5a962001f2d74a2a
Created November 24, 2015 04:09
Linkedin share problem with ajax site
When sharing urls, the share dialog gets stuck. Below are few urls and what happened.
http://example.com/#!singlePublishedAnswer?id=7ee2e463-373c-dd12-0493-d38a7103c3bf does "?_escaped_fragment" call just right, but the share dialog gets stuck in loading animation
http://example.com/?_escaped_fragment_=singlePublishedAnswer%3Fid%3D7ee2e463-373c-dd12-0493-d38a7103c3bf executes http call, but gets the share dialog gets stuck in loading animation
http://example.com/service/share/linkedin/7ee2e463-373c-dd12-0493-d38a7103c3bf executes http call, but gets the share dialog gets stuck in loading animation
http://example.com/service/share/linkedin/2015-15 works great, executes call and displays proper texts.

Keybase proof

I hereby claim:

  • I am jyrkiput on github.
  • I am jyrki (https://keybase.io/jyrki) on keybase.
  • I have a public key whose fingerprint is C6A8 6E79 5839 5699 E666 64FC A452 732F 8CBA 42CA

To claim this, I am signing this object:

@jyrkiput
jyrkiput / gist:2330148
Created April 7, 2012 16:29
value vs. function
def foo(i: Int, value: Int) {
if(i > value)
println("was bigger")
else
println("was smaller")
}
def foo(cmp : Int => Boolean, value: Int) {
if(cmp(value))
println("was bigger")