Skip to content

Instantly share code, notes, and snippets.

@natersoz
natersoz / git_rebase_and_differencing.md
Last active May 5, 2020 17:50
git rebasing and comparisons

Differencing a branch after a Rebase

Let’s say you have a branch. The copy on the server 'origin is up to date with your local branch.
You rebase to master: 

    git rebase master
        
(of course it would be best to do so if your local master is up to date with origin master)

Now, you want to know what changed - only for the working set of files in your branch - when you did the rebase.

@natersoz
natersoz / JLinkGDBServer_Multiple_Sessions.md
Last active February 4, 2023 01:12
Mutiple Debug Sessions with JLinkGDBServer

Running Multiple JLinkGDBServer Sessions

The documentation for the JLinkGDBServer command line options is incomplete. Getting multiple debug sessions running using JLinkGDBServer is a trial/error/google and repeat process. Here are bare-bones instructions for getting multiple JLinkGDBServer sessions over USB running on an OSX host. An ethernet configuration will differ. These instructions should work for Linux and Windows as well but have not been tested in those environments.

Get the debug interface serial number

The serial number is printed whenever the JLinkGDBServer program is started and it attaches to a SEGGER JLink debug interface (either a USB connected pod or on-boad SWO interface). Attach only one of the units for debugging and run the JLinkGDBServer program. The serial number of the JLink debug interface is a 9 digit number prefixed with the text S/N:.

The Serial Number may also be printed on the debug

reptyr: Resume running processes in screen or tmux

You have started a process and want to control it using tmux. This will require reptyr to be installed on your system. :: Background the process with keypress CTRL-Z $ bg # resume the process in the background $ jobs -l # display running background jobs $ disown <job-no> # disown your running job(s)

@natersoz
natersoz / gdb_notes.rst
Last active October 7, 2018 23:12
gdb notes
@natersoz
natersoz / git_usage_notes.rst
Last active October 20, 2023 16:57
git usage notes

Git Usage Notes

Stuff that I'm always having to look up.

git rebase

When working in your branch and you want to bring it up to date with main: :

$ git rebase -s recursive -X ours main      # Resolves conflicts in favor of main.