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
@fnky
fnky / stripe-keys-and-ids.tsv
Last active May 5, 2024 19:31
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 / 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.
@superseb
superseb / extended-cleanup-rancher2.sh
Last active March 13, 2024 09:22
Extended Rancher 2 cleanup (backup your data, use at your own risk)
#!/bin/sh
# Backup your data
# Use at your own risk
# Usage ./extended-cleanup-rancher2.sh
# Include clearing all iptables: ./extended-cleanup-rancher2.sh flush
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"
@duluca
duluca / npm-scripts-for-docker.md
Last active April 8, 2024 09:52
npm scripts for Docker

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.

How to Use

npm i -g mrm-task-npm-docker
npx mrm npm-docker

Contribute

Here's the code repository https://github.com/expertly-simple/mrm-task-npm-docker

@snappytux
snappytux / get-token
Created April 23, 2017 13:59
docker swarm get token
docker swarm join-token --rotate manager
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 7, 2024 06:03
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname