Skip to content

Instantly share code, notes, and snippets.

View 1_Simple-example.ts
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const bucket = new aws.s3.Bucket("my-bucket");
export const bucketArn = bucket.arn;
// Here it is important to point out that we autoname!!
// We can override that using the `bucket` property
import * as pulumi from "@pulumi/pulumi";
import * as random from "@pulumi/random";
const username = new random.RandomString("my-string", {
length: 16,
special: true,
}, {
// RandomString has an output of 'result' where the string actually is stored
additionalSecretOutputs: ["result"]
View after.go
siteBucket, err := s3.NewBucket(ctx, "s3-website-bucket", &s3.BucketArgs{
Website: s3.BucketWebsiteArgs{
IndexDocument: pulumi.String("index.html"),
if err != nil {
return err
View gist:39d77ee476ca7ef329a8feeb3cea9780
object Project : Project({
name = "Region: SJC1 DC1"
description = "SJC1 DC1"
val vmCanary = Canary(
id = "PlatformApps_SJC1_DC1_Canary_VM_Deploy",
name = "Deploy Canary VM",
templateName = "plat-canary-vm",
View test.go
func (f *Future) WaitForCompletionRef(ctx context.Context, client autorest.Client) error {
ctx, cancel := context.WithTimeout(ctx, client.PollingDuration)
defer cancel()
done, err := f.Done(client)
for attempts := 0; !done; done, err = f.Done(client) {
if attempts >= client.RetryAttempts {
return autorest.NewErrorWithError(err, "Future", "WaitForCompletion",, "the number of retries has been exceeded")
// we want delayAttempt to be zero in the non-error case so
// that DelayForBackoff doesn't perform exponential back-off
View gist:15a03b45a8e53546b80aee3ab5662e86
Cobra: &cobra.Command{
Use: "create",
Short: "create a triton instance",
SilenceUsage: true,
Args: cobra.NoArgs,
PreRunE: func(cmd *cobra.Command, args []string) error {
if cfg.GetMachineName() == "" {
return errors.New("Name must be specified for Create Instance")
View gist:7edb28d4519f55e58eef4b702e8f5604
#!/usr/bin/env bash
echo "##teamcity[buildNumber '']"
cd /mnt/goroots
tar xzf go%BUILDVERSION%.linux-amd64.tar.gz
rm go%BUILDVERSION%.linux-amd64.tar.gz
git clone /mnt/goroots/go%VERSION%
View New Packer Deps
packer-testing % make old-image
packer build \
-var "triton_account=stack72_joyent" \
-var "triton_key_id=40:9d:d3:f9:0b:86:62:48:f4:2e:a5:8e:43:00:2a:9b" \
-var "triton_key_material=""" \
-var "image_version=1.0.0" \
-var "source_image="7b5981c4-1889-11e7-b4c5-3f3bdfc9b88b"" \
triton output will be in this color.
View elasticsearch
# Run Elasticsearch as this user ID and group ID
{% if es_default_es_user is defined %}ES_USER={{ es_default_es_user }}{% endif %}
{% if es_default_es_group is defined %}ES_GROUP={{ es_default_es_group }}{% endif %}
# Heap Size (defaults to 256m min, 1g max)
{% if es_default_es_heap_size is defined %}ES_HEAP_SIZE={{ es_default_es_heap_size }}{% endif %}
View gist:ee72b8671c57e4ac5a964c39bd749247
<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="3.2" jmeter="3.2 r1790748">
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
You can’t perform that action at this time.