Skip to content

Instantly share code, notes, and snippets.

View sillysachin's full-sized avatar

Sachin Shekhar R sillysachin

View GitHub Profile
@sillysachin
sillysachin / _chrome-ext-auth-identity.md
Created May 8, 2023 12:59 — forked from raineorshine/_chrome-ext-auth-identity.md
How to set up user authentication for a Chrome Extension using the Chrome Identity API

How to set up user authentication for a Chrome Extension using the Chrome Identity API

  1. Create a private key file, from which you can create the manifest key and Application ID, as detailed here: https://stackoverflow.com/questions/23873623/obtaining-chrome-extension-id-for-development
  2. Add the manifest key to "key" in manifest.json
  3. Create a new project in Google Developer Console https://console.developers.google.com/project
  4. Go to "APIs & auth > Credentials" and create new client id for a Chrome Application using the Application ID generated in step 3.
  5. Copy the Client ID to oauth2.client_id in the manifest.json

Deprecated?

@sillysachin
sillysachin / pod.yaml
Created February 4, 2021 13:14 — forked from matthewpalmer/pod.yaml
Example for using NFS volume in pod
# Create a pod that reads and writes to the
# NFS server via an NFS volume.
kind: Pod
apiVersion: v1
metadata:
name: pod-using-nfs
spec:
# Add the server as an NFS volume for the pod
volumes:
kind: ConfigMap
apiVersion: v1
metadata:
name: example-configmap
data:
# Configuration values can be set as key-value properties
database: mongodb
database_uri: mongodb://localhost:27017
# Or set as complete file contents (even JSON!)
kind: Pod
apiVersion: v1
metadata:
name: pod-using-configmap
spec:
# Add the ConfigMap as a volume to the Pod
volumes:
# `name` here must match the name
# specified in the volume mount
kind: Pod
apiVersion: v1
metadata:
name: pod-env-var
spec:
containers:
- name: env-var-configmap
image: nginx:1.7.9
envFrom:
- configMapRef:
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: nginx-deployment
spec:
# A deployment's specification really only
# has a few useful options
# 1. How many copies of each pod do we want?
replicas: 3
@sillysachin
sillysachin / pod.yaml
Created February 4, 2021 13:07 — forked from matthewpalmer/pod.yaml
Pod using NFS volume
# Create a pod that reads and writes to the
# NFS server via an NFS volume.
kind: Pod
apiVersion: v1
metadata:
name: pod-using-nfs
spec:
# Add the server as an NFS volume for the pod
volumes:
nfs ⟩ kubectl exec -it pod-using-nfs sh
/ # cat /var/nfs/dates.txt
Mon Oct 22 00:47:36 UTC 2018
Mon Oct 22 00:47:41 UTC 2018
Mon Oct 22 00:47:46 UTC 2018
nfs ⟩ kubectl exec -it nfs-server-pod sh
# cat /exports/dates.txt
@sillysachin
sillysachin / nfs-server.yaml
Created February 4, 2021 13:06 — forked from matthewpalmer/nfs-server.yaml
Example for NFS server in Kubernetes
# Note - an NFS server isn't really a Kubernetes
# concept. We're just creating it in Kubernetes
# for illustration and convenience. In practice,
# it might be run in some other system.
# Create a service to expose the NFS server
# to pods inside the cluster.
kind: Service
apiVersion: v1
@sillysachin
sillysachin / blockchain.md
Created October 16, 2020 14:15 — forked from kwichmann/blockchain.md
Blockchain and Ethereum resources