Keybase proof
I hereby claim:
- I am brikis98 on github.
- I am brikis98 (https://keybase.io/brikis98) on keybase.
- I have a public key whose fingerprint is 244F 9804 C5B4 EBB7 BBC6 CFD8 EFA1 0183 0BB0 B4DE
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# The goal: create a list of maps of subnet mappings so we don't have to statically hard-code them in aws_lb | |
# https://www.terraform.io/docs/providers/aws/r/lb.html#subnet_mapping | |
locals { | |
# These represent dynamic data we fetch from somewhere, such as subnet IDs and EIPs from a VPC module | |
subnet_ids = ["subnet-1", "subnet-2", "subnet-3"] | |
eips = ["eip-1", "eip-2", "eip-3"] | |
} | |
# Here's the hack! The null_resource has a map called triggers that we can set to arbitrary values. | |
# We can also use count to create a list of null_resources. By accessing the triggers map inside of |
var result = $('.section-item .item').get().reduce(function(total, item) { | |
var text = $(item).text().split("\n").join(" "); | |
var matches = /.+\((\d):(\d\d)\)/g.exec(text); | |
var minutes = parseInt(matches[1]); | |
var seconds = parseInt(matches[2]); | |
var totalMin = total[0] + minutes; | |
var totalSec = total[1] + seconds; | |
resource "aws_dynamodb_table" "one_attribute" { | |
count = "${replace(replace(var.num_attributes, "1", "1"), "/^[^1]$/", 0)}" | |
name = "${var.name}" | |
attribute { | |
name = "${var.first_attribute_name}" | |
type = "${var.first_attribute_type}" | |
} | |
} |
I hereby claim:
To claim this, I am signing this object:
class MyEnvironment extends Environment[MyUser, CookieAuthenticator] { | |
override val identityService: IdentityService[MyUser] = new MyIdentityService() | |
override val authenticatorService: AuthenticatorService[CookieAuthenticator] = new CookieAuthenticatorService( | |
settings = CookieAuthenticatorSettings(), | |
dao = None, | |
fingerprintGenerator = new DefaultFingerprintGenerator(), | |
idGenerator = new SecureRandomIDGenerator(), | |
clock = Clock() | |
) |
brikis98-pro:docker-osx-dev brikis98$ ../bashprof/bin/bashprof bats test/docker-osx-dev.bats | |
✓ configure_paths_to_sync with non-existent docker-compose file results in syncing the current directory | |
1 test, 0 failures | |
Statement breakdown | |
=================== | |
Total µs Total % Count Statement | |
123368 15.4% 306 [[ "$line" =~ $pattern ]] |
brikis98-pro:docker-osx-dev brikis98$ ../bashprof/bin/bashprof bats test/docker-osx-dev.bats | |
✓ configure_paths_to_sync with non-existent docker-compose file results in syncing the current directory | |
1 test, 0 failures | |
Statement breakdown | |
=================== | |
Total µs Total % Count Statement | |
814081 51.5% 3 IFS= read -r line |
{% capture tags %}{% for tag in site.tags %}{{ tag[0] }}|{% endfor %}{% endcapture %} | |
{% assign sortedtags = tags | split:'|' | sort %} | |
{% for tag in sortedtags %} | |
<a name="{{ tag }}"></a> | |
<h2>{{ tag }}</h2> | |
<ul> | |
{% for post in site.tags[tag] %} | |
<li><a href="{{ post.url }}">{{ post.title }}</a></li> | |
{% endfor %} |
// Put this filter early in your filter chain so it can initialize and clean up | |
// the cache | |
object CacheFilter extends Filter { | |
def apply(next: RequestHeader => Future[Result])(request: RequestHeader): Future[Result] = { | |
def init = RestClient.initCacheForRequest(request) | |
def cleanup = RestClient.cleanupCacheForRequest(request) | |
// You have to be very careful with error handling to garauntee the cache gets cleaned | |
// up, or you'll have a memory leak. |