Skip to content

Instantly share code, notes, and snippets.

View CalvinAllen's full-sized avatar

Calvin A. Allen CalvinAllen

  • 06:34 (UTC -04:00)
View GitHub Profile
@CalvinAllen
CalvinAllen / pre-commit
Created March 12, 2022 03:04 — forked from simonauner/pre-commit
Format c# with dotnet-format with pre-commit hook
#!/bin/sh
# Modified from https://gist.github.com/EtherZa/581d9276336353838b2c939f9554d479
#
# This script finds the files that are about to be committed,
# and runs dotnet format on them before adding them back to staging
#
# install dotnet-format: dotnet tool install -g dotnet-format
# make sure installed dotnet tools are on your path:
# export PATH="$PATH:$HOME/.dotnet/tools/"
# copy to .git/hooks/pre-commit and make executable
@CalvinAllen
CalvinAllen / script.sh
Created November 10, 2020 19:03 — forked from vielhuber/script.sh
PostgreSQL: Backup and restore pg_dump with password on command line #sql
# best practice: linux
nano ~/.pgpass
*:5432:*:username:password
chmod 0600 ~/.pgpass
# best practice: windows
edit %APPDATA%\postgresql\pgpass.conf
*:5432:*:username:password
# linux