Skip to content

Instantly share code, notes, and snippets.

View AmreeshTyagi's full-sized avatar

Amreesh Tyagi AmreeshTyagi

  • India
View GitHub Profile
@AmreeshTyagi
AmreeshTyagi / install-development-tools.sh
Last active January 14, 2023 11:09
Install tools, gvm for golang, nvm for nodejs & docker on ubuntu development machine in one click
#!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 December 1, 2022 04:57
Fix to handle slack workspace open issue from browser to app on Linux.
#!/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 January 24, 2024 16:48
one click installation script for oh-my-zsh and powerlevel10k with autocomplete and highlighter plugin on ubuntu 20.04
#!/bin/bash
# Install zsh
sudo apt install zsh -y
# Show version
zsh --version
# Set zsh as default shell
chsh -s /usr/bin/zsh
@AmreeshTyagi
AmreeshTyagi / stripe-keys-and-ids.tsv
Created October 7, 2022 17:02 — forked from fnky/stripe-keys-and-ids.tsv
Stripe keys and IDs
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 December 1, 2022 04:58
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 November 20, 2019 06:18
netflix request visualizer - vizceral
#!/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
#!/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 September 9, 2019 10:03
redis web client & server for development & testing using redis-commander
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 January 31, 2020 06:19
Geek like mac & linux terminal using zsh
# 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 April 20, 2024 19:05
Exclude MySQL Workbench from dark theme with mojave Mac dark theme
#!/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.