Skip to content

Instantly share code, notes, and snippets.

View tiendatleo's full-sized avatar

Nguyen Tien Dat tiendatleo

  • Ha Noi, Viet Nam.
View GitHub Profile
@tiendatleo
tiendatleo / ParseFloat
Last active June 30, 2022 07:22
[JS] Convert number with such a number of decimals
function ParseFloat(str,val) {
str = str.toString();
str = str.slice(0, (str.indexOf(".")) + val + 1);
return Number(str);
}
@tiendatleo
tiendatleo / merge-ignore.cmd
Created May 10, 2022 11:52
[Git] Commands for ignoring a file when merge
git merge --no-ff --no-commit <merge-branch>
git reset HEAD myfile.txt
git checkout -- myfile.txt
git commit -m "merged <merge-branch>"