Skip to content

Instantly share code, notes, and snippets.

View mystor's full-sized avatar
💥
Breaking Web [===>--------]

Nika Layzell mystor

💥
Breaking Web [===>--------]
View GitHub Profile
@mystor
mystor / cstring_outparam
Created July 19, 2019 22:05
Example session getting cstring outparameter
(rr) p (nsCString*)malloc(sizeof(nsCString))
$65 = (nsCString *) 0x7f74904b3430
(rr) p $65->nsTString()
$66 = void
(rr) p uri->GetSpec(*$65)
$67 = nsresult::NS_OK
(rr) p $65->get()
$68 = 0x7f748a61c50c "about:blank"
@mystor
mystor / tracing-core.h
Created August 20, 2020 18:33
RFC: tracing-core C FFI proposal
#ifndef tracing_core_h
#define tracing_core_h
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
@mystor
mystor / config.toml
Last active May 9, 2026 18:33
jj git-index diff editor
# To be added to .config/jj/config.toml
# A diff editor --tool to automatically select the contents of the git index.
[merge-tools.git-index]
diff-args = [] # disable using as a diff viewer
edit-args = ["--work-tree=$output", "checkout", "--", "."]
program = "git"
# Can be used with jj commit, split, and squash
[aliases]
@mystor
mystor / config.toml
Last active May 28, 2026 09:43
jj git-index diff editor (v2)
# This diff editor uses the state of the git index (staged files) to edit the diff.
# This gives an effect similar to `git commit`, which can be useful due to tooling
# often being high-quality for using the git index to split up changes.
#
# This tool is designed to be used with the commit, split, and squash commands.
# This is made easier with some aliases. A custom merge-editor definition is unneeded.
#
# LIMITATIONS:
# 1. jj doesn't allow a diff editor to edit files which are only changed in the index,
# and unchanged in the working copy, those will be discarded.