Skip to content

Instantly share code, notes, and snippets.

View lavjain's full-sized avatar

Lav Jain lavjain

View GitHub Profile
@lavjain
lavjain / gcrgc.sh
Created May 4, 2023 00:28 — forked from ahmetb/gcrgc.sh
Script to clean up Google Container Registry images pushed before a particular date
#!/bin/bash
# Copyright © 2017 Google Inc.
# 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
@lavjain
lavjain / http_load_balancer_setup_gcp.sh
Last active March 28, 2023 03:14 — forked from chilampoon/http_load_balancer_setup_gcp.sh
Set up an HTTP load balancer with a managed instance group of 2 nginx web servers on Google Cloud Platform (Qwiklab)
# setup
gcloud auth list
gcloud config set compute/zone us-east1-b
gcloud config set compute/region us-east1
# create an instance template
cat << EOF > startup.sh
#! /bin/bash
apt-get update
apt-get install -y nginx