Skip to content

Instantly share code, notes, and snippets.

As mentioned [here](https://github.com/arduino/Arduino/issues/7302) to install Arduino IDE on aarch64 architecture it is necessary to download:
[https://downloads.arduino.cc/ide_beta/arduino-1.9.0-beta-linuxaarch64.tar.xz](https://downloads.arduino.cc/ide_beta/arduino-1.9.0-beta-linuxaarch64.tar.xz) or newer?
```
sudo dpkg --add-architecture armhf -y
sudo apt-get update -y
sudo apt-get install libc6:armhf libstdc++6:armhf -y
```

Zmeny uzivani prikazu z duvodu prevodu SVN na GIT

V procesu vyvoje se nic moc nezmeni. Repozitar je porad na serveru, kam se zmeny commituji a pak nasledne prevraceji na ostrou verzi.

Jsou ekvivalentni...

svn up aktualizuje lokalni repozitar. Protoze git pull rovnou zmney mergne, tak muze nastat situace, ve ktere je nutne resit pripadne konflikty pri pullu a ty nasledne mergnout. Doporucuji pri aktualizaci ostre verze pouzivat nejprve git fetch , pak zkontrolovat obsah pomoci [git diff ](https://stackoverflow.com/questions/18533564/git-check-for

@vprusa
vprusa / characteristics.js
Last active November 3, 2023 18:16
UART terminal (with performance test) sketch for google chrome's Web Bluetooth GATT communication with ESP32 BLE
//https://googlechrome.github.io/samples/web-bluetooth/get-characteristics.html?service=6e400001-b5a3-f393-e0a9-e50e24dcca9e&characteristic_read=6e400002-b5a3-f393-e0a9-e50e24dcca9e
var bluetoothDevice;
var bluetoothDeviceWriteChar;
var bluetoothDeviceNotifyChar;
var timeNow, timeWriteLast, timeNotifyLast;
function str2ab(str) {
var buf = new ArrayBuffer(str.length*2); // 2 bytes for each char
@vprusa
vprusa / toPng.sh
Created November 4, 2019 17:11
pv021 callgraph on existing project
#!/bin/bash
# using https://github.com/gousiosg/java-callgraph
# basic static on https://github.com/university-studies/neural-networks-pv021
java -jar ./target/javacg-0.1-SNAPSHOT-static.jar ./neural-networks-forecast-1.0-SNAPSHOT.jar > callgraph.txt
sed -i '/CliArgumentsParser/d' ./callgraph.txt
sed -i '/TestUtils/d' ./callgraph.txt
sed -i '/OHLC/d' ./callgraph.txt
@vprusa
vprusa / bt-stats-sketch.sh
Last active February 19, 2020 12:10
This is a snippet for retreiving and storing infromation from bluetoothctl
#!/bin/bash
# this script shows Bluetooth devices information using bluetoothctl and saves it to dir ${B_DIR}
B_DIR=.btop.tmp
shopt -s expand_aliases
alias bl="bluetoothctl"
printf "addr rssi | first last name \n" ;
@vprusa
vprusa / copy_paste.aliases.sh
Created March 3, 2020 13:59
Aliases for copypaste from terminal to clipboard
# usage
# ``` echo "hello" | _c ```
# ctrl+shift+v | ``` _p ```
_c(){
cat | xclip -r -selection clipboard
}
_p(){
xclip -selection clipboard -o
@vprusa
vprusa / DebuggingArquilliandOnWildfly.md
Last active April 4, 2020 13:07
Notes on debugging Arquillian tests on Wildfly (for IntelliJ IDEA)

Testing notes

Notes for debugging Arquillian tests using IDEA

Tests are running on container

At dir ./

1. Start and wait for loading of WS in debug mode

https://forum.armbian.com/index.php?/topic/1417-g_ether-driver-h3-device-as-ethernet-dongle/
@vprusa
vprusa / Log.java
Created June 29, 2020 14:47
Custom multidimensional logger sketch
/**
* Custom multidimensional logger sketch (WildFly compatible?)
*
* TODO checkout
* - https://github.com/jamezp/wildfly-examples/tree/master/custom-log-filter
*/
public final class Log {
// TODO load from env variable, config file, option -D
public static Class[] enabledLogTypes = {
@vprusa
vprusa / another.grok
Last active July 27, 2021 09:39
# sketch of grok patterns for sendmail
# common postfix patterns
POSTFIX_QUEUEID ([0-9A-F]{6,}|[0-9a-zA-Z]{12,})
POSTFIX_CLIENT_INFO %{HOSTNAME:postfix_client_hostname}?\[%{IP:postfix_client_ip}\](:%{INT:postfix_client_port})?
POSTFIX_RELAY_INFO %{HOSTNAME:postfix_relay_hostname}?\[(%{IP:postfix_relay_ip}|%{DATA:postfix_relay_service})\](:%{INT:postfix_relay_port})?|%{WORD:postfix_relay_service}
POSTFIX_SMTP_STAGE (CONNECT|HELO|EHLO|STARTTLS|AUTH|MAIL( FROM)?|RCPT( TO)?|(end of )?DATA|RSET|UNKNOWN|END-OF-MESSAGE|VRFY|\.)
POSTFIX_ACTION (accept|defer|discard|filter|header-redirect|reject)
POSTFIX_STATUS_CODE \d{3}
POSTFIX_STATUS_CODE_ENHANCED \d\.\d\.\d
POSTFIX_DNSBL_MESSAGE Service unavailable; .* \[%{GREEDYDATA:postfix_status_data}\] %{GREEDYDATA:postfix_status_message};
POSTFIX_PS_ACCESS_ACTION (DISCONNECT|BLACKLISTED|WHITELISTED|WHITELIST VETO|PASS NEW|PASS OLD)