Skip to content

Instantly share code, notes, and snippets.

View goindwalia's full-sized avatar

Gursimran Singh goindwalia

  • India
View GitHub Profile
/* Kotlin Code*/
val a: Int
val b: Int
a=5
b=10
/* Java Code */
static int num1, num2; //explicit declaration
num1 = 20; //use the variables anywhere
num2 = 30;
#!/bin/bash
pip install --upgrade --user awscli
mkdir -p ~/.aws && chmod 755 ~/.aws
cat << EOF > ~/.aws/credentials
[default]
aws_access_key_id = XXXXXX
aws_secret_access_key = XXXXXX
EOF
$ docker version
Client:
Version: 17.03.1-ce
API version: 1.27
Go version: go1.7.5
Git commit: c6d412e
Built: Mon Mar 27 17:14:09 2017
OS/Arch: linux/amd64 (Ubuntu 16.04)
$ kubectl create -f deployment.yml
$ kubectl create -f service.yml
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: postgres
name: postgres
namespace: production
spec:
type: NodePort
ports:
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: postgres
namespace: production
spec:
replicas: 1
template:
metadata:
labels:
$ gluster volume create postgres-disk replica 2 transport tcp k8-master:/mnt/brick1/postgres-disk k8-1:/mnt/brick1/postgres-disk
$ gluster volume start postgres-disk
$ gluster volume info postgres-disk
$ docker build -t dr.xenonstack.com:5050/postgres:v9.6
FROM ubuntu:latest
MAINTAINER XenonStack
RUN apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" > /etc/apt/sources.list.d/pgdg.list
RUN apt-get update && apt-get install -y python-software-properties software-properties-common postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
RUN /etc/init.d/postgresql start &&\