Skip to content

Instantly share code, notes, and snippets.

View sophea's full-sized avatar
💭
https://medium.com/@sopheamak

sophea sophea

💭
https://medium.com/@sopheamak
View GitHub Profile
@sophea
sophea / commit-msg
Created July 21, 2022 04:02
custom commit-msg
#!/usr/bin/env bash
#
# @author : Mak Sophea
# @version : 1.0#
# Create a regex for a conventional commit.
commit_types="(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|wip)"
convetional_commit_regex="^${commit_types}(\([a-z \-]+\))?!?: .+$"
# Get the commit message (the parameter we're given is just the path to the
# temporary file which holds the message).
#!/bin/sh
# This script will config git hook path into specific folder in your project. This script will invoked by maven build.
# @author : Mak Sophea
# @version : 1.0#
#
echo "config git hooksPath to .githooks folder for commit-msg and pre-push"
git config core.hooksPath .githooks
@sophea
sophea / pre-push
Created July 21, 2022 04:24
pre-push
#!/bin/sh
#
# Run the following command in the root of your project to install this pre-push hook:
# cp git-hooks/pre-push .git/hooks/pre-push; chmod 700 .git/hooks/pre-push
# @author : Mak Sophea
# @version : 1.0
#
# get the path to this script file
DIR=$(dirname "$0")
@sophea
sophea / TracerRequestFilter.java
Created September 2, 2022 06:41
tracer fitler
package com.manulife.ap.config;
import java.io.IOException;
import java.util.Arrays;
import java.util.List;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import lombok.extern.slf4j.Slf4j;
Option Explicit
'Main Function
Function SpellNumber(ByVal MyNumber)
Dim Dollars, Cents, Temp
Dim DecimalPlace, Count
ReDim Place(9) As String
Place(2) = " Thousand "
Place(3) = " Million "
Place(4) = " Billion "
Place(5) = " Trillion "