Skip to content

Instantly share code, notes, and snippets.

View cgrotz's full-sized avatar

Christoph Grotz cgrotz

View GitHub Profile
@cgrotz
cgrotz / main.go
Created October 7, 2024 19:52
Go example for OAuth 2.0 Device Authorization Grant
// Copyright 2024 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@cgrotz
cgrotz / workflow.yaml
Last active September 20, 2023 21:40
Example Github Action for deploying to Apigee X
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
@cgrotz
cgrotz / Simple IPAM Example.tf
Created December 15, 2021 16:52
Simple Example for IPAM Autopilot
// Copyright 2021 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
@cgrotz
cgrotz / script1.kt
Created December 10, 2021 20:32
Assigning values in Kotlin with a condition
var name = "Bob";
String message;
if(name.equals("Bob")) {
message = "Hello Bob";
}
else {
message = "Good Day Sir";
}
@cgrotz
cgrotz / pipeline.java
Created December 10, 2021 20:27
Covid Analysis
import com.google.api.services.bigquery.model.TableFieldSchema
import com.google.api.services.bigquery.model.TableRow
import com.google.api.services.bigquery.model.TableSchema
import org.apache.beam.sdk.Pipeline
import org.apache.beam.sdk.io.TextIO
import org.apache.beam.sdk.io.gcp.bigquery.BigQueryIO
import org.apache.beam.sdk.options.PipelineOptions
import org.apache.beam.sdk.options.PipelineOptionsFactory
import org.apache.beam.sdk.options.ValueProvider
import org.apache.beam.sdk.transforms.Filter
#!/bin/bash
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@cgrotz
cgrotz / drawing.html
Created August 5, 2013 15:53
Simple Roadrunner Example
<html>
<head>
<script src="roadrunner.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="https://www.firebase.com/css/example.css">
</head>
<body>
<div>
<canvas id="drawing-canvas" width="480" height="420"></canvas>
</div>