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
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: ecr-registry-secrets | |
stringData: | |
AWS_SECRET_ACCESS_KEY: "rgsssdfasdf" | |
AWS_ACCESS_KEY_ID: "AFIK" | |
AWS_ACCOUNT: "12345" | |
--- | |
apiVersion: v1 |
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
version: "3" | |
services: | |
ubuntu: | |
container_name: ubuntu | |
image: ubuntu | |
restart: on-failure | |
command: ["sleep","infinity"] | |
ports: | |
- '6379:80' | |
nginx: |
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
version: "3.7" | |
services: | |
mysql: | |
container_name: mysql | |
image: mysql | |
command: --default-authentication-plugin=mysql_native_password | |
hostname: mysql | |
restart: always | |
volumes: |
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
apiVersion: apps/v1 | |
kind: StatefulSet | |
metadata: | |
labels: | |
component: rabbitmq | |
name: rabbitmq | |
spec: | |
serviceName: rabbitmq | |
replicas: 1 | |
selector: |
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
/* HTTP function get data from event and resize the GKE cluster pools based on data */ | |
const container = require("@google-cloud/container"); | |
const client = new container.v1.ClusterManagerClient(); | |
exports.helloHTTP = async (req, res) => { | |
console.log(`Request Body`, req.body); | |
const request = { | |
projectId: req.body.projectId, |
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
/* PubSub function get data from PubSub and resize the GKE cluster pools based on data */ | |
const Buffer = require("safe-buffer").Buffer; | |
const container = require("@google-cloud/container"); | |
const client = new container.v1.ClusterManagerClient(); | |
exports.helloPubSub = async (message, context) => { | |
const payload = JSON.parse(Buffer.from(message.data, "base64").toString()); | |
const request = { |
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 csvFilePath = 'data/Blocks-IPv4.csv' | |
const City_csvFilePath = 'data/City-Locations.csv' | |
const csv = require('csvtojson') | |
const ipInt = require("ip-to-int"); | |
const IPCIDR = require("ip-cidr"); | |
var redis = require("redis"); | |
const client = redis.createClient(); | |
client.on("error", function(err) { | |
console.log("Error " + err); | |
}); |
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 {createClient, SchemaFieldTypes, AggregateGroupByReducers, AggregateSteps} from 'redis'; | |
const client = createClient(); | |
client.on("error", function(err) { | |
console.log("Error " + err); | |
}); | |
client.connect() | |
try { |
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
var redis = require("redis"); | |
const ipInt = require("ip-to-int"); | |
const client = redis.createClient(); | |
client.on("error", function(err) { | |
console.log("Error " + err); | |
}); | |
function int_to_ip(ip) { | |
try { |
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
var jwt = require('jsonwebtoken'); | |
const fs = require('fs'); | |
var request = require("request"); | |
var querystring = require('querystring'); | |
var privateKey = fs.readFileSync('./private_key.pem'); | |
#idcs or keycloak URL | |
var url = "https://example.com/oauth2/v1/token" | |
var headers = { | |
'Authorization': 'Basic <BASE-64 ENCODED client ID & Secret>', |
NewerOlder