Skip to content

Instantly share code, notes, and snippets.

@NimJay
NimJay / create-gke-cluster-with-asm.sh
Last active March 22, 2023 13:37
This is the most convenient, non-Terraform way I know to create a new Google Kubernetes Engine (GKE) cluster with managed Anthos Service Mesh (ASM) installed.
# If you're not using Cloud Shell, make sure to replace $GOOGLE_CLOUD_PROJECT with your Project ID.
# Cloud Shell is a small virtual machine (in Google Cloud) that's tied to your Google Cloud account.
export PROJECT_ID=$GOOGLE_CLOUD_PROJECT
export CLUSTER_NAME=my-cluster-3
export KUBECONTEXT_NAME=my-cluster-3
export ZONE=us-central1-b
export PROJECT_NUMBER=$(gcloud projects describe ${PROJECT_ID} --format='get(projectNumber)')
echo "🏗️ Enabling necessary Google Cloud APIs..."
@RaVbaker
RaVbaker / readme.md
Created March 30, 2012 20:12
[HOWTO] Rewrite all urls to one index.php in Apache

Redirect All Requests To Index.php Using .htaccess

In one of my pet projects, I redirect all requests to index.php, which then decides what to do with it:

Simple Example

This snippet in your .htaccess will ensure that all requests for files and folders that does not exists will be redirected to index.php:

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-d