Skip to content

Instantly share code, notes, and snippets.

View aravindkumarsvg's full-sized avatar

Aravind Kumar SVG aravindkumarsvg

View GitHub Profile
@aravindkumarsvg
aravindkumarsvg / git-prompt.sh
Last active July 19, 2017 02:26
Git prompt for Bash shell
# Reference https://gist.github.com/justintv/168835
# Used in Elementery OS terminal
# Add to ~/.bashrc file
# Sets the Git branch name in the PS1 prompt
function git_prompt_setter() {
local RED="\\\[\\\033[1;31m\\\]"
local NORMAL="\\\[\\\033[00m\\\]"
# Modifies the existing prompt and adds the git branch name
PS1=$(echo $PS1 | sed 's/\(\\\?[$#]\)\s*$/'"$RED"'\$\(__git_ps1\)'"$NORMAL"'\1 / ' )
@aravindkumarsvg
aravindkumarsvg / operate-chefdk.sh
Last active June 1, 2021 11:40
Shell Script to install, uninstall ChefDK
#!/bin/bash
# =============================================
# Installs and Uninstalls the ChefDK
# =============================================
#
# -i Install ChefDK
# -u Uninstall ChefDK
# -c Verify ChefDK
# -h Show Help
@aravindkumarsvg
aravindkumarsvg / set-prompt.ps1
Last active April 30, 2024 23:14
Sets the git branch name in the powershell prompt like git bash
# Add this function to the Profile script
# Use the following command to generate the Profile script
#
# $profileTest = Test-Path $PROFILE
# if ($profileTest -eq $FALSE) {
# New-Item $PROFILE -Type File
# }
#
# OR
#