Skip to content

Instantly share code, notes, and snippets.


Vincent Roy vroy

View GitHub Profile
vroy / example with retries
Created Mar 20, 2019
Eventual consistency issues in aws_instance
View example with retries
2019-03-20T18:57:29.380Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: Action=RunInstances&...
2019-03-20T18:57:30.434Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: 2019/03/20 18:57:30 [INFO] Instance ID: i-00afe6a31ade489c6
2019-03-20T18:57:30.434Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: 2019/03/20 18:57:30 [DEBUG] Waiting for instance (i-00afe6a31ade489c6) to become running
2019-03-20T18:57:40.434Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: Action=DescribeInstances&InstanceId.1=i-00afe6a31ade489c6&Version=2016-11-15
2019-03-20T18:57:40.607Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: HTTP/1.1 200 OK
2019-03-20T18:57:40.607Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: 2019/03/20 18:57:40 [INFO] Modifying `source_dest_check` on Instance i-00afe6a31ade489c6
vroy / example: error on DescribeInstanceCreditSpecifications
Last active Mar 20, 2019
Logs: Eventual consistency issues in aws_instance
View example: error on DescribeInstanceCreditSpecifications
2019-03-19T14:16:31.863Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: Action=RunInstances&...
2019-03-19T14:16:32.998Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: HTTP/1.1 200 OK
2019-03-19T14:16:32.998Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: 2019/03/19 14:16:32 [INFO] Instance ID: i-0d77afea64d009a21
2019-03-19T14:16:32.998Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: 2019/03/19 14:16:32 [DEBUG] Waiting for instance (i-0d77afea64d009a21) to become running
2019-03-19T14:16:42.998Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: Action=DescribeInstances&InstanceId.1=i-0d77afea64d009a21&Version=2016-11-15
2019-03-19T14:16:43.140Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: HTTP/1.1 200 OK
2019-03-19T14:16:43.141Z [DEBUG] plugin.terraform-provider-aws_v1.49.0_x4: 2019/03/19 14:16:43 [INFO] Modifying `source_dest_check` on Instance i-0d77afea64d009a21
vroy / extract.rb
Last active Aug 29, 2015
A simple utility to extract patterns out of input streams
View extract.rb
#!/usr/bin/env ruby
# A simple utility to extract patterns out of input streams
# Heavily inspired by:
# Examples:

Keybase proof

I hereby claim:

  • I am vroy on github.
  • I am vroy ( on keybase.
  • I have a public key whose fingerprint is 7D82 60F2 2D92 C5F7 84DA D429 D86C 8DBD 307A FE90

To claim this, I am signing this object:

View public_draft_helpers.rb
module PublicDraftHelpers
def published(articles)
if development?
articles.reject{|a| }
vroy / output
Created Oct 27, 2013
Feedback for (after a recent update to mavericks)
View output
$ clang --version; sudo softwareupdate -l
Apple LLVM version 5.0 (clang-500.2.76) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
Software Update Tool
Copyright 2002-2012 Apple Inc.
Finding available software
No new software available.
vroy / stringify-wat.js
Created May 3, 2013
Keys with an undefined value are not included in JSON.stringify? I know that undefined is not the same as null, but I find it odd nonetheless.
View stringify-wat.js
> var x = { foo: undefined }
> x
Object {foo: undefined}
> JSON.stringify(x)
vroy / index.html
Created Aug 21, 2012
Why is the text-decoration rule of p:after ignored?
View index.html
<!DOCTYPE html>
<style type="text/css">
p {
color: blue;
text-decoration: line-through;
p:after {
content:"- Remember this";
vroy / Question
Created Sep 1, 2011
Jetpack - Change window location from content script.
View Question
Using the addon-sdk from with this patch applied:
As you can see in the output, the location does seem to change but when I hit and the output shows that I should be on, I still see Is it possible to change the location of a page from within the page-mod's content script?
I would also like to point out that returns undefined. I thought it would make sense that window.location in the context of a content script should return a standard Location object as described by the MDN docs:
I'm guessing the workaround is to send messages to the add-on code and use the tabs API but I would rather avoid that to keep my extension code as much similar to other browser extensions as possible.
vroy / Explanation
Created Aug 25, 2011
Jetpack - How to stop a contentscript setInterval?
View Explanation
It seems that the content script of a page-mod continues to execute even when a tab is closed/detached.
As you can see in this example output, I opened two tabs. Every second the content script outputs the tab_id received and the current time. I only closed the second tab. I have two problems:
1 - I don't understand why the "Detached a tab" message appeared twice while only one tab was closed. Anybody can explain this behavior or confirm that it's a bug?
2 - The two intervals that were started in the content script continued to run. I expected that the content script would stop executing completely when a tab was closed/detached. How do I make sure that the content script stops executing completely when a tab is closed/detached?
You can’t perform that action at this time.