Skip to content

Instantly share code, notes, and snippets.

View vikytech's full-sized avatar
😎
Be You.

Vikhyath Choradia vikytech

😎
Be You.
View GitHub Profile
@vikytech
vikytech / .gitconfig
Last active May 28, 2021 12:40
Common git alias
[core]
autocrlf = input
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[alias]
st = status
@vikytech
vikytech / commit-msg
Last active January 16, 2018 12:19
Git commit message hook
#!/usr/bin/env ruby
$regex = /\A(\[(\w+)(\/(\w*))?(\/(\w*))?\])\s+(\[#\w{2,10}\])\s+(.*)$/i
message_file = ARGV[0]
message = File.read(message_file)
def red_background(text);"\e[41m#{text}\e[0m";end
# enforced short and crisp commit message
if message.length > 150
@vikytech
vikytech / pre-push
Last active January 13, 2018 09:30
Git pre push hook
#!/bin/bash
#Example
#cd ../performance-suite
#sh run.sh
#OUT=$?
#cd -
#if [ $OUT -eq 1 ]; then
# echo "\033[31m Gatling failed with exit code $OUT"
# echo "\033[41m Push Rejected."
@vikytech
vikytech / post-commit
Created June 3, 2020 22:46
Auto version increment of tag using git post-commit hook
#!/bin/bash
message=$(git log -1 --pretty=%B)
PATTERN="^(minor-fix|major-fix|patch): "
incrementVersion () {
version="$1"
major=0
minor=0
patch=0
@vikytech
vikytech / clean-my-mac.sh
Last active November 4, 2024 13:20
Script to clean the mac Almost like a new one
#!/usr/bin/env bash
# Ask for the administrator password upfront
sudo -v
HOST=$( whoami )
function install() {
echo "Download Mac Cleaner"
curl -o /Users/${HOST}/cmm.sh https://gist.githubusercontent.com/vikytech/f28c5480c1e1d8c2688981803b45a29a/raw/cleaner.sh
echo "Init Mac Cleanup"
@vikytech
vikytech / resume.json
Last active September 9, 2022 20:00
Update grade
{
"basics": {
"name": "Vikhyath Choradia",
"label": "{ Lead Consultant | Developer } at ThoughtWorks",
"image": "https://www.gravatar.com/avatar/9dee738b5448f55e2be90acc97ab9e61?s=180",
"email": "[email protected]",
"phone": "+917200494336",
"url": "",
"summary": "Explored in the banking, retail and health domain spanning across Mobile, Web and Data Platforms.\n I am a full stack Developer with about six years of experience in Agile methodologies. \n Worked in Java, R, Android with some smaller contributions in C, Golang etc. \n Apart from Application development, have also pursued skills in Mobile - apps & DevOps.",
"location": {
@vikytech
vikytech / DateUtil.java
Created February 13, 2021 05:56
Date Util to add working days for given date
import lombok.NoArgsConstructor;
import java.time.DayOfWeek;
import java.time.LocalDate;
import static java.time.DayOfWeek.SATURDAY;
import static java.time.DayOfWeek.SUNDAY;
import static lombok.AccessLevel.PRIVATE;
@NoArgsConstructor(access = PRIVATE)
@vikytech
vikytech / Brewfile
Last active April 15, 2024 18:03
Brew files
tap "adoptopenjdk/openjdk"
tap "aws/tap"
tap "dart-lang/dart"
tap "heroku/brew"
tap "homebrew/bundle"
tap "homebrew/cask-versions"
tap "homebrew/services"
tap "instantclienttap/instantclient"
tap "sass/sass"
brew "readline"
@vikytech
vikytech / author-filter.sh
Created June 20, 2021 16:08
Script to update author in commits
git filter-branch --env-filter '
WRONG_EMAIL="[email protected]"
NEW_NAME="New Name Value"
NEW_EMAIL="[email protected]"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
@vikytech
vikytech / .zshrc
Created September 6, 2021 08:15
Show execution time in zsh/bash
PROMPT='%@ ➜${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}%{$reset_color%}'