Skip to content

Instantly share code, notes, and snippets.

View ramitsurana's full-sized avatar

Ramit Surana ramitsurana

View GitHub Profile
@ramitsurana
ramitsurana / active.md
Last active August 29, 2015 14:19 — forked from paulmillr/active.md

Most active GitHub users (git.io/top)

The count of contributions (summary of Pull Requests, opened issues and commits) to public repos at GitHub.com from Thu, 03 Apr 2014 02:35:55 GMT till Fri, 03 Apr 2015 02:35:55 GMT.

Only first 1000 GitHub users according to the count of followers are taken. This is because of limitations of GitHub search. Sorting algo in pseudocode:

githubUsers
 .filter((user) -> user.followers > 386)
@ramitsurana
ramitsurana / install.sh
Created May 20, 2016 06:57 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@ramitsurana
ramitsurana / rkt-setup
Last active July 7, 2016 15:53
Some commands and setup method for using rkt
# Commands to setup rkt
# Installing rkt
wget https://github.com/coreos/rkt/releases/download/v1.0.0/rkt-v1.0.0.tar.gz
tar xfv rkt-v1.0.0.tar.gz
alias rkt="sudo '${PWD}/rkt-v1.0.0/rkt'"
# Running alpine container from quay.io registry
rkt run --interactive quay.io/coreos/alpine-sh
@ramitsurana
ramitsurana / rkt-gc
Created July 7, 2016 15:55
Steps to use Garbage collection method on rkt
# Using Garbage collection method in rkt
# Check the list of containers
rkt list
# Collecting Garbage collection
rkt gc
# Deleting the not used containers
rkt gc --grace-period=0
@ramitsurana
ramitsurana / aci-build.sh
Last active July 8, 2016 18:51
Steps to build an aci image using acbuild utility
# Steps to build an apache aci image using acbuild utility
# Based on alpine
acbuild --debug dep add quay.io/coreos/alpine-sh
# Install apache
acbuild --debug run -- apk update
acbuild --debug run -- apk add apache2
acbuild --debug run -- /bin/sh -c "echo 'ServerName localhost' >> /etc/apache2/httpd.conf"
@ramitsurana
ramitsurana / aci-setup
Created July 8, 2016 17:10
Steps to setup aci
# Installation steps for using aci
# Download the tar file
wget https://github.com/appc/acbuild/releases/download/v0.3.1/acbuild-v0.3.1.tar.gz
# Untar the file
tar xvf acbuild-v0.3.1.tar.gz
alias acbuild="sudo '${PWD}/acbuild-v0.3.1/acbuild'"
@ramitsurana
ramitsurana / k8s-setup-minikube
Last active August 2, 2016 14:27
Steps to download and configure minikube Kubernetes on ubuntu
# Ensure Installation of kubectl first
# Visit for http://kubernetes.io/docs/getting-started-guides/binary_release/
# For downloading any prerequisites
# Visit https://github.com/kubernetes/minikube/blob/master/DRIVERS.md
# Download & install Minikube
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.7.1/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
@ramitsurana
ramitsurana / README.md
Created July 20, 2016 12:18 — forked from dnozay/_Jenkins+Script+Console.md
jenkins groovy scripts collection.
@ramitsurana
ramitsurana / check.go
Created July 28, 2016 16:40 — forked from mattes/check.go
Check if file or directory exists in Golang
if _, err := os.Stat("/path/to/whatever"); os.IsNotExist(err) {
// path/to/whatever does not exist
}
if _, err := os.Stat("/path/to/whatever"); err == nil {
// path/to/whatever exists
}
wget https://github.com/GoogleCloudPlatform/kubernetes/releases/download/v1.3.0/kubernetes.tar.gz
tar xvf kubernetes
cd kubernetes/cluster/ubuntu
./download-release.sh
# The above steps will install binaries under the ubuntu directory
# You can check it under binaries directory
vim config-default.sh
#Please change the following entries