Skip to content

Instantly share code, notes, and snippets.

View karthik2804's full-sized avatar

Karthik Ganeshram karthik2804

View GitHub Profile
@karthik2804
karthik2804 / build.json
Last active January 20, 2023 20:23
Data for spin-badge-generation
{
"label": "Build",
"labelColor": "orange",
"message": "Passing",
"color": "green",
"horizontalPadding": 10
}
@karthik2804
karthik2804 / GoogleAccessToken.js
Last active August 12, 2021 12:23
Get Google Oauth2 Access Token
/*
* Store the private key and email id of the service account as environment variables
* PRIVATE_KEY - Service account private key
* SERVICE_ACCOUNT_EMAIL - email id of the service account
*/
async function getToken(request) {
try {
// Function to encode an object with base64
function objectToBase64url(object) {
@karthik2804
karthik2804 / firebaseJwtVerificationWorker.js
Last active June 7, 2021 14:12
Validate Firebase ID Tokens in CloudFlare Worker (JWT verification)
/*
* AUTHOR: Karthik Ganeshram <[email protected]>
* Date: 07-06-2021
* Description: A cloudflare worker template to validate Firebase ID tokens
* Usage: Request parameters: {method: POST, body:{"token: FIREBASE_ID_TOKEN}, headers: {"Content-Type": "application/json"}}
*/
/*
* API url for Firebase-auth public key in JWK format
@karthik2804
karthik2804 / alpine_install.md
Created April 14, 2021 02:54
Dual boot alpine linux with windows

Alpine Linux Setup


System Specs:

  • Asus ROG zephyrus G14
  • Ryzen 9
  • RTX 2060 Max Q
  • 1 x 1TB NVME
  • 16GB RAM