Skip to content

Instantly share code, notes, and snippets.

View aldas's full-sized avatar

Martti T. aldas

  • Estonia
  • 20:13 (UTC +03:00)
View GitHub Profile
@aldas
aldas / main.go
Created July 21, 2021 20:16
echo authorization authentication
package main
import (
"encoding/base64"
"fmt"
"github.com/labstack/echo/v4"
"github.com/labstack/echo/v4/middleware"
"log"
"net/http"
"strings"
@aldas
aldas / Test_run_2020-11-03.csv
Created March 26, 2021 12:48
Visualise CSV data as graph/map
time latitude longitude latitude_direction_n_or_s longitude_degree longitude_minute longitude_direction_e_or_w outair_temp_wo plc1_me_runningstatus_do gps_speed_wo personsonboard_mw me1_fuelused_wo me2_fuelused_wo me1_fuel_rate_wo me2_fuel_rate_wo
2020-11-03 23:22:50.989 +0200 58.02881 22.0097483333333 0 0 0 0 0 0 1 5 0 0 0 0
2020-11-03 23:22:51.99 +0200 58.02881 22.016415 0 0 0 0 0 0 2 6 0 0 0 0
2020-11-03 23:22:52.989 +0200 58.0271433333333 22.031415 0 0 0 0 0 0 3 7 0 0 0 0
2020-11-03 23:22:53.989 +0200 58.0104766666667 22.031415 0 0 0 0 0 0 4 8 0 0 0 0
2020-11-03 23:22:54.989 +0200 58.00381 22.021415 0 0 0 0 0 0 5 9 0 0 0 0
2020-11-03 23:22:55.99 +0200 58.0054766666667 22.006415 0 0 0 0 0 0 6 10 0 0 0 0
2020-11-03 23:22:56.989 +0200 58.0221433333333 22.006415 0 0 0 0 0 0 7 5 0 0 0 0
2020-11-03 23:22:57.989 +0200 58.02881 22.016415 0 0 0 0 0 0 8 6 0 0 0 0
2020-11-03 23:22:58.99 +0200 58.0271433333333 22.031415 0 0 0 0 0 0 9 7 0 0 0 0
@aldas
aldas / rfid_reader_disable_keyboard_emulation
Created December 20, 2020 23:27
This script forces cheap USB RFID reader not to be emulated active Keyboard (every time you scan rfid card it would print data to current window) and just map it as readable usb device `/dev/rfid_reader`
# This script forces cheap USB RFID reader not to be emulated active Keyboard (every time you scan rfid card it would
# print data to current window) and just map it as readable usb device `/dev/rfid_reader`
sudo tee /etc/udev/rules.d/98-disable_rfid_reader_keyboard.rules << ENDEND
# Sycreader RFID Technology Co., Ltd => idVendor=ffff, idProduct=0035, bcdDevice= 1.00
# remove keyboard emulation event/input
SUBSYSTEM=="input", ACTION=="add", ATTRS{idVendor}=="ffff", ATTRS{idProduct}=="0035", RUN+="/bin/sh -c 'echo remove > /sys$env{DEVPATH}/uevent'"