- copy the file
commit-msgto.git/hooks/commit-msg - make sure your delete the sample file
.git/hooks/commit-msg.sample - Make commit msg executable.
chmod +x .git/hooks/commit-msg - Edit
commit-msgto better fit your development branch, commit regex and error message - Profit $$
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM | grep '\.jsx\?$') | |
| BIN_PATH="$(git rev-parse --show-toplevel)/node_modules/.bin" | |
| eslint() { | |
| ESLINT="$BIN_PATH/eslint" | |
| # Check for eslint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var sendEmailTasks = recipientList.Select(async recipient => | |
| { | |
| var message = new MailMessage { To = { recipient }, ... }; | |
| // instantiate a new client for each mail because of this: | |
| // http://www.codefrenzy.net/2012/01/30/how-asynchronous-is-smtpclient-sendasync/ | |
| using (var smtpClient = new SmtpClient()) | |
| { | |
| await smtpClient.SendMailAsync(message); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Javascript for finding latitude and longitude range boundaries. | |
| //Based on the excellent Java example by http://janmatuschek.de/LatitudeLongitudeBoundingCoordinates | |
| var GeoLocation = GeoLocation ? GeoLocation : { | |
| TO_RADIAN: 0.0174532925, | |
| TO_DEGREE: 57.2957795, | |
| EARTH_RADIUS: 6371.01, | |
| TO_MILE: 0.621371192, | |
| TO_KM: 1.609344, | |
| MIN_LAT: function() { return GeoLocation.degreeToRadian(-90) }, |