A method for neatly stowing the lines on a skydiving parachute

Looking at the way some freshly licenced (and some older) jumpers struggle with making neat line stows, I figured I’d document the method I’ve been using to stow my lines. Here goes:

A method for neatly stowing lines

These instructions are for stowing a bight of lines on the right-hand side of the bag; for the left-hand side, the hands used are reversed.

1. Start by slipping your right middle finger through the rubber band you’re going to use.

Continue reading

Posted in Skydiving | Leave a comment

My “first order retrievability” toolbox

Here’s my take on a toolbox observing the principle of “first order retrievability” as popularized by Adam Savage. In short, all tools can be reached without moving other tools out of the way first.

The box itself is a Draper 48566 with the trays removed. The insert for the tools is built from foamcore to hold my most used tools on the front side, and a selection of less needed tools on the back. As it happens, my list of commonly used tools appears to be so short that there’s plenty of space for expansion later!

Toolbox front side

Toolbox back side

Posted in Making stuff | Leave a comment

Filtering out outliers in Arduino ultrasonic distance sensor data

A friend of mine asked me how he could remove invalid data points from the measurements made by the ultrasonic range finder in his Arduino project. A quick search got me to this page, but some of the links were dead and there was no complete example on the page anyway, so I decided to roll my own.

Here’s my take, written in Python since I didn’t have an Arduino handy for testing. This is based on dropping outliers from recent measurements to come up with a “fixed average”:

#!/usr/bin/env python

# Example on filtering out invalid data points in a stream, coming in from for
# example an ultrasonic distance sensor.

# This test data has two invalid data points; 310 and 210
data = [40, 41, 40, 39, 42, 45, 310, 43, 41, 44, 38, 120, 121, 117, 120, 120, 210, 110, 112, 114, 117, 113, 78, 80, 78, 74, 60, 70, 76]
raw_values = [];

while data :
  # Read a raw value
  raw_value = data.pop()

  # Keep last 5 values stored in an array
  raw_values.append(raw_value)
  if len(raw_values) > 5:
    raw_values.reverse()
    raw_values.pop()
    raw_values.reverse()
  
  # For debugging only; Print out current stored raw values
  for raw_value in raw_values:
    print raw_value,
  
  # Calculate the raw average of all the stored values; This value will be
  # thrown off by invalid values.
  avg = round(sum(raw_values) / len(raw_values))
  print ":",
  print avg,

  # Drop the highest and lowest stored value if we have enough values.
  sorted = list(raw_values);
  if len(raw_values) >= 3:
    sorted.sort()
    sorted.pop()
    sorted.reverse()
    sorted.pop()

  # And calculate an average based on the remaining three values. This is
  # closer to correct, but will be thrown off if there is more than one
  # invalid value currently stored.
  fixed_avg = round(sum(sorted) / len(sorted));

  print ":",
  print fixed_avg,
  
  # Print the difference between the raw average and the fixed average:
  print "(",
  print abs(avg - fixed_avg),
  print ")"


Posted in IT, Making stuff | Leave a comment

Amount of content in The Lord of the Rings vs. The Hobbit

While cleaning up my desktop, I stumbled upon a calculation I did after the Hobbit movies came out. What I wanted to find out was how many words in the book would be used for each minute of the movie. Seeing as The Hobbit is a much shorter book than the LOTR trilogy, it would seem that there would need to be a fair amount of padding to make three feature length movies out of it. So, let’s see: Continue reading

Posted in Books | Leave a comment

Making a composite material from ABS slurry

Since I do a fair bit of 3D-printing, there’s always plenty of scrap ABS available. Some of the scraps go into the acetone / ABS slurry that I use to coat the build platform before each print, but there’s still plenty more to go around.

So, this got me thinking: “If I make something out paper, from a pepakura design or something, can I use ABS slurry instead of a resin to turn the paper into a composite material?”

TL;DR: No, it doesn’t really work.
Continue reading

Posted in Making stuff | Tagged , , , , | Leave a comment

3D-printed buildings and military units for King of New York

Here’s a project I recently finished: 3-printed buildings and military units for the board game King of New York:

Overview

Overview of a “game in progress”

Continue reading

Posted in Games, Making stuff | Leave a comment

Nginx as origin for S3 with authentication, with CDN on top

We recently had a small problem with our content delivery system. The setup is as follows:

– AWS S3 bucket that requires authentication
– EC2 instance, running Nginx with ngx_aws_auth
– ELB load balancer in front of the EC2 instance
– CDN configured to use the ELB as the origin

The problem was that the content could be loaded directly from the Nginx, or from the load balancer, but when trying to load the content through the CDN, we’d get an AWS error message about a mismatching signature:

<Error>
<Code>SignatureDoesNotMatch</Code>
<Message>
The request signature we calculated does not match the signature you provided. Check your key and signing method.
</Message>
<AWSAccessKeyId>REDACTED</AWSAccessKeyId>
<StringToSign>
GET x-amz-date:Tue, 05 Apr 2016 12:15:35 GMT /REDACTED_URL_TO_ASSET
</StringToSign>
<SignatureProvided>xHLCuT9r7sAUbONvHaDeWDigCGs=</SignatureProvided>
<StringToSignBytes>
REDACTED
</StringToSignBytes>
<RequestId>AACF04EB41AB61DC</RequestId>
<HostId>
REDACTED
</HostId>
</Error>

Continue reading

Posted in IT | Tagged , , , , | Leave a comment

Nginx: Reject request if header is not present

It was surprisingly difficult to find a full working example of this, so here’s my take on “How to make Nginx require that a certain header is present with a certain value in the incoming request”:

nginx.conf:

http {
  map $http_x_mycustomheader $is_mycustomheader_not_ok {
      default "1";
      MyApprovedValue "0";
  }
  
  ... 
}

mysite.conf:

server {
  ...
    location / {
      if ($is_mycustomheader_not_ok) {
        return 403;
      }
    }
  ...
}

To allow requests that contain the header with any value except an empty value, all you need is:

mysite.conf:

server {
  ...
    location / {
      if ($http_x_mycustomheader = "") {
        return 403;
      }
    }
  ...
}

I don’t know how to accept requests where the header is set to any value including an empty value. If anyone has an example, please leave a comment.

Posted in IT | Leave a comment

Obi-Wan Kenobi’s flashlightsaber

Obi-Wan's flashlightsaber

Obi-Wan’s flashlightsaber

I happened to find this 3D-printable model of Obi-Wan Kenobi’s lightsaber, so I decided to see if me and my 3D-printer were up to the task. There’s also an article about designing the lightsaber model in the Ultimaker blog.
Continue reading

Posted in Electronics, Making stuff | Leave a comment

Inns and Cathedrals added to the tile counter

The Carcassonne tile counter I made a year ago has now been extended with tiles from the Inns and Cathedrals extension: Tile counter incl. Inns and Cathedrals.

Posted in Games | Leave a comment