Skip to content

Instantly share code, notes, and snippets.

View skizhak's full-sized avatar

Sarin Kizhakkepurayil skizhak

View GitHub Profile
@skizhak
skizhak / setup-mac-contrail-ui-dev.txt
Last active August 3, 2016 00:28
setup mac for contrail web ui dev sandbox
#Installing brew will make it easy for most of the packages.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install redis
brew install wget
brew install n
#install Node.JS
n 0.10.35
@skizhak
skizhak / git-cheatsheet.md
Last active April 29, 2016 19:18
git cheatsheet

####for vimdiff git difftool --tool=vimdiff --no-prompt

####to set vimdiff to settings git config --global diff.tool vimdiff git config --global merge.tool vimdiff

####to stop prompting git config --global difftool.prompt false

@skizhak
skizhak / .screenrc
Last active May 31, 2016 23:39
gnu-screen-rc
# Taken from various places on internet.
startup_message off
# Change escape trigger to CTRL+g
# CTRL+a is used in bash CLI to get to start of line
escape ^Gg
# Setting scrollback lines.
defscrollback 1024
@skizhak
skizhak / GO-dev-env.md
Last active March 10, 2017 02:43
Go developer environment

Setup

Install GO after downloading from https://golang.org/dl/

Set GOPATH to directory you want to keep your package and source files.

export GOPATH=~/go

Update PATH to add GO binary location

Keybase proof

I hereby claim:

  • I am skizhak on github.
  • I am skizhak (https://keybase.io/skizhak) on keybase.
  • I have a public key whose fingerprint is 21BA 72A3 9FA7 F8C2 2E1B DE5C 8136 4410 BFE9 3D52

To claim this, I am signing this object:

@skizhak
skizhak / fetch_from_s3.py
Created January 22, 2019 21:55
Following is a simple sample code that will generate the signature from your amazon credentials and add Authorization header in request to S3 server. The request to S3 service is send using linux wget command utility.
#!/usr/local/bin/python2.6
import hashlib,hmac,base64
from urlparse import urlparse
from email.utils import formatdate
import sys,subprocess
#Update credentials
AWSAccessKeyId = "<your access key>"
AWSSecretAccessKey = "<your secret key>"
@skizhak
skizhak / k8s_on_centos6-5.md
Last active January 22, 2019 22:09
Getting Kubernetes installed on Centos 6.5

Install kubectl

curl -Lo kubectl https://storage.googleapis.com/kubernetes-release/release/v1.6.0/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/

Install VirtualBox

cd /tmp/
wget http://download.virtualbox.org/virtualbox/5.1.18/VirtualBox-5.1-5.1.18_114002_el6-1.x86_64.rpm
@skizhak
skizhak / base64.js
Created January 22, 2019 22:17
Base64 encode/decode in JS
// base64 encode/decode shamelessly taken from Google Closure and modified.
// https://github.com/google/closure-library/blob/28d9db61f5dc639c010be74e4d61682121d2dbd7/closure/goog/crypt/base64.js
var base64 = {
ENCODED_VALS: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=',
encode: (data) => base64.encodeByteArray(base64.stringToByteArray(data)),
decode: (data) => base64.byteArrayToString(base64.decodeStringToByteArray(data)),
byteToCharMap_: '',
charToByteMap_: '',
init_: () => {
if (base64.byteToCharMap_ == '') {
@skizhak
skizhak / docker_on_ubuntu1804.sh
Created January 28, 2019 17:14
Docker on Ubuntu 18.04
#Follow https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04
sudo apt-get install apt install apt-transport-https ca-certificates curl software-properties-common
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
sudo systemctl status docker
sudo usermod -aG docker `whoami`
@skizhak
skizhak / azure-mount-newdisk.md
Created January 28, 2019 18:07
Azure mount the new disk