Skip to content

Instantly share code, notes, and snippets.

@nickoala
nickoala / gpspipe.md
Last active March 11, 2023 18:47
Log GPSD Outputs and Extract Lat/Lon

Log GPSD Outputs and Extract Lat/Lon

$ gpspipe -w             # log to stdout
$ gpspipe -w -o abc.log  # log to a file

To auto-log on startup, insert the following line to the file /etc/rc.local:

""" Raspberry Pi + GPS Car Camera
Achieved with three threads:
1. Main thread -
Start preview and recording.
2. GPS thread -
Read GPS location.
3. Annotate thread -
""" Raspberry Pi + GPS Car Camera
Achieved with three threads:
1. Main thread -
Start preview and recording.
2. GPS thread -
Read GPS location.
3. Annotate thread -
@nickoala
nickoala / orbslam2_ubuntu_mate.md
Created December 12, 2016 12:20
Build ORB-SLAM2 on Raspberry Pi 3

Build ORB-SLAM2 on Raspberry Pi 3

Operating system: Ubuntu Mate 16.04

I use Ubuntu Mate instead of the usual Raspbian Jessie mainly because of the gcc version. ORB-SLAM2 requires C++11 support. Raspbian comes with gcc 4.9, which does not handle C++11 by default. That means you have to play around with some compiler flags in ORB-SLAM2's CMakeLists.txt to make it work. In contrast, Ubuntu Mate's gcc 5.4 handles C++11 naturally.

""" Raspberry Pi + GPS Car Camera
Achieved with four threads:
1. Main thread -
Continuously capture and display on a pygame screen.
Let user see what the camera is seeing.
Check for QUIT event. Allow user to press [X] to exit.
2. Video-recording thread -
Record indefinitely.
@nickoala
nickoala / 0_python_email.md
Last active October 16, 2024 18:32
Use Python to send and receive emails

Use Python to:

  • send a plain text email
  • send an email with attachment
  • receive and filter emails according to some criteria
@nickoala
nickoala / curaengine.md
Last active January 27, 2022 05:14
Build CuraEngine on Raspbian or Ubuntu

Build CuraEngine on Raspbian or Ubuntu

CuraEngine requires libArcus which requires protobuf. Let's build them in turn.

Make sure python3 is Python 3.4 or higher.

Install utilities used by the build process:

@nickoala
nickoala / ssh_tunneling.md
Last active March 11, 2016 15:42
How to remote port forward on Raspbian

Configure SSH server to allow port forward

Edit /etc/ssh/sshd_config:

AllowTcpForwarding yes
GatewayPorts yes

Restart or reboot.

Execute this command on client