Skip to content

Instantly share code, notes, and snippets.

View abdullahainun's full-sized avatar
🏠
Working from home

Ainun Abdullah abdullahainun

🏠
Working from home
View GitHub Profile
@Syed-Hassaan
Syed-Hassaan / GSP345 | Automating Infrastructure on Google Cloud with Terraform: Challenge Lab.txt
Created May 20, 2021 09:29
GSP345 | Automating Infrastructure on Google Cloud with Terraform: Challenge Lab
######################################################################################
## Automating Infrastructure on Google Cloud with Terraform: Challenge Lab # GSP345 ##
######################################################################################
====================== Setup : Create the configuration files ======================
Make the empty files and directories in Cloud Shell or the Cloud Shell Editor.
------------------------------------------------------------------------------------
touch main.tf
touch variables.tf
@ekoyudhi
ekoyudhi / gsp344_serverless-firebase-development-challenge-lab.sh
Created March 14, 2021 03:51
Serverless Firebase Development: Challenge Lab
gcloud config set project $(gcloud projects list --format='value(PROJECT_ID)' --filter='qwiklabs-gcp')
git clone https://github.com/rosera/pet-theory.git
# 1. Firestore Database Create
Go to Firestore > Select Naive Mode > Location: nam5 > Create Database
# 2. Firestore Database Populate
cd pet-theory/lab06/firebase-import-csv/solution
npm install
node index.js netflix_titles_original.csv
@danielepolencic
danielepolencic / README.md
Last active April 20, 2024 21:50
Create 3 nodes Kubernetes cluster locally with Vagrant

3 Virtual Machines Kubernetes cluster

Dependencies

You should install VirtualBox and Vagrant before you start.

Creating the cluster

You should create a Vagrantfile in an empty directory with the following content:

@zodvik
zodvik / benchmark-commands.txt
Last active December 18, 2022 12:45
Kafka (1.0.0) Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper localhost:2181/kafka-local --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper localhost:2181/kafka-local --create --topic test-rep-two --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.tools.ProducerPerformance --print-metrics --topic test-rep-one --num-records 6000000 --throughput 100000 --record-size 100 --producer-props bootstrap.servers=kafka_host:9092 buffer.memory=67108864 batch.size=8196
Single-thread, async 3x replication
@sphinxid
sphinxid / sslcheck.sh
Last active July 5, 2023 04:14
bash script to check ssl certificate expiration
#!/bin/bash
hosts=$@
date_cmd=""
if [[ "$OSTYPE" == "darwin"* ]]; then
# make sure you have 'coreutils' -- brew install coreutils
date_cmd="gdate"
else
date_cmd="date"
@Warchant
Warchant / sonarqube-docker-compose.yml
Last active March 15, 2024 13:04
docker-compose file to setup production-ready sonarqube
version: "3"
services:
sonarqube:
image: sonarqube
expose:
- 9000
ports:
- "127.0.0.1:9000:9000"
networks:
@girst
girst / load-balance.sh
Last active March 8, 2024 13:26
Simple Linux Load Balancing with `iproute2`
#!/bin/bash
# Load balance multiple internet connections. Requires iproute2, awk and grep.
# (C) 2016 Tobias Girstmair, isticktoit.net, GPLv2
# Also useful: speedometer -l -r eth1 -t eth1 -m $(( 1024 * 1024 * 3 / 2 ))
# Not much user error checking is done - only pass working network connections
# script needs root to work and at least two interfaces to be useful
[ $EUID -eq 0 -a $# -ge 2 ] || {
echo "Usage (as root): $0 iface1[:weight1] iface2[:weight2] ..." >&2
@olih
olih / jq-cheetsheet.md
Last active May 2, 2024 00:42
jq Cheet Sheet

Processing JSON using jq

jq is useful to slice, filter, map and transform structured json data.

Installing jq

On Mac OS

brew install jq

@josue
josue / nginx_s3_proxy.conf
Last active March 7, 2023 07:31
Simple Nginx Proxy to S3 Bucket Asset
server {
listen 80;
listen 443 default_server ssl;
ssl on;
ssl_certificate /etc/ssl/certs/myssl.crt;
ssl_certificate_key /etc/ssl/private/myssl.key;
server_name *.example.com;
root /var/www/vhosts/website;
@Stanback
Stanback / nginx.conf
Last active April 22, 2024 19:23 — forked from michiel/cors-nginx.conf
Example Nginx configuration for adding cross-origin resource sharing (CORS) support to reverse proxied APIs
#
# CORS header support
#
# One way to use this is by placing it into a file called "cors_support"
# under your Nginx configuration directory and placing the following
# statement inside your **location** block(s):
#
# include cors_support;
#
# As of Nginx 1.7.5, add_header supports an "always" parameter which