Skip to content

Instantly share code, notes, and snippets.

View edro15's full-sized avatar

Erica Pescio edro15

  • Splunk
  • Munich, DE
View GitHub Profile
@edro15
edro15 / CompileNetBeansProjectANT.md
Created November 19, 2019 10:48
[How To] Compile a Java NetBeans project with Apache Ant

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.
@edro15
edro15 / SynchNTPtoGPS.md
Created February 13, 2018 16:45
[How To] Synchronize NTP server to a GPS/PPS source

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 / ForceUSBtoTTY.md
Last active September 1, 2024 11:00
[How To] Force a specific USB device to a certain TTY

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: