Skip to content

Instantly share code, notes, and snippets.

Remote debugging with VSCode

  • Note: If a step has already been done, it is not necessary to repeat it.

Setting up your remote ssh login.

  1. Open a terminal
  2. Generate your ssh public/private keypair using ssh-keygen. The program will prompt you for a passphrase. Leaving it blank and pressing enter will simplify the process. Note that it is important you do not share your private key.
$ ssh-keygen -t ed25519 -C "your_email@example.com"

Embedding Binary Blobs With GCC

Note: This article was originally found https://www.burtonini.com/blog/computers/ld-blobs-2007-07-13-15-50 but the blog is no longer available via normal means. It is replicated here to preserve the knowledge.

For a long time I've wanted to know how to embed binary blobs into executables. This would be most useful for files like Glade and and UI Manager definitions, which are required for a given program to work at all but either cannot be embedded as a string literal (Glade) or can be but is annoying (UI Manager). I finally asked the Interweb, and Daniel Jacobowitz replied with some pointers. It turns out that doing this is remarkable simple.

First, a caveat. This probably requires GNU ld, which may or may not be a deal breaker for many people.

First, create a data file. Let's call it foo.txt, and put some text in it.