Skip to content

Instantly share code, notes, and snippets.

View longtth's full-sized avatar

Long NguyenX longtth

View GitHub Profile
@longtth
longtth / unLFS.py
Created September 5, 2023 13:25 — forked from tigerhawkvok/unLFS.py
Remove LFS from a directory
#!python3
"""
Remove LFS tracked files and change them to normal git
Python 3.8+, native code
For Python <= 3.7, move the Literal and Final imports from "typing" to third-party module "typing_extensions"
@author Philip Kahn
@url https://gist.github.com/tigerhawkvok/adb7905a2423312f237da1953d6a8eeb
@longtth
longtth / recommend-calis-fitness-longnx.md
Last active May 20, 2023 09:48
Tổng hợp các kênh calis / fitness đáng xem

Lời nói đầu

tập calis (caslisthenic / street workout) và tập tạ (body building) về bản chất không khác biệt, đều là tạo gánh nặng lên cơ bắp, và cơ thể con người thì có chừng đó nhóm cơ mà thôi, nên một số động tác sẽ có cùng mục tiêu

tập tạ thì thường là hội hướng tới "to" (phì đại cơ bắp - muscle hypertrophy), còn tập calis thì khó mà to được, nên thường hướng về mấy món "ảo tung chảo" như front lever, planche v.v.

tập tạ hay tập calis về bản chất đều là tạo gánh nặng cho cơ bắp, nên để "hiệu quả" (to/mạnh/dẻo dai/múa skill ảo) thì phải đảm bảo 3 yếu tố

  1. ăn đủ (đủ protein, carb, fat, và vitamin)
  2. vác nặng
  3. ngủ nhiều (8h/đêm)
@longtth
longtth / count-loc-per-user.sh
Created May 2, 2023 16:57
count line of code per user
git ls-files | while read f; do git blame --line-porcelain $f | grep '^author '; done | sort -f | uniq -ic | sort -n
# this doesn't include xargs
@longtth
longtth / Count Code lines
Created May 2, 2023 16:56 — forked from amitchhajer/Count Code lines
Count number of code lines in git repository per user
git ls-files -z | xargs -0n1 git blame -w | perl -n -e '/^.*\((.*?)\s*[\d]{4}/; print $1,"\n"' | sort -f | uniq -c | sort -n
@longtth
longtth / git-branch-in-pwsh-with-post-git.md
Created February 17, 2023 20:35
Show Git branch in Powershell with posh-git
  1. install posh-git
  2. thêm mấy cái lệnh này vào file %PROFILE
Import-Module posh-git
$GitPromptSettings.DefaultPromptPrefix.Text = '$(Get-Date -f "MM-dd HH:mm:ss") '
$GitPromptSettings.DefaultPromptPrefix.ForegroundColor = [ConsoleColor]::Magenta
$GitPromptSettings.DefaultPromptPath.ForegroundColor = 0xFFA500
$GitPromptSettings.DefaultPromptBeforeSuffix.Text = '`n'
@longtth
longtth / sample-smart-objective.txt
Last active December 16, 2022 14:42
Sample SMART objective
measurable : đo đạc được.
attainable : có thể hoàn thành được.
relevant : có liên quan
Mục tiêu: release tính năng user management vào tháng 1/2023
Phân tích mục tiêu:
Specific: release tính năng user management
Mearsurable: tính năng user management
@longtth
longtth / agile-scrum-plan-sample.txt
Created December 16, 2022 14:36
Agile/Scrum plan sample
Product Vision
trở thành hệ thống giám sát defect hàng đầu việt nam
Product Roadmap
phase 1
...
phase 2.
...
...
@longtth
longtth / wbs-sample.txt
Last active December 16, 2022 15:01
WBS sample
1. initiating
...
2. planning
...
3. executing (include monitoring & controlling)
3.1. Analysis
3.1.1. requirement Elicitation
3.1.2. requirement analysis
3.1.3 requirement specification
3.1.3.1 Defect Tracking & Report
@longtth
longtth / start-stop-spring-boot-app-linux.md
Created November 11, 2022 15:28
bash start / stop spring boot app in linux server
@longtth
longtth / mRemoteNG-key.md
Created October 16, 2022 18:16
mRemoteNG dùng key file thay vì username/password

để dùng mRemoteNG với key files (pem thì convert thành ppk trc) thì có thể chơi chiêu load vào pageant.exe sau đó thì trong mremoteNG cứ click đúp là Get Go thôi chứ không cần phải config gì nữa cả.

idea from here:

http://forum.mremoteng.org/viewtopic.php?f=3&amp;t=1701