Skip to content

Instantly share code, notes, and snippets.

View skizhak's full-sized avatar

Sarin Kizhakkepurayil skizhak

View GitHub Profile
@skizhak
skizhak / build-static-v8-libs.sh
Last active October 20, 2024 05:39
Build and generate static v8 library
#Run build-v8.sh to setup deps.
gn gen "--args=is_clang=true is_component_build=false v8_static_library=true use_custom_libcxx=false target_cpu=\"x64\"" out.gn/x64.Release
ninja -C out.gn/x64.Release/
@skizhak
skizhak / azure-cli-ubuntu.sh
Created January 28, 2019 19:30
Install Azure CLI on ubuntu machines
#Follow https://docs.microsoft.com/en-us/cli/azure/install-azure-cli-apt?view=azure-cli-latest
sudo apt-get install apt-transport-https lsb-release software-properties-common dirmngr -y
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" | sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-key --keyring /etc/apt/trusted.gpg.d/Microsoft.gpg adv --keyserver packages.microsoft.com --recv-keys BC528686B50D79E339D3721CEB3E94ADBE1229CF
sudo apt-get update
sudo apt-get install azure-cli
@skizhak
skizhak / azure-mount-newdisk.md
Created January 28, 2019 18:07
Azure mount the new disk
@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 / 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 / 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 / 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>"

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 / 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

@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