Skip to content

Instantly share code, notes, and snippets.

@limbuu
limbuu / README.md
Created March 16, 2020 11:22 — forked from nmarley/README.md
Python JSON Schema validation example

test json schema validation

Setup Virtualenv

$ virtualenv ./venv
$ ./venv/bin/pip install -r requirements.txt

Test/Play:

$ ./venv/bin/python ./v.py

## Scale Persistent Disk
glcoud compute disks --help
gcloud compute disks describe gce-pd-disk | grep sizeGb
gcloud compute disks rezise gce-pd-disk --zone xxx --region xxx --size 100
@limbuu
limbuu / tmux.md
Created March 9, 2020 10:20 — forked from andreyvit/tmux.md
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

@limbuu
limbuu / tmux-cheatsheet.markdown
Created March 9, 2020 07:24 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
minikube start --kubernetes-version=v1.7.0 --extra-config=apiserver.Authorization.Mode=RBAC
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
sudo apt-get install --reinstall coreutils
## upload to bucket
gsutil rsync -d -r /data gs://bucket-name/data ## normal sync with single thread
gsutil -m rsync -d -r /data gs://bucket-name/data ## normal sync with single thread
## download from bucket
gsutil rsync -d -r gs://bucket-name/data /data ## normal sync with single thread
gsutil -m rsync -d -r gs://bucket-name/data /data ## normal sync with single thread
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: codehub-monday-test
namespace: default
spec:
capacity:
storage: 10Gi
accessModes:
@limbuu
limbuu / app.py
Created July 19, 2019 09:00 — forked from abdelouahabb/app.py
Using SQLite with Tornado. just a simple code, tornado is easy, and if you want to make a simple application that runs on the same server, use this Gist for less dependecies ^_^
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import tornado.web
import tornado.httpserver
import tornado.ioloop
from tornado.options import define, options
import handlers
import os