It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.
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
// Possible since https://github.com/aws/aws-cdk/pull/17144 | |
class VpcProduct extends servicecatalog.ProductStack { | |
vpc: aws_ec2.Vpc; | |
constructor(scope: Construct, id: string) { | |
super(scope, id); | |
this.vpc = new aws_ec2.Vpc(this, 'Vpc', { |
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
cfg, err := external.LoadDefaultAWSConfig() | |
if err != nil { | |
panic(err) | |
} | |
esCfg := elasticsearch.Config{ | |
Transport: &awssigner.V4Signer{ | |
RoundTripper: http.DefaultTransport, | |
Credentials: cfg.Credentials, | |
Region: cfg.Region, | |
}, |
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
package main | |
import ( | |
"errors" | |
"log" | |
) | |
// rollback function | |
func rollback(rollbackCtrl *bool, rollbackFunc func()) { | |
if *rollbackCtrl { |
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
set -o pipefail | |
_exit_error() { | |
message=$1 | |
code=$2 | |
echo "$message" >&2 | |
exit $code | |
} | |
_exit_ok() { |
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
Result: 1 | |
Items { | |
TemplateId: "BADGE_BATTLE_ATTACK_WON" | |
Badge { | |
BadgeType: BADGE_BATTLE_ATTACK_WON | |
BadgeRanks: 4 | |
Targets: "\nd\350\007" | |
} | |
} | |
Items { |
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
My name is {{.Name}} and I'm {{.Age}} years old!! |
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:
- It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
- It is free, with no quotas.
- Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
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
{ | |
"Statement": [ | |
{ | |
"Sid": "PackerSecurityGroupAccess", | |
"Action": [ | |
"ec2:CreateSecurityGroup", | |
"ec2:DeleteSecurityGroup", | |
"ec2:DescribeSecurityGroups", | |
"ec2:AuthorizeSecurityGroupIngress", | |
"ec2:RevokeSecurityGroupIngress" |
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
building openstack lab: | |
There are a few dependencies: | |
- ruby, virtualbox, ubuntu precise base box, vagrant, puppet modules, librarian-puppet | |
find the module on stackforge: | |
> git clone https://github.com/stackforge/puppet-openstack_dev_env |
NewerOlder