Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am doriancodes on github.
  • I am doriancodes (https://keybase.io/doriancodes) on keybase.
  • I have a public key ASBnVQQJI1Hdy0IA0wuwV2_WYBfJN2UNjLN6yeSCd8Wccgo

To claim this, I am signing this object:

/**
*
* LENS
*
*
*/
case class Street(name: String, number: Int)
case class Address(country: String, city: String, street: Street)
@doriancodes
doriancodes / pre-commit-hook-install.sh
Last active September 18, 2018 13:18
scalafmt and the git pre-commit hook inspired by https://gist.github.com/cvogt/2676ed6c6d1abafa3d6a
#!/bin/sh
echo "$(tput setaf 3)* installing scalafmt library... $(tput sgr 0)"
brew install --HEAD olafurpg/scalafmt/scalafmt
touch ../.git/hooks/pre-commit #create the file if not exist
rm ../.git/hooks/pre-commit #delete the file
ln -s pre-commit-hook.sh ../.git/hooks/pre-commit #create a file link
echo "$(tput setaf 3)* link to ../.git/hooks/pre-commit successfully created.$(tput sgr 0)"
cp pre-commit-hook.sh ../.git/hooks/pre-commit-hook.sh
echo "$(tput setaf 3)* pre-commit-hook successfully installed.$(tput sgr 0)"