Skip to content

Instantly share code, notes, and snippets.

@jtacoma
jtacoma / .bazelrc
Last active January 27, 2025 00:59
Polyglot builds with Bazel and Nix
common --enable_bzlmod
build --host_platform=@rules_nixpkgs_core//platforms:host
@jtacoma
jtacoma / introspect.cpp
Created August 1, 2021 17:38
A way to implement introspection for C++ types allowing easier decoupling from data format and serialization libraries
// Copyright 2021 Google LLC
// SPDX-License-Identifier: Apache-2.0
#include <cstddef> // ptrdiff_t
#include <string>
#include <tuple>
#include <utility>
namespace introspect {

Keybase proof

I hereby claim:

  • I am jtacoma on github.
  • I am jtacoma (https://keybase.io/jtacoma) on keybase.
  • I have a public key ASC328gnRGwyuwCVfmYaO19xO7hgmtm_OLHZqTm9ip_x8Qo

To claim this, I am signing this object:

@jtacoma
jtacoma / main_test.go
Last active August 17, 2019 17:38
Some difficulty with BadgerDB
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"os"
"testing"
@jtacoma
jtacoma / openpgp.txt
Created September 4, 2017 17:06
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:079a07c864f3d51cde5830a00e0f131e6ff70348]
@jtacoma
jtacoma / openpgp.txt
Created September 4, 2017 17:06
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:079a07c864f3d51cde5830a00e0f131e6ff70348]
@jtacoma
jtacoma / openpgp.txt
Created September 4, 2017 17:05
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:079a07c864f3d51cde5830a00e0f131e6ff70348]
@jtacoma
jtacoma / openpgp.txt
Created September 4, 2017 17:05
OpenKeychain Linked Identity
This Gist confirms the Linked Identity in my OpenPGP key, and links it to this GitHub account.
Token for proof:
[Verifying my OpenPGP key: openpgp4fpr:079a07c864f3d51cde5830a00e0f131e6ff70348]
@jtacoma
jtacoma / README.md
Last active August 29, 2015 14:13
pushenv

pushenv

pushenv helps update your Bash or Zsh environment for compilation and linking with dependencies that are built and installed to different paths.

Installation

source pushenv.sh

@jtacoma
jtacoma / index.md
Created October 23, 2014 16:39
Dialogues don't have menu bars

A dialogue box doesn't have menu bars, tool bars, tool strips, ribbons, or status bars. A dialogue box has one or more buttons near the bottom. Clicking on a button that is labelled Ok, Cancel, Yes, or No normally closes the dialogue but this can sometimes be circumvented e.g. by an error about missing or malformed data, or by saying No in response to a subsequent dialogue that asks, "Are you sure?" Some authorities distinguish dialogue boxes from message boxes by the latter's inability to receive any user input beyond which button was pressed, but they are otherwise the same.

  • A dialogue box cannot be maximized or minimized.
  • Closing a dialogue box has the same effect as clicking its Cancel button if the dialogue box has a Cancel button, otherwise the No button. If a dialogue box has no such button, it should not be possible to close the dialogue box without clicking a button.
  • When the keyboard focus is on a dialogue box that has a Cancel button, pressing the Esc key is equivale