Skip to content

Instantly share code, notes, and snippets.

Avatar

Amreesh Tyagi AmreeshTyagi

  • India
View GitHub Profile
@AmreeshTyagi
AmreeshTyagi / install-development-tools.sh
Last active Jan 14, 2023
Install tools, gvm for golang, nvm for nodejs & docker on ubuntu development machine in one click
View install-development-tools.sh
#!bin/bash
# Install basic utils
sudo apt-get install curl git htop tmux -y
# Install build tools
sudo apt-get install binutils bison gcc make -y
# Install golang verison manager. Don't use gvm. Better to install directly from offical website to avoid pkg broken issue.
# zsh < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer)
@AmreeshTyagi
AmreeshTyagi / slack-app-workspace-not-open-fix-linux.sh
Created Dec 1, 2022
Fix to handle slack workspace open issue from browser to app on Linux.
View slack-app-workspace-not-open-fix-linux.sh
#!/usr/bin/env bash
# Save this script as /usr/local/bin/xdg-open and make script executable using chmod +x /usr/local/bin/xdg-open
if [[ "${1:-}" = slack://* ]]; then
# Slack binary path can be anything depending on installation method and Linux version.
# Execute in shell/bash & check:
# $ whereis slack
# Possible outputs:
@AmreeshTyagi
AmreeshTyagi / one-click-install-oh_my_zsh-powerlevel10k-ubuntu.sh
Last active Nov 26, 2022
one click installation script for oh-my-zsh and powerlevel10k with autocomplete and highlighter plugin on ubuntu 20.04
View one-click-install-oh_my_zsh-powerlevel10k-ubuntu.sh
#!/bin/bash
# Install zsh
sudo apt install zsh -y
# Show version
zsh --version
# Set zsh as default shell
chsh -s /usr/bin/zsh
View stripe-keys-and-ids.tsv
Prefix Description Notes
ac_ Platform Client ID Identifier for an auth code/client id.
acct_ Account ID Identifier for an Account object.
aliacc_ Alipay Account ID Identifier for an Alipay account.
ba_ Bank Account ID Identifier for a Bank Account object.
btok_ Bank Token ID Identifier for a Bank Token object.
card_ Card ID Identifier for a Card object.
cbtxn_ Customer Balance Transaction ID Identifier for a Customer Balance Transaction object.
ch_ Charge ID Identifier for a Charge object.
cn_ Credit Note ID Identifier for a Credit Note object.
@AmreeshTyagi
AmreeshTyagi / docker-compose-postgres-dev.yaml
Last active Dec 1, 2022
docker-compose-postgres-dev.yaml
View docker-compose-postgres-dev.yaml
version: '3.4'
services:
postgres:
image: postgres:12.2
ports:
- "5432:5432"
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
@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 Jan 19, 2023
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.