This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# vim:syntax=zsh | |
# vim:filetype=zsh | |
# file location: ${HOME}/.zlogin | |
# Note: This file is loaded AFTER ${HOME}/.zshrc | |
function recompile-zsh-scripts-as-reqd { | |
if [[ -s "${1}" && (! -s "${1}.zwc" || "${1}" -nt "${1}.zwc") ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# Note: This script is specific to my setup and not useful for others. | |
# You can run this script using this command: | |
# curl -L https://gist.githubusercontent.com/vraravam/698925e88a601d18a79f9c79edc33611/raw -o fresh-install-vijay.sh; chmod +x ./fresh-install-vijay.sh; ./fresh-install-vijay.sh | |
# These env vars are duplicated intentionally since this script would bootstrap the installation | |
USERNAME=${USERNAME:-$(whoami)} | |
PERSONAL_PROFILES_DIR=${PERSONAL_PROFILES_DIR:-"${HOME}/personal/${USERNAME}/profiles"} | |
PERSONAL_BIN_DIR=${PERSONAL_BIN_DIR:-"${HOME}/.bin"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# file location: Put this anywhere in the path. | |
# This script will capture (export) the settings or import the settings from the location specified in the $TARGET_DIR env var defined down below. You can back the files up to any cloud storage and retrieve into the new laptop to then get back all settings as per the original machine. The only word of caution is to use it with the same OS version (I haven't tried in any situations where the old and new machines had different OS versions - so I cannot guarantee if that might break the system in any way) | |
# A trick to find the name of the app: | |
# Run `defaults read` in an empty window of a terminal app, then use the search functionality to search for a known word related to that app (like eg app visible name, author, some setting that's unique to that app, etc). Once you find this, trace back to the parent in the printed JSON to then get the real unique name of the app where its settings are stored. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# vim:syntax=zsh | |
# vim:filetype=zsh | |
# file location: ${HOME}/.zshenv | |
# invoked by all invocations of Zsh, so we should keep it small and merely initialise necessary variables. | |
# https://blog.patshead.com/2011/04/improve-your-oh-my-zsh-startup-time-maybe.html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# To be able to use the mac touchbar for sudo command auth: | |
# edit the following file: /etc/pam.d/sudo | |
# and add the following line after the initial comment line: | |
# `auth sufficient pam_tid.so` | |
# This script also verifies that this line is added only once (ie skips if already present) | |
COUNT=`grep pam_tid /etc/pam.d/sudo | wc -l` | |
if [[ $COUNT -gt 0 ]]; then | |
echo "ALREADY PRESENT - Not adding again!!!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# vim:syntax=zsh | |
# vim:filetype=zsh | |
# file location: ${HOME}/.zshrc.custom | |
# Note: This file depends on the ${HOME}/.zshrc that is also shared for some shell functions | |
load_file_if_exists "${HOME}/.aliases" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file location: ${HOME}/.gitignore | |
!.bundle/config | |
!.keep | |
.~lock*# | |
.babel.json | |
.boxfuse/ | |
.bundle/cache | |
.cisco/vpn/log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Powerlevel10k configuration wizard on 2024-03-24 at 07:22 IST. | |
# Based on romkatv/powerlevel10k/config/p10k-rainbow.zsh, checksum 4117. | |
# Wizard options: nerdfont-v3 + powerline, small icons, rainbow, unicode, 12h time, | |
# angled separators, sharp heads, flat tails, 1 line, compact, many icons, concise, | |
# fluent, instant_prompt=quiet. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with powerline prompt style with colorful background. | |
# Type `p10k configure` to generate your own config based on it. | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# file location: ~/.gitconfig-template.inc | |
[user] | |
name = <your-name> | |
email = <your-email> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env zsh | |
# vim:syntax=zsh | |
# vim:filetype=zsh | |
# file location: ${HOME}/.zprofile | |
# Note: This file is loaded BEFORE ${HOME}/.zshrc | |
# login shell - only env vars and other functions that don't load anything should go in here | |
# This is a companion script for the `${HOME}/.zshrc` file |
NewerOlder