This file contains hidden or 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
| <div class="p-8 leading-relaxed bg-white flex items-start"> | |
| <div class="w-1/4"> | |
| <h1 class="text-xl text-gray-800 font-bold">Brand Base Colors</h1> | |
| <ul class="flex flex-col"> | |
| <li class="bg-blue-500 text-blue-100 shadow-md whitespace-pre text-xs leading-relaxed text-xs h-32 w-32 p-2 mr-4 my-2"></li> | |
| <li class="bg-orange-500 text-orange-100 shadow-md whitespace-pre text-xs leading-relaxed text-xs h-32 w-32 p-2 mr-4 my-2"></li> | |
| <li class="bg-green-500 text-green-100 shadow-md whitespace-pre text-xs leading-relaxed text-xs h-32 w-32 p-2 mr-4 my-2"></li> | |
| <li class="bg-purple-500 text-purple-100 shadow-md whitespace-pre text-xs leading-relaxed text-xs h-32 w-32 p-2 mr-4 my-2"></li> | |
| </ul> | |
| </div> |
This file contains hidden or 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
| gif() { | |
| if [ ! "$(ffmpeg -version)" ]; then | |
| echo "It looks like ffmpeg isn't installed. Try installing with Homebrew (e.g., brew install ffmpeg)." | |
| return $? | |
| fi | |
| if [ -z $1 ]; then | |
| echo "Usage: " | |
| echo " gif /path/to/source.mov [width in pixels (640 default)] [frames per second (12 default)]" | |
| return 0 |
This file contains hidden or 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
| var kids = ["Oliver", "Sam", "Rosemary"]; | |
| var rooms = ["Living room", "Dining room", "Library"]; | |
| rooms.sort(() => Math.random() > 0.5 ? 1 : -1).map((o, i) => ({ [kids[i]]: o })); |
This file contains hidden or 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
| import * as pulumi from "@pulumi/pulumi"; | |
| const mbxClient = require('@mapbox/mapbox-sdk'); | |
| const mbxStyles = require('@mapbox/mapbox-sdk/services/styles'); | |
| const mbxTilesets = require('@mapbox/mapbox-sdk/services/tilesets'); | |
| const config = new pulumi.Config(); | |
| let accessToken = config.requireSecret("access_token"); | |
| export interface MapboxStyleResourceInputs { |
This file contains hidden or 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
| const automation = require("@pulumi/pulumi/x/automation"); | |
| async function getStackOutputs(stackName, projectName) { | |
| const stack = await automation.LocalWorkspace.selectStack({ | |
| stackName, | |
| projectName, | |
| program: () => {}, | |
| }); | |
| return await stack.outputs(); | |
| } |
This file contains hidden or 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
| import * as aws from "@pulumi/aws"; | |
| import * as awsx from "@pulumi/awsx"; | |
| const cluster = new aws.ecs.Cluster("default-cluster"); | |
| const lb = new awsx.lb.ApplicationLoadBalancer("nginx-lb", {}); | |
| const service = new awsx.ecs.FargateService("my-service", { | |
| cluster: cluster.arn, | |
| desiredCount: 2, |
This file contains hidden or 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
| import * as pulumi from "@pulumi/pulumi"; | |
| import * as aws from "@pulumi/aws"; | |
| /** | |
| * The StaticWebsite class provisions a cloud storage bucket | |
| * and a content-delivery network for it, exposing the name of | |
| * the storage bucket and the CDN URL for later use. | |
| */ | |
| export class StaticWebsite { | |
| private bucket: aws.s3.Bucket; |
This file contains hidden or 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
| import * as pulumi from "@pulumi/pulumi"; | |
| import * as aws from "@pulumi/aws"; | |
| interface StaticWebsiteArgs { | |
| domainName: string; | |
| defaultDocument?: string; | |
| } | |
| /** |
This file contains hidden or 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
| import * as aws from "@pulumi/aws"; | |
| const lambda = new aws.lambda.CallbackFunction("my-function", { | |
| callback: () => { | |
| console.log("Hello, world!"); | |
| }, | |
| }); | |
| export const { id } = lambda; |
This file contains hidden or 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
| import * as aws from "@pulumi/aws"; | |
| import * as cloudflare from "@pulumi/cloudflare"; | |
| const domain = "pulumibook.info"; | |
| const subdomain = "my-awesome-website"; | |
| // Make a bucket. | |
| const bucket = new aws.s3.Bucket("my-bucket", { | |
| bucket: `${subdomain}.${domain}`, | |
| acl: aws.s3.CannedAcl.PublicRead, |