Skip to content

Instantly share code, notes, and snippets.


Miklós Márton martonmiklos

View GitHub Profile
martonmiklos /
Created Mar 21, 2022
script for an udev rule to fix layout for a specific barcodereader
usbkbd=`xinput -list | grep -c "USBKey Chip USBKey Module"`
if [[ "$usbkbd" -gt 0 ]]
usbkbd_ids=`xinput -list | grep "USBKey Chip USBKey Module" | awk -F'=' '{print $2}' | cut -c 1-2`
for ID in $usbkbd_ids
setxkbmap -device "${ID}" -layout "${usbkbd_layout}"
View gist:7daae1ef2a80c48262e1dd7f73d2047f
0A:C0:31:44:FE:A1 SL-SF1000:
[ ][LE]> connect 0A:C0:31:44:FE:A1
Attempting to connect to 0A:C0:31:44:FE:A1
Connection successful
[0A:C0:31:44:FE:A1][LE]> char-desc
handle: 0x0001, uuid: 00002800-0000-1000-8000-00805f9b34fb
handle: 0x0002, uuid: 00002803-0000-1000-8000-00805f9b34fb
handle: 0x0003, uuid: 00002a00-0000-1000-8000-00805f9b34fb
handle: 0x0004, uuid: 00002800-0000-1000-8000-00805f9b34fb
View gist:13ac6430a9fc790517b125f6d70c4c91
4360 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323600, tv_nsec=549473975}) = 0
4360 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323600, tv_nsec=549885591}) = 0
4360 epoll_wait(4, [{EPOLLIN, {u32=77, u64=77}}], 64, -1) = 1
4360 clock_gettime(CLOCK_MONOTONIC, {tv_sec=323602, tv_nsec=372941933}) = 0
4360 recvmsg(77, {msg_name=NULL, msg_namelen=0, msg_iov=[{iov_base="l\1\1\1u\2\0\0\v\0\0\0k\0\0\0\1\1o\0\1\0\0\0/\0\0\0\0\0\0\0\6\1s\0\24\0\0\0org.sailfishos.share\0\0\0\0\2\1s\0\24\0\0\0org.sailfishos.share\0\0\0\0\3\1s\0\5\0\0\0share\0\0\0\10\1g\0\5a{sv}\0\0\0\0\0\0m\2\0\0\0\0\0\0\10\0\0\0mimeType\0\1s\0\n\0\0\0text/vcard\0\0\t\0\0\0resources\0\2av\0\0\0\352\1\0\0\5a{sv}\0\0\332\1\0\0\0\0\0\0\4\0\0\0data\0\1s\0\250\1\0\0BEGIN:VCARD\r\nVERSION:2.1\r\nFN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:Nagy Nador3\r\nN;ENCODING=QUOTED-PRINTABLE;CHARSET=UTF-8:Nagy Nador3;;;;\r\nX-QTPROJECT-FAVORITE:true;0\r\nREV:2020-09-01T18:19:26Z\r\nEMAIL;ENCODING=QUOTED-PRINTABLE;\r\nTEL;CELL;HOME:+36903718119\r\nADR
View gist:5dc2adb25ffe685ec79b91a263b9de13
Building wheels for collected packages: serial-production-document-checker
Building wheel for serial-production-document-checker ( ... error
ERROR: Command errored out with exit status 1:
command: /home/mm/Projektek/serial-production-tools/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-rkezwg2u/'"'"'; __file__='"'"'/tmp/pip-req-build-rkezwg2u/'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);'"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2d8pkqrx
cwd: /tmp/pip-req-build-rkezwg2u/
Complete output (6 lines):
usage: [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: --help [cmd1 cmd2 ...]
or: --help-commands
or: cmd --help
View gist:925bc68c73b63ca6d6a9134814a7f185
* LEAPS - Low Energy Accurate Positioning System.
* Simple user application.
* Copyright (c) 2016-2019, LEAPS. All rights reserved.
#include "dwm.h"
View Brandbase Nissan Formula E Gen 2

Shell Motorsport Bluetooth Remote Control

Shell Motorsport collection

Shell Oil Company in its gas station offers loyalty program under name Shell ClubSmart. Members collect points which can be later used to get rewards. In 2020 they have offered a collection of die-cast car models under name Shell Motorsport. All models of the colletion are equipped with electrical motor. One of the models - Nissan Formula E Gen 2 Car - contains a battery that can be used to control a model remotely over Bluetooth. In some markets a battery with

martonmiklos / 51-e1005-barcodereader.rules
Created Aug 13, 2021
Force us layout for athe Chinayoko E1005 barcode reader module
View 51-e1005-barcodereader.rules
ACTION=="bind" SUBSYSTEMS=="usb", ATTRS{idVendor}=="6778", ATTRS{idProduct}=="0112", ENV{DISPLAY}=":0.0", ENV{XAUTHORITY}="/home/mm/.Xauthority", RUN+="/etc/udev/rules.d/"
View wsdl_test_qsharedpointer_include_wsdl.h
// This file is generated by KDAB's kdwsdl2cpp from test_qsharedpointer_include_wsdl.wsdl.
// All changes you do to this file will be lost.
You may use and relicense this generated file without restriction.
#pragma once
#include <QtCore/QList>
#include <QSharedPointer>
#include <QtCore/QSharedData>
View gist:d688b2a0156bbe3154e44e9d9053c063
mm@lapos:~/Projektek/stlink$ ./bin/st-info --probe
Found 1 stlink programmers
version: V3J7S1
serial: 303033343030314433303338353130393334333333393335
hla-serial: "\x30\x30\x33\x34\x30\x30\x31\x44\x33\x30\x33\x38\x35\x31\x30\x39\x33\x34\x33\x33\x33\x39\x33\x35"
flash: 262144 (pagesize: 2048)
sram: 32768
chipid: 0x0442
descr: F09X
mm@lapos:~/Projektek/stlink$ ./bin/st-flash --area=main read /tmp/foo.bin 0x08000000 0x8000
View gist:20bdd7aee631f62ac689c5268854fbb8
mm@lapos:~/Projektek/stlink$ git show --summary
commit 9956bdeaab034033c3959751460e6cffe464df52 (HEAD -> develop, origin/develop)
Merge: 1eaa638 dd877b1
Author: nightwalker-87 <>
Date: Sun Mar 14 21:17:53 2021 +0100
Merge pull request #1104 from Ant-ON/fix_stlink_v1
Fixed support for STLINK/V1 programmer