Skip to content

Instantly share code, notes, and snippets.

@JOHNJNK
JOHNJNK / .zlogin
Created March 9, 2024 05:39 — forked from jai-charan/.zlogin
~/.zlogin
#!/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
@JOHNJNK
JOHNJNK / .zprofile
Created March 9, 2024 05:39 — forked from jai-charan/.zprofile
This is a companion script for the `~/.zshrc` file
#!/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
# file location: ~/.brewfile
# This file is used along with the `brew bundle` command to ensure that required packages and apps are installed.
# Also can be used to ensure that any package/apps that were installed as experimentation are uninstalled from the system.
# If you are starting such a file on a machine where you have already installed some apps using brew, then use `brew bundle dump` to create this file and avoid starting from scratch
# If you have also installed some vscode plugins already (manually), then you can use the following command to export that list:
# code --list-extensions
# For a more detailed explanation of the philosophy/reasoning behind this file, please see https://openfolder.sh/macos-migrations-with-brewfile
@JOHNJNK
JOHNJNK / fresh-install-of-osx.sh
Created March 9, 2024 05:33 — forked from jai-charan/fresh-install-of-osx.sh
Steps to get "up and running" with new Mac OSX
#!/usr/bin/env zsh
# This script can be used to setup a macos machine based on Vijay's configurations. As of now, this script is idempotent and will restore your local setup to the same state if run multiple times.
# If you have the same files already present, it will prompt you whether to override or not
# file location: <anywhere> (just need to invoke it from that location)
# You can run this script using this command:
# curl -L https://gist.github.com/jai-charan/12d887690800951290ebb3f78cd37e31/raw/ -o fresh-install.sh; chmod +x ./fresh-install.sh; ./fresh-install.sh
# BEFORE STARTING TO RUN THIS SCRIPT (for the first time on a new machine)
@JOHNJNK
JOHNJNK / Brewfile
Last active July 27, 2023 11:49
~/Brewfile
# file location: ~/Brewfile
# This file is used along with the `brew bundle` command to ensure that required packages and apps are installed.
# Also can be used to ensure that any package/apps that were installed as experimentation are uninstalled from the system.
# If you are starting such a file on a machine where you have already installed some apps using brew, then use `brew bundle dump` to create this file and avoid starting from scratch
# For a more detailed explanation of the philosophy/reasoning behind this file, please see https://openfolder.sh/macos-migrations-with-brewfile
# List all casks that are outdated (and which have version marked as 'latest')
# alias bcg='brew outdated --greedy'
@JOHNJNK
JOHNJNK / old-fresh-install-of-osx.sh
Last active March 9, 2024 05:33 — forked from vraravam/fresh-install-of-osx.sh
Steps to get "up and running" with new Mac OSX
#!/usr/bin/env bash
# This script can be used to setup a macos machine based on Vijay's configurations. As of now, this script is idempotent and will restore your local setup to the same state if run multiple times.
# If you have the same files already present, it will prompt you whether to override or not
# file location: <anywhere> (just need to invoke it from that location)
# You can run this script using this command:
# curl -L https://gist.github.com/JOHNJNK/1b933af3b72d9beff4cbfdfc849c2ab6/raw -o fresh-install.sh; chmod +x ./fresh-install.sh; ./fresh-install.sh
USERNAME=${USERNAME:-$(whoami)}