Skip to content

Instantly share code, notes, and snippets.

@M1nhNV
M1nhNV / async-test.sh
Created November 29, 2023 01:39
Find all test case, open terminal and run script.
function getTotalScriptRunning {
processName="chromedriver"
processIds=$(pgrep "$processName")
count=$(echo "$processIds" | wc -w)
echo "$count"
}
function closeAllTerminal {
echo "Closed all terminal"
pgrep "Terminal" | xargs kill -15
@M1nhNV
M1nhNV / commit-code.sh
Last active January 24, 2024 02:04
commit code shell script
function CommitCode {
git add -A
git commit -m "$1"
echo -e "$1 ====> \033[32m commit succeed \033[m"
CURRENT_BRANCH=$2
TARGET_BRANCH=$3
DEVELOP_BRANCH='develop'
@M1nhNV
M1nhNV / exec.js
Last active October 16, 2020 08:47
Open Graph
import openGraph from './open-graph'
async addOpenGraphInfoToContent (content) {
return await openGraph(content)
}
@M1nhNV
M1nhNV / index.html
Created May 7, 2019 07:39
button hamburger
<div class="btn-menu-sp">
<span></span>
<span></span>
<span></span>
<span></span>
</div>
def quadraticEquation2(a, b, c)
a = a.to_f
b = b.to_f
c = c.to_f
if a == 0
x = b / c
return x
end