Skip to content

Instantly share code, notes, and snippets.

View kgrvamsi's full-sized avatar
🎯
Focusing

Vamsi Kotipalli kgrvamsi

🎯
Focusing
  • Amazon (AWS)
  • Austin,TX
View GitHub Profile
@kgrvamsi
kgrvamsi / nginx.conf
Created January 5, 2021 16:24 — forked from ddre54/nginx.conf
NGINX configuration to detect and redirect unsupported browsers
# # IE 10 +
# # Firefox 27 +
# # Safari 7 +
# # iOS Safari 5 +
# # IE mobile 10 +
# # Android 4.2 +
# # Blackberry 10 +
# # Chrome 31+
#
@kgrvamsi
kgrvamsi / made-with-love.html
Created August 22, 2020 17:53 — forked from oliveratgithub/made-with-love.html
Various HTML-snippets to add "Made with love" to your website
<!-- Example #1 - no styling -->
Made with ❤ in Switzerland
<!-- Example #2 - inline-styled ❤ -->
Made with <span style="color: #e25555;">&#9829;</span> in Switzerland
Made with <span style="color: #e25555;">&hearts;</span> in Switzerland
<!-- Example #3 - CSS-style class for ❤ -->
<style>.heart{color:#e25555;}</style>
Made with <span class="heart"></span> in Switzerland
@kgrvamsi
kgrvamsi / run_command.go
Created August 21, 2020 16:12
Golang - Running Os level command
package main
import (
"fmt"
"log"
"os/exec"
)
func main() {
cmd := exec.Command("program") // or whatever the program is
@kgrvamsi
kgrvamsi / install.md
Created June 26, 2020 16:09 — forked from NorbertFenk/install.md
spinnaker install guide to kind without disk persistence

Resources https://dzone.com/articles/install-spinnaker-with-halyard-on-kubernetes

https://www.spinnaker.io/setup/install/halyard/

Steps to install spinnaker to a local dev cluster You will need a Kubernetes emulator link kind You will need to install halyard. This is a spinnaker deployment management tool. Here you can find further information about it and an installation guide: https://www.spinnaker.io/setup/install/halyard/ Follow these steps : https://www.spinnaker.io/setup/install/providers/kubernetes-v2/

@kgrvamsi
kgrvamsi / docker-swarm-ports.md
Created June 25, 2020 21:15 — forked from BretFisher/docker-swarm-ports.md
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

https://docs.docker.com/compose/reference/overview/
docker-compose build # build containers (usefull if changed)
docker-compose up # builds, (re)creates, starts, and attaches to containers for a service.
docker-compose up -d # same in detached mode
docker-compose up --force-recreate # stop all containers and recreate
docker-compose up --build # rebuild custom images
docker-compose stop # stop but dont remove
docker-compose start # restart
docker-compose down # stop & remove containers
@kgrvamsi
kgrvamsi / docker-compose.yml
Created April 10, 2020 06:14
Traefik, Docker-Compose, Nginx routing example -- port 80 http only, for now
traefik:
image: traefik
command: --web --docker --docker.watch --docker.domain=localhost --logLevel=DEBUG --entryPoints="Name:http Address::80"
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
@kgrvamsi
kgrvamsi / readme.md
Created April 9, 2020 17:19 — forked from ubergesundheit/readme.md
systemd traefik.service

systemd Service Unit for Traefik

Adapted from caddy systemd Service Unit

The provided file should work with systemd version 219 or later. It might work with earlier versions. The easiest way to check your systemd version is to run systemctl --version.

Instructions

We will assume the following:

@kgrvamsi
kgrvamsi / docker.sh
Created March 23, 2020 18:49 — forked from tosone/docker.sh
[docker save] #docker
#for not running docker, use save:
docker save <dockernameortag> | gzip > mycontainer.tgz
#for running or paused docker, use export:
docker export <dockernameortag> | gzip > mycontainer.tgz
#load
gunzip -c mycontainer.tgz | docker load
@kgrvamsi
kgrvamsi / matrix
Created March 5, 2020 20:22 — forked from omaraboumrad/matrix
tmux with cmatrix
#!/bin/bash
# make sure cmatrix is installed
# make sure tmux is installed
# $ chmod 755 matrix
# $ ./matrix
SESSION=$USER
tmux -2 new-session -d -s $SESSION 'cmatrix'