Skip to content

Instantly share code, notes, and snippets.

Avatar

Erica Pescio edro15

  • Splunk
  • Munich, DE
View GitHub Profile
@edro15
edro15 / ForceUSBtoTTY.md
Last active Sep 19, 2022
[How To] Force a specific USB device to a certain TTY
View ForceUSBtoTTY.md

Scenario:

  • multiple USB devices plugged via hub to a host (Linux OS based),
  • multiple services/programs interacting with TTY running on top (e.g. GPSd)

Problem:

At boot TTY are randomly assigned to devices causing depending services/programs instabilities. They could indeed fail to start because of different TTY configurations.

Solution:

@edro15
edro15 / SynchNTPtoGPS.md
Created Feb 13, 2018
[How To] Synchronize NTP server to a GPS/PPS source
View SynchNTPtoGPS.md

So, I want to have a GPS Receiver driving a PPS (pulse-per-second) signal to the NTP server for a highly accurate time reference service.

Introduction

There are at least a couple of ways to propagate the PPS signal to the ntpd (NTP daemon) service, plus some variants in each case. However, the GPS device must be seen as a device that sources two different types of data:

  • the absolute date and time, and
  • the 1Hz clock signal (PPS).

The first one provides the complete information (incl. date and time) about when now is, but with poor accuracy because data is sent over the serial port and then encoded using a specific protocol such as NMEA (National Marine Electronics Association). PPS provides instead a very accurate clock but without any reference to absolute time.

@edro15
edro15 / CompileNetBeansProjectANT.md
Created Nov 19, 2019
[How To] Compile a Java NetBeans project with Apache Ant
View CompileNetBeansProjectANT.md

Problem

You need to modify code of a Java NetBeans project but you neither have or want to install that IDE in order to re-compile it.

Solution

Use Apache Ant to compile your Java code.

Instructions

  • Create a folder (e.g. lib) in your project, at the same level of nbproject, and save all dependencies (jars) there.