Skip to content

Instantly share code, notes, and snippets.

@pandeybk
pandeybk / hpphil.srt
Created May 1, 2020 04:34 — forked from alaroldai/hpphil.srt
Subtitles for Harry Potter and the Philosopher's Stone, with some substitutions
1
00:01:22,064 --> 00:01:27,070
I should've known that you would
be here, Professor McGonagall.
2
00:01:38,290 --> 00:01:41,460
Good evening, Professor Dumbledore.
3
@pandeybk
pandeybk / 1_create_net_subnet_image_flavor.md
Created April 26, 2020 21:18 — forked from arcolife/1_create_net_subnet_image_flavor.md
openstack 10 (newton) network router create

create network / subnet / image / flavor

# create a net and a subnet
i=1;
while [ $i -lt 51 ]; do 
  neutron net-create scalenet$i --shared; 
  j=0; 
@pandeybk
pandeybk / managed-certificate-deployment.yaml
Created December 14, 2019 04:37
managed-certificate-deployment
---
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: gke-goglides
name: hello-world
spec:
selector:
matchLabels:
@pandeybk
pandeybk / managed-certificate-ingress.yaml
Created December 14, 2019 04:37
managed-certificate-ingress
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: gke-goglides-ingress
annotations:
kubernetes.io/ingress.global-static-ip-name: gke-goglides-static-ip
networking.gke.io/managed-certificates: gke-goglides-certificate
spec:
backend:
@pandeybk
pandeybk / managed-certificate-svc.yaml
Created December 14, 2019 04:36
managed-certificate-example-svc
---
apiVersion: v1
kind: Service
metadata:
labels:
run: gke-goglides
name: hello-world-service
spec:
ports:
- port: 80
@pandeybk
pandeybk / managed-certificate.yaml
Created December 14, 2019 04:35
managed-certificate
---
apiVersion: networking.gke.io/v1beta1
kind: ManagedCertificate
metadata:
name: gke-goglides-certificate
spec:
domains:
- gke.goglides.com
@pandeybk
pandeybk / keycloak.sh
Last active December 16, 2019 16:29 — forked from paoloantinori/keycloak.sh
Keycloak Admin API Rest Example
#!/bin/bash
export KEYCLOAK_URL="http://localhost:8080"
export USERNAME="admin"
export PASSWORD="password"
export CLIENT_ID="admin-cli"
export TKN=$(curl -X POST "$KEYCLOAK_URL/auth/realms/master/protocol/openid-connect/token" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "username=${USERNAME}" \
@pandeybk
pandeybk / Jenkinsfile
Last active July 17, 2018 21:33
Container-template-Jenkinsfile
podTemplate(label: 'kube-node', yaml: """
apiVersion: v1
kind: Pod
metadata:
name: docker
labels:
role: kube-node
spec:
hostNetwork: true
containers:
@pandeybk
pandeybk / dashboard.yaml
Last active June 27, 2018 15:19
Kubernetes Dashboard login with cluster-admin role
# Create service and assign cluster-admin role
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: dashboard-admin
namespace: kube-system
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
@pandeybk
pandeybk / squash.sh
Created May 9, 2018 01:09
Squash several Git commits into a single commit
git checkout master
git fetch
git pull
# Merge the feature branch into the master branch.
git merge FEATURE/demo
# Reset the master branch to origin's state.
git reset origin/master