Skip to content

Instantly share code, notes, and snippets.

@ka4a
ka4a / gist:fc45433db78d6448307eeecbf44f1153
Created April 27, 2021 18:13 — forked from luckydev/gist:b2a6ebe793aeacf50ff15331fb3b519d
Increate max no of open files limit in Ubuntu 16.04/18.04 for Nginx
# maximum capability of system
user@ubuntu:~$ cat /proc/sys/fs/file-max
708444
# available limit
user@ubuntu:~$ ulimit -n
1024
# To increase the available limit to say 200000
user@ubuntu:~$ sudo vim /etc/sysctl.conf
@ka4a
ka4a / cors.nginx.conf
Created January 13, 2021 14:11 — forked from bravepickle/cors.nginx.conf
CORS config for handling in NGINX
# Handling CORS headers for handling cross-origin requests example
# See https://developer.mozilla.org/en/docs/Web/HTTP/CORS
# TODO: check if origin is set. If missing then do not add CORS headers
# TODO: handle ports in origin
# check if origin header is among allowed ones
map $http_origin $cors_origin {
hostnames;
# all domains and subdomains for my-site.com or *.my-site.com can request contents
@ka4a
ka4a / kubectl.md
Created August 27, 2020 15:08 — forked from so0k/kubectl.md
Playing with kubectl output

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
@ka4a
ka4a / .zshrc
Created August 4, 2020 06:13 — forked from deepu105/.zshrc
export TERM="xterm-256color" # This sets up colors properly
# workaround as per https://superuser.com/questions/1222867/zsh-completion-functions-broken
FPATH=$HOME/.oh-my-zsh/plugins/git:$HOME/.oh-my-zsh/functions:$HOME/.oh-my-zsh/completions:/usr/share/zsh/site-functions:/usr/share/zsh/$ZSH_VERSION/functions
export FPATH
# set shell
export SHELL=/usr/bin/zsh
@ka4a
ka4a / kubernetes_commands.md
Created April 14, 2019 17:15 — forked from edsiper/kubernetes_commands.md
Kubernetes Useful Commands
@ka4a
ka4a / install-docker.sh
Created April 6, 2019 13:59 — forked from sethbergman/install-docker.sh
Install Docker CE on Linux Mint 19
#!/usr/bin/env bash
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt-get update
sudo apt-get install docker-ce
# https://docs.docker.com/compose/install/
@ka4a
ka4a / README.md
Created January 21, 2019 11:39 — forked from twonds/README.md
Datadog stream parser for json

dd-udpstream

Parse json events into data dog events

Testing