home posts projects snippets bookmarks
  • Kill port application on Mac
    sudo kill -9 $(sudo lsof -t -i :4000)
    Expand

  • Looping go run executions with seq | xargs
    seq 10 | xargs -n1 go run *.go
    Expand

  • Split huge PR into smaller PR

    Step by Step

    1. reset the data changes to un-stashed changes
    2. re-commit the file
    3. push to split branch

    Reset the data changes to un-stashed changes.

    1. You need to checkout to specific branch first; for example; huge-branch
    2. Run this command
    git reset --soft master
    1. Do commit as usual and push to different branch

    Or complete script

    git checkout migrate-to-firebase
    git reset --soft develop
    git restore --staged .
    Expand

Ko-fi Support me on Ko-fi © 2025 Ade Firman F.
All content of this website is distributed under the CC BY-NC license.