Skip to content

Instantly share code, notes, and snippets.

View swarupdonepudi's full-sized avatar
🎯
Focusing

Swarup Donepudi swarupdonepudi

🎯
Focusing
View GitHub Profile
@swarupdonepudi
swarupdonepudi / datagrip.sh
Created April 1, 2018 03:00
Open DataGrip from Terminal
#!/bin/sh
# check for where the latest version of DataGrip is installed
DATAGRIP=`ls -1d /Applications/DataGrip* | tail -n1`
wd=`pwd`
# were we given a directory?
if [ -d "$1" ]; then
# echo "checking for things in the working dir given"
wd=`ls -1d "$1" | head -n1`
@swarupdonepudi
swarupdonepudi / docker-run-user.md
Last active January 22, 2018 16:25
Run docker as the same user as on the host machine

By default docker runs the container as root user unless specified otherwise. In order to force docker to run the container as the same user as the docker daemon add --user flag as show below to docker run command.

docker run --user "$(id -u):$(id -g)"

@swarupdonepudi
swarupdonepudi / install-steps-etcher-cli.md
Created August 13, 2017 02:07
Steps to install etcher-cli on OSX.
  1. Download the etcher-cli tar file from the official downloads page

curl -O https://github.com/resin-io/etcher/releases/download/v1.1.2/Etcher-cli-1.1.2-darwin-x64.tar.gz
  1. Extract the tar file

tar fvx path/to/cli.tar.gz
  1. Create the directory in /opt folder and move the contents to the new folder
mkdir -p /opt/etcher-cli
mv -R Etcher-cli-1.1.2-darwin-x64 /opt/etcher-cli
  1. Add /opt/etcher-cli to PATH variable. This needs to be added to your login shell profile. I have added it to ~/.zshrc file.
@swarupdonepudi
swarupdonepudi / command-to-learnt-about-certs.sh
Created July 26, 2017 15:57
Command to learn more about a certificate
openssl x509 -in apiserver.crt -noout -text
@swarupdonepudi
swarupdonepudi / settings.xml
Created May 12, 2017 16:38
Repository Proxy settings for Maven
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>remote-repos</id>
<username>bhujabaa</username>
<password>{nnJv0EKhcscHIKzDO7BdzLIo6jKCh+xHjf6lYZuxV1A=}</password>
@swarupdonepudi
swarupdonepudi / decrypt-base64-encoded-string.md
Created May 8, 2017 21:48
Decrypt base64 encoded string on command line

echo "base64 encoded string here" | base64 -D

@swarupdonepudi
swarupdonepudi / install_k8s_centos7_vagrant.md
Created April 3, 2017 01:01
Install steps for installing Kubernetes using CentOS

Create vagrantfile to spin up a single CentOS node

@swarupdonepudi
swarupdonepudi / install_docker_centos_7.md
Last active March 29, 2017 05:18
Install steps for docker on CentoOS 7.2

Before Docker 1.12 was made generally available Docker 1.12 was not available as an yum package. So we had to install it form the binaries. You can find the instructions to install docker 1.12 using the source code below in this document. However it is easy to install docker 1.12 on CentOS 7 using the yum package manager.

Note : Without adding the docker repo to the default repos on CentOS docker 1.9 or lower version will be installed.

Steps to install docker 1.12 using yum package manager:

Note: You need to have sudo privileges to run the below commands

  1. Add a new yum repo to the existing repos. Create a new yum repo file : /etc/yum.repos.d/docker.repo with the below contents.
@swarupdonepudi
swarupdonepudi / what_is_flannel.md
Created March 24, 2017 13:48
What is Flannel?

Flannel is an opensource project for overlay networking for linux containers

@swarupdonepudi
swarupdonepudi / what_is_k8s_node_port.md
Created March 24, 2017 03:44
What is a NodePort in kubernetes?

A NodePort is one of the three service types in kubernetes. If a service is created with NodePort as the service type then that service gets a unique port across that is reserved across the cluster.