- copy the file
commit-msg
to.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-msg
to better fit your development branch, commit regex and error message - Profit $$
This file contains 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
using System; | |
using Newtonsoft.Json; | |
namespace JsonConverters | |
{ | |
/// <summary> | |
/// Handles converting JSON string values into a C# boolean data type. | |
/// </summary> | |
public class BooleanJsonConverter : JsonConverter | |
{ |
This file contains 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
DO $$ | |
BEGIN | |
IF NOT EXISTS(SELECT * | |
FROM information_schema.columns | |
WHERE table_name='my_table' and column_name='my_column') | |
THEN | |
ALTER TABLE "public"."my_table" RENAME COLUMN "my_column" TO "my_new_column"; | |
END IF; | |
END $$; |
This file contains 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
const spinWheel = useCallback(() => { | |
// Receives the winner prop and search for his position in the spinner bets array | |
const order = [8, 1, 14, 2, 13, 3, 12, 4, 0, 11, 5, 10, 6, 9, 7]; | |
const position = order.indexOf(winner); | |
// Determine position where to land | |
const rows = 12; | |
const card = 80 + 2 * 2; | |
let landingPosition = rows * 15 * card + position * card; |