Skip to content

Instantly share code, notes, and snippets.

Avatar

Amreesh Tyagi AmreeshTyagi

View GitHub Profile
@AmreeshTyagi
AmreeshTyagi / netflix-request-visualizer-example.sh
Created Nov 20, 2019
netflix request visualizer - vizceral
View netflix-request-visualizer-example.sh
#!/bin/bash
# Based on https://github.com/Netflix/vizceral-example
# Usage: make script executable
# chmod +x netflix-request-visualizer-example.sh
# ./netflix-request-visualizer-example.sh
# Navigate to http://localhost:41911
# Author: Amreesh Tyagi
# Country: India
if [ -x "$(command -v docker)" ]; then
View install-redis-commander-web-ui-client.sh
#!/bin/bash
# Based on redis-commmander https://github.com/joeferner/redis-commander
# Usage: make script executable
# chmod +x install-redis-commander-web-client.sh
# ./install-redis-commander-web-client.sh
# Author: Amreesh Tyagi
# Country: India
if [ -x "$(command -v docker)" ]; then
echo "Docker is already installed."
@AmreeshTyagi
AmreeshTyagi / rediscommander-redis-web-client-server-docker-compose.yaml
Last active Sep 9, 2019
redis web client & server for development & testing using redis-commander
View rediscommander-redis-web-client-server-docker-compose.yaml
version: '3'
services:
redis:
container_name: redis
hostname: redis
image: redis
redis-commander:
container_name: redis-commander
hostname: redis-commander
@AmreeshTyagi
AmreeshTyagi / .zshrc
Last active Jan 31, 2020
Geek like mac & linux terminal using zsh
View .zshrc
# Output of following zsh configuration https://ibb.co/Yb2YM4C
# Step1: Install zsh using
# brew install zsh
# Step2: nano ~/.zshrc
# Step3: Paste following configuration
# For further steps to install fonts & color scheme click on following
# https://www.freecodecamp.org/news/how-to-configure-your-macos-terminal-with-zsh-like-a-pro-c0ab3f3c1156/
# Enjoy new terminal theme like a pro... :)
#export LSCOLORS=ExGxBxDxCxEgEdxbxgxcxd
unset LSCOLORS
@AmreeshTyagi
AmreeshTyagi / workbench-ui-fix.sh
Last active Mar 25, 2022
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
View workbench-ui-fix.sh
#!/bin/bash
defaults write com.oracle.workbench.MySQLWorkbench NSRequiresAquaSystemAppearance -bool yes
echo "Successfully patched!"
echo "Now restart MySQL Workbench to see the Workbench in light theme."
#Restart MySQL Workbench after executing this.
@AmreeshTyagi
AmreeshTyagi / History|-10269bb7|entries.json
Last active Jun 23, 2022 — forked from tyagiamreesh/cloudSettings
Visual Studio Code Settings Sync Gist
View History|-10269bb7|entries.json
{"version":1,"resource":"file:///home/batman/development/AmreeshTyagi/order-fulfillment/src/module/strategy/Fifo.ts","entries":[{"id":"8ife.ts","timestamp":1649300530793},{"id":"b56v.ts","timestamp":1649300548661},{"id":"tm76.ts","source":"Workspace Edit","timestamp":1649300551093},{"id":"lELR.ts","timestamp":1649300552809},{"id":"Pvjl.ts","source":"Implement interface 'IDispatchStrategy'","timestamp":1649300557517},{"id":"j8hB.ts","source":"renamed.source","timestamp":1649300601808},{"id":"f36u.ts","timestamp":1649300607590},{"id":"VTFS.ts","timestamp":1649300652495},{"id":"FFug.ts","source":"Workspace Edit","timestamp":1649300653799},{"id":"Wh4G.ts","timestamp":1649300657059},{"id":"DCyb.ts","source":"Workspace Edit","timestamp":1649300698371},{"id":"3Ipp.ts","source":"moved.source","timestamp":1649300701463}]}
@AmreeshTyagi
AmreeshTyagi / mysql8.0-phpmyadmin-fix.sh
Last active Jan 24, 2019
mysql 8.0 caching_sha2_password fix for kubernetes
View mysql8.0-phpmyadmin-fix.sh
#!/bin/bash
# Please change values of <> placeholders as per your requirments.
# Step 1: Get mysql password from kubernetes pod, if installed from helm.
MYSQL_ROOT_PASSWORD=$(kubectl get secret --namespace <my-namespace> <mysql-secret-key> -o jsonpath="{.data.mysql-root-password}" | base64 --decode; echo)
# Step 2: Run mysql client in kubernetes
kubectl run -it --rm --image=mysql:8.0 --restart=Never mysql-client -- mysql -h <mysql-host> -u root -p$MYSQL_ROOT_PASSWORD
# Step 3: Run following query to chnage password method
View extended-cleanup-rancher2.sh
#!/bin/sh
docker rm -f $(docker ps -qa)
docker rmi -f $(docker images -q)
docker volume rm $(docker volume ls -q)
for mount in $(mount | grep tmpfs | grep '/var/lib/kubelet' | awk '{ print $3 }') /var/lib/kubelet /var/lib/rancher; do umount $mount; done
cleanupdirs="/etc/ceph /etc/cni /etc/kubernetes /opt/cni /opt/rke /run/secrets/kubernetes.io /run/calico /run/flannel /var/lib/calico /var/lib/etcd /var/lib/cni /var/lib/kubelet /var/lib/rancher/rke/log /var/log/containers /var/log/pods /var/run/calico"
for dir in $cleanupdirs; do
echo "Removing $dir"
rm -rf $dir
done
@AmreeshTyagi
AmreeshTyagi / get-token
Created Jun 1, 2018 — forked from snappytux/get-token
docker swarm get token
View get-token
docker swarm join-token --rotate manager
View npm-scripts-for-docker.md

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

Looking for npm scripts for AWS ECS? Go here!

Watch the video: Do More With Less JavaScript

Docker Containers for Static or Angular/React/Vue/etc SPA Websites