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 / GoogleSheetToGoogleForm.gs
Created May 31, 2023 11:37
Google app script to convert google sheet to google form
function convertSheetToForm() {
var spreadsheet = SpreadsheetApp.getActiveSpreadsheet();
var sheet = spreadsheet.getActiveSheet();
var data = sheet.getDataRange().getValues();
var form = FormApp.create(sheet.getName()).setTitle(sheet.getName());
const items = form.getItems();
items.forEach(function (item) {
form.deleteItem(item.getIndex());
});
@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%}'
@vikytech
vikytech / author-filter.sh
Created June 20, 2021 16:08
Script to update author in commits
git filter-branch --env-filter '
WRONG_EMAIL="wrong@example.com"
NEW_NAME="New Name Value"
NEW_EMAIL="correct@example.com"
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ]
then
export GIT_COMMITTER_NAME="$NEW_NAME"
export GIT_COMMITTER_EMAIL="$NEW_EMAIL"
fi
@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 / 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 / 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": "famous.vikhyath@gmail.com",
"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 / clean-my-mac.sh
Last active April 30, 2024 08:22
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 / 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 / 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 / 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