While maintaining a long-lived production repository, I noticed an unusually large .git/objects/pack file consuming hundreds of MBs.
This was affecting cloning speed, CI performance, and overall repository health.
This guide provides a clean and safe method to install Python 3.12 on Ubuntu 20.04 running under WSL2, without touching the system Python.
Linux distros normally have a Python version tied to the distro and used for various admin scripts. You should not expect to follow the latest releases of Python. And don't try to force change it because you could break your OS. If you need newer Python versions for your work, install it in user space.
Linux 20.04 come with python 3.8 which not supported natively to latest version of python (ex. 3.12.x), so by using pyenv will help you install other version of python without touching OS system, and it won't break your system.
One morning, I had already finished developing a feature on a separate branch. Before creating a Pull Request (PR), I merged main into my feature branch to make sure everything was up to date.
After that, I switched to the main branch and ran:
git pull| if you see no listed emulator when adb devices, but the emulator already run. You can connect it through TCP by command adb connect 127.0.0.1:21503. | |
| But this only for MEMU, because port 21503, 21504, 21505. To make sure the port running MEMU emulator, can use `netstat -aon | findstr 215`. | |
| Will give you the listed port use on running MEMU, like | |
| PS C:\> netstat -aon | findstr 215 | |
| TCP 0.0.0.0:21503 0.0.0.0:0 LISTENING 17000 | |
| TCP 127.0.0.1:21503 127.0.0.1:55945 ESTABLISHED 17000 | |
| TCP 127.0.0.1:55945 127.0.0.1:21503 ESTABLISHED 26792 | |
| After connect using adb connect 217.0.0.1:21503, can make sure adb device |
| Debounce based on https://medium.com/swlh/using-a-debounced-callback-in-react-ade57d31ca6b |
| let's say got string encoded URL like this | |
| 'pData%5B0%5D%5Bvalue%5D=&pData%5B0%5D%5Bname%5D=MultiAllowanceDetailOriginalEmployeeMultiAllowanceRecordList&pData%5B1%5D%5Bvalue%5D=MultiAllowanceDetail&pData%5B1%5D%5Bname%5D=MultiAllowanceDetailItemCode&pData%5B2%5D%5Bvalue%5D=true&pData%5B2%5D%5Bname%5D=MultiAllowanceDetailHasMultipleRecord&pData%5B3%5D%5Bvalue%5D=00000000-0000-0000-0000-000000000000&pData%5B3%5D%5Bname%5D=MultiAllowanceDetailRecordID&pData%5B4%5D%5Bvalue%5D=787b382e-bf20-f011-bad0-06d40d699a17&pData%5B4%5D%5Bname%5D=MultiAllowanceDetailParentRecordID&pData%5B5%5D%5Bvalue%5D=A&pData%5B5%5D%5Bname%5D=MultiAllowanceDetailDataChangeType&pData%5B6%5D%5Bvalue%5D=%7B%22OriginalEmployeeMultiAllowanceRecordList%22%3A%5B%7B%22RecordID%22%3A%22d524d01f-1983-e811-99c4-f430b99edb31%22%2C%22TargetRecordID%22%3A%22d524d01f-1983-e811-99c4-f430b99edb31%22%2C%22ParentRecordID%22%3A%2200000000-0000-0000-0000-000000000000%22%2C%22AllowanceCode%22%3A%22%23AR_BASC%22%2C%22DateStart%22%3A%222018-02-23T00%3A00%3A00%2 |
I just download the project folder from website, but it the filename being duplicate which like main.ts and main.ts.Identifier. So instead of delete one-by-one, I just listing all the file then delete directly.
- save in sh extension
#!/bin/bash dir=${1:-.} find "dir" -type f -name "*.Identifier" -exec rm -f {} ;
- done finish, run with command
sh .sh /path/of/project