Skip to content

Instantly share code, notes, and snippets.

View mwoehlke-kitware's full-sized avatar

Matthew Woehlke mwoehlke-kitware

View GitHub Profile
@mwoehlke-kitware
mwoehlke-kitware / README
Last active August 29, 2023 19:11
Real CPS examples
These are hand-written examples of CPS package specifications for select real
libraries. For readability and to emphasize that we have no established a
definite intended de facto transport, they are shown here in "YAML".
(However, we do not certify that these are *valid* YAML, or are free of errors.
The intention is to give something that is human readable, more along the lines
of "pseudocode" rather than actual code.)
YAML *is not* going to be the canonical transport format. Technically, CPS does
not require a specific transport, although for practical reasons, we expect a de
facto standard to exist. Right now, it is very likely that this will be JSON.
@mwoehlke-kitware
mwoehlke-kitware / README
Last active May 24, 2022 19:14
Homebrew (macOS) for multiple users
Homebrew isn't meant to be run by multiple users, but depending on how you've
installed it, this may be permitted by default. Actually doing so, however, can
get you into messes where only certain users can perform certain operations,
requiring `chown` to clean up the resulting mess.
These tools should help set up homebrew for use on a multi-user system. To use,
compile the C program using your favorite compiler (e.g. `clang`). You can name
it anything, but I happen to like `$HOMEBREW_PREFIX/bin/brew-setuid`. After
compiling it, you must:
@mwoehlke-kitware
mwoehlke-kitware / .uncrustify.cfg
Last active December 10, 2020 14:42
Uncrustify configuration for KWIVER
# kate: hl Uncrustify Configuration
using 0.69
# General options
newlines = auto
input_tab_size = 8
string_escape_char = 92
string_escape_char2 = 0
string_replace_tab_chars = false
@mwoehlke-kitware
mwoehlke-kitware / foo.cpp
Created September 5, 2019 17:14
Exporting explicit template instantiations (demo)
template <typename T>
void foo<T>::bar()
{
// ...
}
@mwoehlke-kitware
mwoehlke-kitware / embedded_image_writer.pipe
Created December 6, 2018 17:38
Sample image writer embedded pipeline for WAMI Viewer
config _pipeline:_edge
:capacity 10
process in_adapt
:: input_adapter
process out_adapt
:: output_adapter
process output
@mwoehlke-kitware
mwoehlke-kitware / lcmparse.py
Created December 29, 2016 16:19
Simple LCM type parser in Python
#!/usr/bin/env python
import re
import sys
#==============================================================================
def parse(f):
package = []
# Get text