Skip to content

Instantly share code, notes, and snippets.

View aurimasniekis's full-sized avatar

Aurimas Niekis aurimasniekis

View GitHub Profile
@aurimasniekis
aurimasniekis / gist:9b325561b27ce2a3c7ab95d778f6c617
Created May 13, 2025 16:00
Prano Juozapavičiaus užrašų apie gražiausią Kauno rajoną - Lampėdžius (1973 m.) spausdinta versija
Prano Juozapavičiaus užrašų apie gražiausią Kauno rajoną - Lampėdžius (1973 m.) spausdinta versija
LAMPĖDŽIAI
Už Veršvų, dešiniajame Nemuno krante, jaukaus pušyno – parko pietrytiniame pakraštyje įsikūrusi Lampėdžių kurortinė gyvenvietė. Dabar ji tapusi Kauno dalimi – vakariniu priemiesčiu. Gyvenvietė vardą gavusi nuo šalia esančio Neries senvagėje Lampėdžio ežeriuko (1).
Tarp Lampėdžių gyvenvietės, pušyno ir Aukštutinių Romainių žemės šlaitų esančiame slėnyje gerai matosi senoji Neries vaga, kitados vandenų nelaisvėje buvusios salos ir salelių vietos, o prie Nemuno, Neries protekų išraižyta upių santaka.
Kaip šimtmečių bėgyje, taip netolimoje praeityje ir dar 1946 metų pavasarį įvykus dideliam potvyniui, Neries vandenys į Nemuną tekėjo pro Vilijampolę, Veršvus, Žemutinius Kaniūkus, už Lampėdžių pušyno prie pat Nevėžio žiočių. Potvynio metu, Lampėdžiai, pušynas ir Žemutiniai Kaniūkai buvo Nemuno ir Neries užliejamų vandenų salose.
Šios panemunės gyvenvietės turi žiląją praeitį. Dabartinėje Lampėdžių vietovė
@aurimasniekis
aurimasniekis / usb-ip.md
Created September 24, 2023 12:14
Proposal for Simplified USB-IP Standard: Enabling TCP/UDP Communication for USB Devices

Title:

Proposal for Simplified USB-IP Standard: Enabling TCP/UDP Communication for USB Devices

Abstract:

This proposal introduces a simplified IP over USB standard to enable direct TCP/UDP communication between USB devices and host machines locally. The standard provides a networking interface to USB devices without encapsulation, allowing existing TCP/UDP application code to be reused easily. This reduces complexity by eliminating the need to learn USB protocols. The host driver handles USB protocols internally, tunneling native TCP/UDP packets bidirectionally. This fosters innovation by lowering barriers to integrating USB capabilities into solutions using familiar networking concepts. The standard ensures cross-platform compatibility while addressing security concerns. Adoption promises accelerated development and enhanced interoperability for USB-based products.

1. Introduction

@aurimasniekis
aurimasniekis / types.php
Created August 4, 2021 09:28
Small example of generating Typescript interfaces from PHP classes
<?php
class BaseView extends View
{
}
class AuthorUserView extends BaseView
{
#[Property(type: 'string')]
public Ulid $id;
@aurimasniekis
aurimasniekis / MyWindow.cs
Last active June 6, 2021 06:44
How to allow WPF custom window element to have transparency set from style
namespace WpfApplication1
{
public class MyWindow : Window
{
public new static readonly DependencyProperty AllowsTransparencyProperty =
DependencyProperty.Register(nameof(AllowsTransparency), typeof(bool), typeof(MyWindow), new PropertyMetadata(false));
public new bool AllowsTransparency
{
get => (bool) GetValue(AllowsTransparencyProperty);
@aurimasniekis
aurimasniekis / KeyboardKey.cs
Last active May 10, 2024 23:49
A simple C# Keyboard Key generic class to map 4 different types of KeyBoard Key values from Win32 Key, Wpf Input Key, WinForm Key and JS Key
using System;
using System.Collections.Generic;
public class KeyboardKey : IEquatable<KeyboardKey>
{
public enum Keys
{
None,
Cancel,
Backspace,
#include <Arduino.h>
#include "PPMInput.h"
#include <FastLED.h>
#define NUM_LEDS 70
#define DATA_PIN 0
#define BRIGHTNESS 200
#define FRAMES_PER_SECOND 60
(function () {
var t = aaa
, i = ccc.utf8
, a = bbb
, o = ccc.bin
, r = function (e, n) {
e.constructor == String ? e = n && "binary" === n.encoding ? o.stringToBytes(e) : i.stringToBytes(e) : a(e) ? e = Array.prototype.slice.call(e, 0) : Array.isArray(e) || (e = e.toString());
for (var s = t.bytesToWords(e), l = 8 * e.length, c = 1732584193, d = -271733879, u = -1732584194, p = 271733878, h = 0; h < s.length; h++)
s[h] = 16711935 & (s[h] << 8 | s[h] >>> 24) | 4278255360 & (s[h] << 24 | s[h] >>> 8);
s[l >>> 5] |= 128 << l % 32,
Only in Raptor2 Sources/bldc-firmware_2_80: .dep
Only in bldc-cc171422641a50c56452280575f2074f8a88aa45: .gitignore
diff -ru bldc-cc171422641a50c56452280575f2074f8a88aa45/Makefile Raptor2 Sources/bldc-firmware_2_80/Makefile
--- bldc-cc171422641a50c56452280575f2074f8a88aa45/Makefile 2015-12-29 01:37:09.000000000 +0000
+++ Raptor2 Sources/bldc-firmware_2_80/Makefile 2016-09-19 10:07:06.000000000 +0100
@@ -270,8 +270,8 @@
# Program
upload: build/$(PROJECT).bin
#qstlink2 --cli --erase --write build/$(PROJECT).bin
- openocd -f interface/stlink-v2.cfg -c "set WORKAREASIZE 0x2000" -f target/stm32f4x_stlink.cfg -c "program build/$(PROJECT).elf verify reset"
@aurimasniekis
aurimasniekis / a.UMDS2
Created October 27, 2018 17:34
ARC200 A and B configuration
comboParam$Control Mode$Torque Forward Only (+-A)
numericParam$Current Command Offset$-0.15$A/(VDC * PWMdec)
numericParam$Torque-Forward-Only Regen Foldback Start-Below PWM$2$% PWM
numericParam$Smart Reversal Threshold$10$A
numericParam$Smart Reversal Time$10$ms
comboParam$Input Throttle Mode$PWM Throttle
numericParam$Input Throttle Min$16005$
numericParam$Input Throttle Max$32255$
numericParam$Input Throttle Zero Neutral$24109$
numericParam$Input Throttle Deadband$300$+/-
{
"version" : "1",
"networkId" : "381989",
"parameters" : [
{
"name" : "allow4AId",
"category" : "profile",
"value" : "true"
}