Skip to content

Instantly share code, notes, and snippets.

View mikehazell's full-sized avatar

Mike mikehazell

  • Sydney, Australia
View GitHub Profile
@mikehazell
mikehazell / config.sh
Last active October 27, 2025 02:37
Create, init and run a postgres database for your development environment
########################
# Config
########################
dbUser="postgres"
dbPass="postgres"
dbName='app-name'
folderBase="./data"
dumpFolder="./dump"
# schemaName="public" # -- not needed for public
@mikehazell
mikehazell / mongo-use.sh
Created January 22, 2019 01:52
Shell Script to switch between homebrew Mongo DB versions
# Switching from v3.4 to latest
select_lastest() {
# Stop and unlink 3.4
brew services stop [email protected]
brew unlink [email protected]
# Link last version
brew unlink mongodb && brew link mongodb
# Update mongo logs and database paths
@mikehazell
mikehazell / robbyrussell.zsh_theme
Last active September 30, 2025 09:21
oh-my-zsh Default Theme plus Node version info
# oh-my-zsh Theme
# Default robbyrussell theme with node version info.
# Installation: place this file in .oh-my-zsh/custom/themes/robbyrussell.zsh_theme
function node_prompt_version {
if which node &> /dev/null; then
echo "%{$fg_bold[blue]%}node(%{$fg[red]%}$(node -v)%{$fg[blue]%}) %{$reset_color%}"
fi
}