Skip to content

Instantly share code, notes, and snippets.

View sahanasj's full-sized avatar

SahanaJSJ sahanasj

View GitHub Profile
@sahanasj
sahanasj / mongodb_shell_commands.md
Created July 27, 2020 13:22 — forked from michaeltreat/mongodb_shell_commands.md
Quick Cheat Sheet for Mongo DB Shell commands.

MongoDB Shell Commands Cheat Sheet.

This is a Cheat Sheet for interacting with the Mongo Shell ( mongo on your command line). This is for MongoDB Community Edition.

Preface:

Mongo Manual can help you with getting started using the Shell.

FAQ for MongoDB Fundamentals and other FAQs can be found in the side-bar after visiting that link.

@sahanasj
sahanasj / git-feature-workflow.md
Created July 22, 2020 17:18 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

Git-workflow or feature branching

When working with Git, there are two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the [atlassian.com Git Workflow][article] article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on [setting up GIT Bash autocompletion][git-auto]. This tool will assist you to better visualize the state of a branch in regards to changes and being in sync with the remote repo.

Basic branching

@sahanasj
sahanasj / git-feature-workflow.md
Created July 22, 2020 17:18 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

Git-workflow or feature branching

When working with Git, there are two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited, and the focus of this article.

If you are new to Git and Git-workflows, I suggest reading the [atlassian.com Git Workflow][article] article in addition to this as there is more detail there than presented here.

I admit, using Bash in the command line with the standard configuration leaves a bit to be desired when it comes to awareness of state. A tool that I suggest using follows these instructions on [setting up GIT Bash autocompletion][git-auto]. This tool will assist you to better visualize the state of a branch in regards to changes and being in sync with the remote repo.

Basic branching

Network Interface Configurator.
- View network settings of an ethernet adapter:
ifconfig eth0
- Display details of all interfaces, including disabled interfaces:
ifconfig -a
- Disable eth0 interface:
ifconfig eth0 down
@sahanasj
sahanasj / linux-networking-tools.md
Created January 28, 2020 07:49 — forked from miglen/linux-networking-tools.md
Linux networking tools

List of Linux networking tools

netstat (ss)

Displays contents of /proc/net files. It works with the Linux Network Subsystem, it will tell you what the status of ports are ie. open, closed, waiting, masquerade connections. It will also display various other things. It has many different options. Netstat (Network Statistic) command display connection info, routing table information etc. To displays routing table information use option as -r.

Sample output:

Proto Recv-Q Send-Q  Local Address          Foreign Address        (state)    
tcp4 0 0 127.0.0.1.62132 127.0.0.1.http ESTABLISHED
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@sahanasj
sahanasj / backend-configMap.yaml
Created July 23, 2019 12:00 — forked from shri-kanth/backend-configMap.yaml
File exposing configuration related to back-end application Setup
# ConfigMap to expose configuration related to backend application
apiVersion: v1
kind: ConfigMap
metadata:
name: backend-conf # name of configMap
data:
server-uri: 34.66.207.42 # enternal ip of backend application 'Service'
@sahanasj
sahanasj / frontend-deployment.yaml
Created July 23, 2019 12:00 — forked from shri-kanth/frontend-deployment.yaml
File describing configuration related to application front-end deployment on Kuberenetes
# Define 'Service' to expose FrontEnd Application
apiVersion: v1
kind: Service
metadata:
name: to-do-app-frontend
spec:
selector: # pod labels should match these
app: to-do-app
tier: frontend
ports:
@sahanasj
sahanasj / backend-deployment.yaml
Created July 23, 2019 11:55 — forked from shri-kanth/backend-deployment.yaml
Configuration of back-end application deployment on Kubernetes
# Define 'Service' to expose backend application deployment
apiVersion: v1
kind: Service
metadata:
name: to-do-app-backend
spec:
selector: # backend application pod lables should match these
app: to-do-app
tier: backend
ports:
@sahanasj
sahanasj / frontEnd.DockerFile
Created July 23, 2019 10:03 — forked from shri-kanth/frontEnd.DockerFile
DockerFile to Create Application FrontEnd Image
FROM node:7.7-alpine
# install dependencies
ADD package.json /tmp/package.json
RUN cd /tmp && npm install
# Copy dependencies
RUN mkdir -p /opt/to-do-app && cp -a /tmp/node_modules /opt/to-do-app
# Setup workdir