Skip to content

Commit

Permalink
Fix capitalisation of titles
Browse files Browse the repository at this point in the history
  • Loading branch information
maxammann committed Apr 13, 2020
1 parent f88e5dd commit ad410a7
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 36 deletions.
10 changes: 5 additions & 5 deletions content/posts/2019-04-13-crosscompiling-ros-raspbian.md
Expand Up @@ -19,7 +19,7 @@ Along the way you'll need to do these steps:
* Compile ROS
* Prepare a Raspbian image for production

# Setup a Debian environment to compile for Raspbian
# Setup a Debian Environment to Compile for Raspbian

It really makes sense to cross-compile in an environment which is similar to your target. Raspbian is basically just a Debian which supports ARMv6 and therefore the Raspberry Pi 1 and Raspberry Pi Zero. There can be some confusion with the term armhf (ARM hard-float), because Debian [means the ARMv7 architecture](https://wiki.debian.org/ArmHardFloatPort).

Expand All @@ -45,7 +45,7 @@ If you want to switch to the container later just run:
docker start build_ros -i
```

# Build and compile a recent toolchain to target ARMv6
# Build and Compile a Recent Toolchain to Target ARMv6

Install some general packages for compiling and the dependencies we need for ROS in the docker image.
```bash
Expand Down Expand Up @@ -78,7 +78,7 @@ ct-ng build
This task about 20 minutes on my machine. After that your toolchain will be in `/root/x-tools6h-new`. You can leave the terminal window with docker open for later.


# Setup and prepare a sysroot
# Setup and Prepare a Sysroot

*Now switch to your host and continue with the following steps.*

Expand Down Expand Up @@ -162,7 +162,7 @@ GROUP ( libpthread.so.0 libpthread_nonshared.a )
Now the sysroot is setup for cross compilation!


# Compile and prepare ROS dependencies
# Compile and Prepare ROS Dependencies

*Now change back to the docker image.*

Expand Down Expand Up @@ -269,7 +269,7 @@ wstool update -t src -j8
Now run the compilation again like in [Compile Ros](#compile-ros)


# Prepare a Raspbian image for production
# Prepare a Raspbian image for Production

You have compiled now everything in the Raspbian `sysroot` directory. You should resize the original Raspbian image now and install the dependencies there again.

Expand Down
2 changes: 1 addition & 1 deletion content/posts/2019-04-14-mounting-qcow.md
@@ -1,6 +1,6 @@
---
layout: post
title: Mounting qcow2 images
title: Mounting qcow2 Images
date: 2019-04-14
slug: mounting-qcow
---
Expand Down
4 changes: 2 additions & 2 deletions content/posts/2019-05-03-pfsense-telegraf-letsencrypt.md
@@ -1,6 +1,6 @@
---
layout: post
title: Using Telegraf and InfluxDB on pfSense with Let’s Encrypt certificate
title: Using Telegraf and InfluxDB on pfSense with Let’s Encrypt Certificate
date: 2019-05-03
slug: pfsense-telegraf-letsencrypt
---
Expand Down Expand Up @@ -67,7 +67,7 @@ Ob8VZRzI9neWagqNdwvYkQsEjgfbKbYK7p2CNTUQ
-----END CERTIFICATE-----
```

# Additional debugging steps
# Additional Debugging Steps

If some other CAs are missing or you are using a self-signed CA you can use these steps to debug further:

Expand Down
@@ -1,6 +1,6 @@
---
layout: post
title: "Scanning black and white negatives: Vuescan and Post-processing"
title: "Scanning Black and White Negatives: Vuescan and Post-processing"
date: 2019-09-22
slug: scanning-negatives-vuescan-darktable

Expand Down Expand Up @@ -35,15 +35,15 @@ In the **Crop** tab set [Crop size](https://www.hamrick.com/vuescan/html/vuesc30

The above settings control how the scanner does the scan. The next settings are resposible processing the scan.

## Processing settings
## Processing Settings

In the **Filter** tab untick everything. For B/W film the cleaning using the infrared channel also does not work as noted in [this article](http://crawfordphotoschool.com/digital/bw-neg-scanning.php):

> Infrared cleaning does not work for traditional black and white negs; the metallic silver in them interferes with it.Using it may give weird tonality. It DOES work perfectly well on C-41 black and white films, like Ilford XP-2 and Kodak 400CN, so you can use it on them. It also works fine for C-41 color films and E-6 slides.
The settings in the **Color** can all be set to default values as the raw image will be saved before the color correction takes place during the **Processing** stage. The values there only affect the view of the scan in the right side bar of VueScan. If you use the [Input \| Lock film base color](https://www.hamrick.com/vuescan/html/vuesc29.htm#inputlockfilmbasecolor) setting the color of the film will appear in this tab. You can also choose a film model which is close to yours to get a good preview of the result you can achieve from the raw output.

## Outputting the image data
## Outputting the Image Data

The scanner offers linear CCD (charge-coupled device) sensors for the red, green, blue and infrared channel. The **Output** tab allows to capture this raw data by ticking the setting [RAW file](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputrawfile). The [TIFF file](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputtifffile), [JPEG file](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputjpegfile), [PDF file](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputpdffile) and [Index file](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputindexfile) options can be left unticked as the output in these formats is already color corrected by VueScan. Furthermore it is important to choose 64bit RGBI for [Raw file type](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputrawfiletype) and "Scan" for [Raw output with](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputrawoutputwith) to output the scan just after the **Scanning** stage before the **Processing** stage. Make sure [Raw save film](https://www.hamrick.com/vuescan/html/vuesc33.htm#outputrawsavefilm) is unticked such that the value of "Raw output with" is used.

Expand Down
4 changes: 2 additions & 2 deletions content/posts/2019-12-23-t490-fingerprint-sensor.md
Expand Up @@ -10,7 +10,7 @@ I suggest to wait until the firmware reached a stable state. But if you are feel

You can check whether you have the reader I'm talking about by using `lsusb`. Make sure to have a device with the id `06cb:00bd`.

# Installing the latest firmware
# Installing the Latest Firmware

You have the install the following two firmwares from LVFS:
* [Synaptics Inc. Prometheus Fingerprint Reader](https://fwupd.org/lvfs/devices/com.synaptics.prometheus.firmware)
Expand All @@ -20,7 +20,7 @@ You have the install the following two firmwares from LVFS:
You can install these using `fwupdmgr install <fw.cab>` or enable the testing remote using `fwupdmgr enable-remote lvfs-testing` as root user.
Power off your laptop and start it again.

# Getting the latest libfprint
# Getting the Latest libfprint

The `libfprint` which is packaged for most distributions is not ready for the firmware yet. You can clone the latest `libfprint` though to communicate with the fingerprint reader:
* `git clone https://gitlab.freedesktop.org/libfprint/libfprint.git`
Expand Down
8 changes: 4 additions & 4 deletions content/posts/2020-01-21-armbian-encrypt-root.md
@@ -1,6 +1,6 @@
---
layout: post
title: "Armbian: Encrypting the root partition"
title: "Armbian: Encrypting the Root Partition"
date: 2020-01-21
slug: armbian-encrypt-root
---
Expand Down Expand Up @@ -28,7 +28,7 @@ This basically setup the full-disk encryption and a SSH server which runs before

A GUI should open which allows you to choose the board, kernel version and other options. Choose to build an image if the setup asks you. After approx. 30 minutes you should have an `Armbian_\*.img` and `Armbian_\*.key` file in `output/images`.

## Changing the password of the LUKS container
## Changing the Password of the LUKS container

After generating the image and copying it to your trustworthy host system you can change the password by binding the paritions of the `Armbian_\*.img` file to loopback devices:

Expand All @@ -40,7 +40,7 @@ After generating the image and copying it to your trustworthy host system you ca

Now you added a new key slot and removed the previous one.

## Booting the encrypted system
## Booting the Encrypted System

When you boot up your embedded system a dropbear SSH server is started on port 2222. You can use the `Armbian_\*.key` to login as root:

Expand All @@ -51,7 +51,7 @@ Finally you can login on your embedded system using as usual (default credential

* `ssh root@192.168.123.123`

## Add an authorized key
## Add an Authorized Key

In order to login using different SSH keys to unlock your root partition you can add your public key to `/etc/dropbear-initramfs/authorized_keys`. After that you need to update your initramfs:

Expand Down
2 changes: 1 addition & 1 deletion content/posts/2020-01-28-flash-apu-using-tinycore.md
Expand Up @@ -30,7 +30,7 @@ Finally download Tiny Core Linux from [pcengines.ch](https://pcengines.ch):

and extract it on the USB stick. Finally download the coreboot image you want to flash from [pcengines.github.io](https://pcengines.github.io/) and also extract it on the stick.

# Flashing the coreboot image
# Flashing the Coreboot Image

After booting from the USB stick you can flash the firmware using [this guide](https://github.com/pcengines/apu2-documentation/blob/50f7e37d2301cfec232f4e5684160be53481ea9e/docs/firmware_flashing.md).

Expand Down
12 changes: 6 additions & 6 deletions content/posts/2020-03-25-telegram-data-visualization/index.md
@@ -1,6 +1,6 @@
---
layout: post
title: "Data visualization of Telegram messages (encrypted chats)"
title: "Data Visualization of Telegram messages (Encrypted Chats)"
date: 2020-03-25
slug: telegram-data-visualization

Expand All @@ -27,11 +27,11 @@ Using the sqlite3 tool we can get data and output it as CSV file.
sqlite3 cache4.db -csv -header "SELECT 1;" > timestamps.csv
```

The `timestamps.csv` should contain now a single 1. The following queries show how to query the timestamps for encrypted and non encrypted chats.
The `timestamps.csv` should contain now a single 1. The following queries show how to query the timestamps for encrypted and non-encrypted chats.

## Non encrypted chat
## Non-Encrypted Chat

For non encrypted chats you can use:
For non-encrypted chats you can use:

```sql
SELECT date FROM messages WHERE uid = (
Expand Down Expand Up @@ -70,7 +70,7 @@ SELECT * FROM (
" > timestamps.csv
```

# Creating a data visualization
# Creating a Data Visualization

The following script allows you to plot the data using pandas and matplotlib with the kxcd style:

Expand Down Expand Up @@ -134,7 +134,7 @@ Here is an example output:

The data was generated randomly.

# More resources about Telegram reverse-engineering
# More Resources about Telegram Reverse-engineering

You can find more information on the [dflab blog](https://dflab.blogspot.com/2019/01/cache4db-file-of-telegram-for-android_3.html) about reversing the Telegram database. Thanks for sharing the knowledge! The following section was the key to this post:

Expand Down
8 changes: 4 additions & 4 deletions content/posts/2020-03-28-notes-scsi-scanner/index.md
@@ -1,6 +1,6 @@
---
layout: post
title: "Notes about setting up a SCSI Nikon LS-2000 scanner on Windows 10"
title: "Notes about Setting up a SCSI Nikon LS-2000 Scanner on Windows 10"
date: 2020-03-28
slug: notes-scsi-scanner

Expand All @@ -14,19 +14,19 @@ resources:
2. PCI expansion slot (most SCSI cards are not PCIe compatible)
3. SCSI card with drivers for your operating system (Windows or MacOS)

# SCSI card with drivers for your operating system
# SCSI Card with Drivers for your Operating System

The well-known [Adaptec SCSI cards](https://storage.microsemi.com/en-us/support/scsi/) work well and are very cheap. I got an [Adaptec SCSI Card 19160](https://storage.microsemi.com/en-us/support/scsi/u160/asc-19160/) [from Ebay](https://www.ebay.de/itm/Adaptec-Controller-Card-ASC-19160-ASC-29160N-PCI-SCSI-Adapter-U160-PCI3-0-NUR/252975397739) for less than 20€. This card has the two advantages that it is cheap and **supports Windows 10**! As the VueScan software also runs on Windows 10 we are able to use a modern OS with our legacy Nikon scanner. Do not waste any time getting the original driver to work. VueScan is able to create a bit-by-bit scan with raw data from the sensors. Here is the driver informations from Windows as a proof:

{{< resourceFigure "scsi_card.png" "Windows driver info for Adaptec SCSI Card 19160" />}}

# BIOS mainboard and PCI expansion slot
# BIOS Mainboard and PCI Expansion Slot

The SCSI cards which are available today do not work with UEFI. At least I did not find one with a reasonable price. Furthermore most cards only support PCI and not PCIe. This means a mainboard prior to ~2010 should do the job well. I went with a ASUS P5Q-PRO.

Modern UEFI board are not compatible with the SCSI cards I tested. It seems that there is no mapping for the PCI address space. Also there is no support for the management of [interrupts](https://en.wikipedia.org/wiki/Conventional_PCI#Interrupts) on modern boards. I found this out the hard way by testing a PCIe to PCI card from CSL. This usually works well with most PCI cards. Unfortunately if the card depends on a BIOS integration these adapters do not work.

# Connecting the scanner and start the software
# Connecting the Scanner and Start the Software

You have to connect and start the scanner before starting the computer. After booting, installing the SCSI drivers you only need to get VueScan and start a scan. VueScan has all the drivers bundled.

Expand Down
@@ -1,6 +1,6 @@
---
layout: post
title: "Routing network of docker container over a specific host interface like a VPN"
title: "Routing Docker Container over a Specific Host Interface Like a VPN"
date: 2020-04-02
slug: routing-docker-container-over-vpn

Expand All @@ -18,7 +18,7 @@ As docker has its own network stack we can route the traffic from containers. Us

In this post we take the "proxy idea" to the next level. We will route the traffic of a whole docker container though a specific interface. If the interface goes down then the docker container is not allowed to communicate through any other interface.

# Configuration of docker
# Configuration of Docker

First configure docker such that it does not get into our way in `/etc/docker/daemon.json`:

Expand All @@ -30,7 +30,7 @@ First configure docker such that it does not get into our way in `/etc/docker/da

Depending on your docker setup you may not need this.

# Configuration of docker network
# Configuration of Docker Network

First we create a new docker network such that we can use proper interface names in our configuration and previously installed containers are not affected.

Expand All @@ -55,7 +55,7 @@ You can validate the settings by checking `ip a`:

The docker host gets the IP `172.18.0.1`.

# Setting up a docker container
# Setting up a Docker Container

Next we will create docker contains within the created subnet.
```bash
Expand Down Expand Up @@ -88,7 +88,7 @@ and look at the configuration:
We can also test the connection to the internet with `curl -4 ifconfig.co`.


# Routing a docker container through a OpenVPN network
# Routing a Docker Container through an OpenVPN Interface

The next step is to setup the routes which traffic from 172.18.0.0/16 through a vpn. We use OpenVPN here as it is wildly used. OpenVPN offers a way to setup routes with a `--up` and `--down` script. First we tell OpenVPN not to mess with the routing in any way with `pull-filter ignore redirect-gateway`. Here is a sample OpenVPN config to use with this setup:

Expand Down Expand Up @@ -183,7 +183,7 @@ local_gateway=192.168.178.1
/bin/ip route del $trusted_ip via $local_gateway dev eth0
```

# Setup IPtables to reject packages which fallback to another interface
# Setup IPtables to Reject Packets which Fallback to Another Interface

Finally, we want to avoid that packets go over over the `eth0` interface if the OpenVPN on `tun0` is down.

Expand Down Expand Up @@ -211,7 +211,7 @@ IPtables rules are a bit of a pain with docker. Docker overwrites the iptables c

If you want to have a network configuration which does not change you should set `"iptables": false` in `/etc/docker/daemon.json`. That way docker does not touch the IPtables rules. Before doing this I first copied the rules from IPtables when all containers are running. After stopping docker and setting the option to `false` I started the container again and applied the copied rules manually again.

# Why does this work?
# Why Does This Work?

When researching how to do this I sometimes has to lookup how routing and filtering actually works on Linux. Some tries by myself were based on marking packets coming from a specific process and then rejecting them if they are not flowing where they should. A further naive idea is to use the [IPtables owner module](http://ipset.netfilter.org/iptables-extensions.man.html) with `--uid-owner` (`iptables -m owner --help`). This does not work with docker though because packets from docker never go though the `INPUT`, Routing Decision and `OUTPUT` chain as seen in the figure below.

Expand All @@ -225,7 +225,7 @@ The packets from docker only go through `PREROUTING`, Routing Decision, `FORWARD
* [Good post about routing tables.](https://kindlund.wordpress.com/2007/11/19/configuring-multiple-default-routes-in-linux/)
* If you are interested in WireGuard you can read [here](https://nbsoftsolutions.com/blog/routing-select-docker-containers-through-wireguard-vpn) more.

# Further noes
# Further notes

[^priority]:

Expand Down

0 comments on commit ad410a7

Please sign in to comment.