Skip to content

Instantly share code, notes, and snippets.

View arujit's full-sized avatar
🖖
spocking

Arujit Pradhan arujit

🖖
spocking
View GitHub Profile
@arujit
arujit / iterm2.md
Created August 7, 2019 11:50 — forked from squarism/iterm2.md
iterm2 cheatsheet

Tabs and Windows

Function Shortcut
New Tab + T
Close Tab or Window + W (same as many mac apps)
Go to Tab + Number Key (ie: ⌘2 is 2nd tab)
Go to Split Pane by Direction + Option + Arrow Key
Cycle iTerm Windows + backtick (true of all mac apps and works with desktops/mission control)
@arujit
arujit / airflow-k8s-executor-minikube-helm.md
Created April 26, 2019 08:14 — forked from kppullin/airflow-k8s-executor-minikube-helm.md
Airflow w/ kubernetes executor + minikube + helm

Overview

The steps below bootstrap an instance of airflow, configured to use the kubernetes airflow executor, working within a minikube cluster.

This guide works with the airflow 1.10 release, however will likely break or have unnecessary extra steps in future releases (based on recent changes to the k8s related files in the airflow source).

Prerequisites

  • Docker installed
  • Minikube installed and started
package jwtmodule
import (
"crypto/rsa"
"fmt"
jwt "github.com/dgrijalva/jwt-go"
"io/ioutil"
"log"
)
package jwtmodule
import (
"crypto/rsa"
"fmt"
jwt "github.com/dgrijalva/jwt-go"
"io/ioutil"
"log"
_ "os"
_ "reflect"
import jwt
class JwtBase(object):
_instance = None
def __new__(class_, *args, **kwargs):
if not isinstance(class_._instance, class_):
class_._instance = object.__new__(class_, *args, **kwargs)
return class_._instance
import jwt
import sys
class InitializeJWT(object ):
_instance = None
def __new__(cls, private_path, public_path):
try:
cls._publickey_file = open(public_path, "r")
cls._privatekey_file = open(private_path, "r")
import jwt
import sys
"""
python script for jwt encryption and decryption
"""
class JwtEncoding(object):
import cherrypy
import datetime
import time
from cherrys import RedisSession
import json
class RedisJsonSession(RedisSession):
def __init__(self, *arg, **kwargs):
@arujit
arujit / cherrys_json.py
Created July 10, 2017 12:31
cherrys support for json
import cherrypy
import datetime
from cherrys import RedisSession
import json
class RedisJsonSession(RedisSession):
def _load(self):
try: