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 { dirname } from "node:path"; | |
| import { fileURLToPath } from "node:url"; | |
| import * as docker from "@pulumi/docker"; | |
| import * as gcp from "@pulumi/gcp"; | |
| import * as pulumi from "@pulumi/pulumi"; | |
| import { GoogleAuth } from "google-auth-library"; | |
| const __dirname = dirname(fileURLToPath(import.meta.url)); | |
| const region = "us-central1"; |
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 gcp from "@pulumi/gcp"; | |
| const region = "us-central1"; | |
| const gcpProvider = new gcp.Provider("gcpProvider", { | |
| project: gcp.config.project, | |
| region: region, | |
| defaultLabels: { team: "devops" }, | |
| }); | |
| const enableServices = (services: 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
| almost empty | |
| not so empty anymore. | |
| yeah. |
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
| name: Update Gist | |
| on: | |
| release: | |
| types: | |
| - published | |
| workflow_dispatch: | |
| jobs: | |
| update-gist: |
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
| main: | |
| params: [input] | |
| steps: | |
| - checkSleepTimeout: | |
| switch: | |
| - condition: ${"sleepTimeoutSeconds" in input} | |
| assign: | |
| - sleepTimeoutSeconds: ${int(input.sleepTimeoutSeconds)} | |
| - condition: true | |
| assign: |
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
| main: | |
| steps: | |
| - createCallback: | |
| call: events.create_callback_endpoint | |
| args: | |
| http_callback_method: "POST" | |
| result: callbackDetails | |
| - createHttpCallPayload: | |
| assign: | |
| - httpCallPayload: {} |
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
| main: | |
| steps: | |
| - getCurrentTime: | |
| call: http.get | |
| args: | |
| url: https://us-central1-workflowsample.cloudfunctions.net/datetime | |
| result: currentDateTime | |
| - returnOutput: | |
| return: ${currentDateTime.body.dayOfTheWeek} |
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 glbl = global || globalThis || window; | |
| const radixes = '0123456789абвгдеёжзийклмнопрстуфхцчшщъыьэюя'; | |
| const parseInt = (text, radix) => { | |
| const actualRadix = radixes.indexOf(radix); | |
| const result = glbl.parseInt(text, actualRadix); | |
| return result; | |
| }; | |
| console.log(parseInt('210', 3)); // 21 |
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 javax.xml.bind.*; | |
| import javax.xml.transform.Source; | |
| import javax.xml.transform.stream.StreamSource; | |
| import java.io.File; | |
| import java.io.FileInputStream; | |
| import java.io.IOException; | |
| public class Demo { | |
| public static void main(String[] args) throws JAXBException, IOException { | |
| JAXBContext context = JAXBContext.newInstance(Type.class, InnerType.class); |
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 javax.xml.bind.JAXBContext; | |
| import javax.xml.bind.JAXBException; | |
| import javax.xml.bind.Marshaller; | |
| /** | |
| * Created by User on 20.03.2017. | |
| */ | |
| public class Demo { | |
| public static void main(String[] args) throws JAXBException { | |
| JAXBContext context = JAXBContext.newInstance(Type.class, InnerType.class); |
NewerOlder