Skip to content

Instantly share code, notes, and snippets.

@vinayakg
vinayakg / staying-sane-using-multiple-git-accounts.md
Created May 16, 2020 11:40
Editing for staying-sane-using-multiple-git-accounts.md

The other day, I wanted to work with many git accounts on my laptop and I felt it was not easy and required many steps. I had to understood how things work actually when you use git via ssh and the role of ssh-agent. Also had to refer many articles and connect dots from them to be able to make it work for me. I felt I should document these steps so it can help other folks use this and save time and possible pain :-)

If you don't have the need to use many git accounts - am sure there will be learnings for you on how things actually work. So stay with me and keep reading

In case you have an existing git setup and looking to to start fresh, head to Troubleshoot section

@vinayakg
vinayakg / gist:b20ac4b67e3ba3f196ed86c1fc18d470
Created July 19, 2020 09:00
Script for deployment - with git export implemented
#!/bin/sh
if [ -z "$1" ]
then
echo "Usage deploybuild.sh gitreponame branch"
exit 0
fi
if [ -z "$2" ]
then
echo "Usage deploybuild.sh gitreponame branch"
#!/bin/sh
gituser="";
curl --user $gituser https://api.bitbucket.org/2.0/repositories/$ORGNAME\?pagelen\=20 | jq '.values[] |.links.clone[1].href' > repo.out
filename="repo.out"
while read -r line; do
name="$line"
git clone $name
reponame=$(echo $name | awk -F/ '{ print $2 }' | cut -d . -f1)
@vinayakg
vinayakg / cloudSettings
Last active March 2, 2022 12:14
Visual Studio Code Settings Sync
{"lastUpload":"2021-12-12T18:16:37.310Z","extensionVersion":"v3.4.3"}
@vinayakg
vinayakg / install-m1.rb
Last active March 2, 2022 12:15 — forked from skyl/install.rb
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# SET YOUR_HOME TO THE ABSOLUTE PATH OF YOUR HOME DIRECTORY
# chmod +x install.rb
# ./install.rb
if ARGV.length < 1
puts "Too few arguments, please include the folder name to install your packages there"
exit
end
@vinayakg
vinayakg / brew-cask-m1.txt
Last active July 14, 2024 12:06
Brew cask packages
android-ndk
android-platform-tools
android-sdk
android-studio
appcleaner
arduino
cloudflare-warp
coteditor
dbeaver-community
docker
@vinayakg
vinayakg / .zshrc
Last active November 25, 2020 21:49
ZSH - Zshell startup script
export ZSH="/Users/vg/.oh-my-zsh"
ZSH_THEME="robbyrussell"
POWERLEVEL9K_MODE='cascadia-code'
source $ZSH/oh-my-zsh.sh
plugins=(git colorize)
source "$HOME/.oh-my-zsh/plugins/vundle/vundle.plugin.zsh"
source "$HOME/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
source "$HOME/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
source "$HOME/.oh-my-zsh/plugins/colored-man-pages/colored-man-pages.plugin.zsh"
source "$HOME/.oh-my-zsh/plugins/brew/brew.plugin.zsh"
@vinayakg
vinayakg / NOTES.md
Last active August 24, 2020 12:20
React Native Mobile App

Additional Notes

  1. Feel free to reach out to us via email (tech-hr@eduvanz.com or hr@eduvanz.com) in case of questions.
  2. Please submit the solution via Github. If you're not a Github user or if you're using a private repo, bundle your Git repo and include it as an email attachment.
  3. Bonus points for unit tests and coverage.
  4. Bonus points for good commit messages.
  5. Bonus points for proper TypeScript usage (and by proper TS, we mean not just slapping <any>).
  6. Bonus points if graphs are used for the reports.
  7. Bonus points for "better UX" — however you interpret & showcase it.
@vinayakg
vinayakg / NOTES.md
Last active October 12, 2020 04:30
React JS Website

Additional Notes

  1. Feel free to reach out to us via email (tech-hr@eduvanz.com or hr@eduvanz.com) in case of questions.
  2. Please submit the solution via Github. If you're not a Github user or if you're using a private repo, bundle your Git repo and include it as an email attachment.
  3. Bonus points for unit tests and coverage.
  4. Bonus points for good commit messages.
  5. Bonus points for proper TypeScript usage.
  6. Bonus points if graphs are used for the reports.
  7. Bonus points for "better UX" — however you interpret & showcase it.
@vinayakg
vinayakg / opt_lepton.sh
Created September 13, 2020 12:29
script for lepton rename
#!/bin/bash
if [ -d $1 ]; then
cd $1
else
echo $1 not found
exit 1
fi
find . -name "*.jpg" | while read f;