Skip to content

Instantly share code, notes, and snippets.

@cadebward
cadebward / rename_phoenix_project.sh
Last active February 9, 2023 19:24 — forked from krystofbe/rename_phoenix_project.sh
rename a phoenix 1.3 project
#!/bin/bash
set -e
CURRENT_NAME="WatchParty"
CURRENT_OTP="watch-party"
NEW_NAME="Chat"
NEW_OTP="chat"
@cadebward
cadebward / pre-commit-prettier-eslint
Last active May 10, 2017 15:20 — forked from linhmtran168/pre-commit-eslint
Pre-commit hook to format using prettier-eslint
#!/bin/sh
#
# Place in `.git/hooks/pre-commit`
# Make it executable: `chmod +x .git/hooks/pre-commit`
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep "\(.js\)\{1\}$")
if [[ "$STAGED_FILES" = "" ]]; then
echo "\nNo JS files to format.\n"
exit 0