This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mbp:~/tmp | |
$ find . | |
. | |
./root.tf | |
./.tool-versions | |
./internal | |
./internal/main.tf | |
mbp:~/tmp | |
$ terraform init | |
Initializing modules... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
job "microbot" { | |
region = "global" | |
datacenters = ["nomad-intro"] | |
# Rolling updates | |
update { | |
stagger = "10s" | |
max_parallel = 3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from time import time | |
import sys | |
import boto3 | |
client = boto3.client('cloudfront') | |
# Uncomment this to pass a URL to the script | |
#def get_id(url): | |
# print("get_id args: {0}".format(url)) | |
# # url: asdf.cloudfront.net | |
# # return: E2134123ASDF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mbp:~/sandbox/atlantis [master u= 1af6c77e] | |
$ docker run --rm -v $(pwd):/go/src/github.com/runatlantis/atlantis -w /go/src/github.com/runatlantis/atlantis runatlantis/testing-env make test | |
? github.com/runatlantis/atlantis [no test files] | |
ok github.com/runatlantis/atlantis/cmd 0.031s | |
# github.com/runatlantis/atlantis/server/events_test [github.com/runatlantis/atlantis/server/events.test] | |
server/events/markdown_renderer_test.go:57:18: too many arguments in call to r.Render | |
have (events.CommandResult, events.CommandName, string, bool, models.VCSHostType) | |
want (events.CommandResult, events.CommandName, string, bool) | |
server/events/markdown_renderer_test.go:97:18: too many arguments in call to r.Render | |
have (events.CommandResult, events.CommandName, string, bool, models.VCSHostType) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AWSTemplateFormatVersion: '2010-09-09' | |
Resources: | |
ExampleRole: | |
Type: AWS::IAM::Role | |
Properties: | |
Path: "/cfn/" | |
ManagedPolicyArns: | |
- arn:aws:iam::aws:policy/AmazonS3ReadOnlyAccess | |
Policies: | |
- PolicyName: DynamoDBGetter |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import webbrowser | |
service = sys.argv[1] | |
url = "https://docs.aws.amazon.com/IAM/latest/UserGuide/list_{}.html".format(service) | |
webbrowser.open(url, new=2) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE, STDOUT | |
import os | |
region = os.environ['region'] # Pass region in as a Lambda env variable | |
# Of course this assumes that your lambda has IAM permission to the KMS Key and DDB Table | |
def getSecret(key): | |
# unicreds is written in go, it is self-contained so, in your zip file include the package. One implementation of that is: | |
# curl -sL https://github.com/Versent/unicreds/releases/download/1.5.1/unicreds_1.5.1_linux_amd64.tar.gz | tar zx | |
cmd = "./unicreds -r {0} get -n {1}".format(region, key) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -o errexit | |
echo "Removing exited docker containers..." | |
docker ps -a -f status=exited -q | xargs -r docker rm -v | |
echo "Removing dangling images..." | |
docker images --no-trunc -q -f dangling=true | xargs -r docker rmi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Tested with ruby-2.0 | |
# 1) Download CSV file with workout data | |
# 2) run this script as './2015-lifting-totals.rb <path to csv file> | |
require 'csv' | |
# Ugly HACK! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git diff | |
diff --git a/3rdparty/libprocess/include/process/network.hpp b/3rdparty/libprocess/include/process/network.hpp | |
index 61bfa82..32c14e3 100644 | |
--- a/3rdparty/libprocess/include/process/network.hpp | |
+++ b/3rdparty/libprocess/include/process/network.hpp | |
@@ -44,6 +44,10 @@ inline Try<int> socket(int family, int type, int protocol) | |
return ErrnoError(); | |
} | |
#endif // __APPLE__ | |
+ const int enable = 1; |
NewerOlder