cd /usr/local/
sudo wget https://dl.google.com/go/go1.13.4.linux-amd64.tar.gz
sudo tar -xzf go1.13.4.linux-amd64.tar.gz
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
[ | |
{ | |
"timestamp":1612121212, | |
"id":"", | |
"datetime":"10 Oct 2020 - 6:00 to 7:30 PM IST", | |
"logo_url":"", | |
"status":"", | |
"speaker":"", |
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
const mysql = require("mysql"); | |
const fastcsv = require("fast-csv"); | |
const Json2csvParser = require("json2csv").Parser; | |
const fs = require("fs"); | |
var pool = mysql.createPool({ | |
connectionLimit : 10, | |
host: "host", | |
user: "root", | |
password: "", | |
database: "master", |
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
#!/bin/sh | |
# | |
# This script deploys the given manifest, | |
# tracks the deployment, and rolls back on failure. | |
# | |
# First execute this with "myapp.yaml" and then try it with "myapp.failing.yaml" | |
# | |
MANIFEST_PATH=$1 | |
DEPLOYMENT_NAME=myapp |
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
const WebSocket = require('ws'); | |
const readline = require('readline'); | |
const url = process.argv[2]; | |
const ws = new WebSocket(url); | |
ws.on('open', () => console.log('connected')); | |
ws.on('message', data => console.log(`From server: ${data}`)); | |
ws.on('close', () => { | |
console.log('disconnected'); |
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
using namespace Microsoft.IdentityModel.Clients.ActiveDirectory | |
[CmdletBinding()] | |
param ( | |
$tenant, | |
$username, | |
$password | |
) | |
# Load the latest version of ADAL |
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
https://codelabs.developers.google.com/codelabs/cloud-builder-gke-continuous-deploy/index.html#1 | |
cat <<EOF > branch-build-trigger.json | |
{ | |
"triggerTemplate": { | |
"projectId": "${PROJECT}", | |
"repoName": "default", | |
"branchName": "[^(?!.*master)].*" | |
}, | |
"description": "branch", |
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
import React, { Component } from "react"; | |
const omit = (obj, omitKey) => | |
Object.keys(obj).reduce((result, key) => { | |
if (key !== omitKey) { | |
result[key] = obj[key]; | |
} | |
return result; | |
}, {}); | |
const overlayStyles = { |
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
const { google } = require("googleapis"); | |
const { auth } = require("google-auth-library"); | |
var sqladmin = google.sqladmin("v1beta4"); | |
// Based on https://medium.com/@kennethteh90/how-to-schedule-daily-cloud-sql-export-to-google-cloud-storage-4c1bd360af06 | |
exports.backup = async (_req, res) => { | |
const authRes = await auth.getApplicationDefault(); | |
let authClient = authRes.credential; | |
var request = { |