Skip to content

Instantly share code, notes, and snippets.

How even GPG

Good question. We'll assume a gpg2 install available at gpg.

Make a keypair

First you have to have a key-pair.

gpg --full-generate-key

@bvanderveen
bvanderveen / controllersimulator.md
Created December 16, 2015 05:52
controller/simulator workbench

Some notions on making a simulator/control loop bench

With apologies to ML:

iteration :: setpoint -> system-state -> system-state
iteration sp sys = let 
    control-output = control (sp, sys.control-state, sys.dynamic-state)
    control-state' = fst control-output

control-signal = snd control-output

@bvanderveen
bvanderveen / howtoruby.md
Last active September 4, 2016 21:44
How I installed Ruby on a clean Mac (August 2015)

First prepare your Mac for Developer Mode™.

  • xcode-select --install (now all sorts of stuff works)
  • Install homebrew

Install rbenv and use it to install a Ruby:

  • brew install rbenv ruby-build
  • echo 'eval "$(rbenv init -)"' >> ~/.bash_profile
  • rbenv install
@bvanderveen
bvanderveen / gist:460e2aa6822755abe4ce
Last active August 29, 2015 14:22
How I complied libonion on OS X

How I compiled libonion on OS X

First, deps.

$ brew install libev

Edit CMakeLists.txt and set the following to false:

  • ONION_USE_PAM
  • ONION_USE_PTHREADS
@bvanderveen
bvanderveen / howtopython.md
Last active October 4, 2022 19:33
How to get Python on OS X

2022 M1 Mac OS 10.12.5

Download OpenSSL 1.1.1q source.

Extract and change into source directory. Applied this workaround (should be fixed in next openssl release, "r").

$ mkdir /opt && chown -R veen:staff /opt
$ ./config --prefix=/opt/openssl-1.1.1q
$ make -j 4 && make install
@bvanderveen
bvanderveen / doplot
Created February 9, 2015 00:31
GNUPlot from CSV (Originally from JSBSim cannonball example)
set terminal png
set output "plot.png"
set title "Cannon ball"
set key autotitle columnhead
set xlabel "Time"
set datafile separator ','
plot "output.csv" u 1:62 w lines
// view model
self.figureOutWhatToShowNext = [RACCommand commandWithCanExecuteSignal:self.okayToShowNextThing];
self.nextVM = [[self.figureOutWhatToShowNext addSignalBlock:^ RACSignal *(id value) {
return [self.model.figureItOut map:id (id x) { return x.boolValue ? [[OkayVM alloc] init] : [[NotOkayVM alloc] init] }];
] flatten];
// view
// from RichB, https://groups.google.com/forum/#!msg/kayak-http/ivzlD8HoF9w/7reCjodx2-AJ%5B1-25%5D
class FileProducer : IDataProducer
{
// Members
private string m_fileName;
private FileStream m_fileStream;
private IDataConsumer m_consumer;
@bvanderveen
bvanderveen / gist:3260382
Created August 4, 2012 22:34 — forked from jacksonh/gist:3257926
Objective-C assertion ideas
- (void) assertionIdeasLikeNUnit
{
[Assert that:@"foobar" is:[Equal to:@"other"]];
[Assert that:@"foobar" isNot:[Equal to:@"other"]];
[Assert that:collection isAll:[Less than:@10]];
[Assert that:collection isAll:[Less thanOrEqualTo:@10]];
[Assert that:collection isAll:[Less thanOrEqualTo:@10]];
[Assert that:collection isAll:[Greater than:@10]];
[Assert that:collection isAll:[Greater thanOrEqualTo:@10]];
@bvanderveen
bvanderveen / servo_4mixer.pde
Created July 7, 2012 20:41
Four-channel (pitch, roll, yaw, speedbrake) servo mixing algorthim for flying wing designs
int windowWidth;
int windowHeight;
float surfaceHeight = 50;
// sum should be 1
float kYaw = .5, kBrake = .5;
float[] mix(float pitch, float yaw, float roll, float brake) {
float brakeSeparation = kBrake * (1 + brake) / 2;
float yawMix = Math.max(kYaw, 1 - brakeSeparation);