This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pio run -v -j1 | |
Processing udpi (upload_flags: --tool, uart, --device, $BOARD_MCU, --uart, $UPLOAD_PORT, --clk, $UPLOAD_SPEED; upload_command: pymcuprog write --erase $UPLOAD_FLAGS --filename $SOURCE; platform: atmelmegaavr; board: ATtiny1616; framework: arduino) | |
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | |
CONFIGURATION: https://docs.platformio.org/page/boards/atmelmegaavr/ATtiny1616.html | |
PLATFORM: Atmel megaAVR (1.9.0) > ATtiny1616 | |
HARDWARE: ATTINY1616 16MHz, 2KB RAM, 16KB Flash | |
PACKAGES: | |
- framework-arduino-megaavr-megatinycore @ 2.6.7 | |
- toolchain-atmelavr @ 3.70300.220127 (7.3.0) | |
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker exec -ti -u cmk checkmk bash | |
cd tmp | |
curl -O https://exchange.checkmk.com/packages/nut/1230/nut-2.0.4.mkp | |
OMD[cmk]:~/tmp$ mkp add nut-2.0.4.mkp | |
nut 2.0.4 | |
OMD[cmk]:~/tmp$ mkp enable nut | |
[nut 2.0.4]: Installing |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<masters> | |
<master idx="0" appTimePeriod="1000000" refClockSyncCycles="-1" name="master0"> | |
<slave idx="0" type="EK1110" /> | |
<slave idx="1" type="R88D-1SN01H-ECT" name="x-servo"> | |
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/> | |
<watchdog divider="2498" intervals="1000"/> | |
</slave> | |
<slave idx="2" type="R88D-1SN01H-ECT" name="y-servo"> | |
<dcConf assignActivate="300" sync0Cycle="*1" sync0Shift="0"/> | |
<watchdog divider="2498" intervals="1000"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""Implementation of the Datamodel for the parts list with natural sort.""" | |
import re | |
import wx | |
import wx.dataview as dv | |
BOM_COL = 6 | |
POS_COL = 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
import wx.dataview as dv | |
from datamodel import PartListDataModel | |
import random | |
class MyFrame(wx.Frame): | |
def __init__(self): | |
wx.Frame.__init__(self, None, title="DataViewCtrl Example with Natural Sort") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import wx | |
import wx.dataview as dv | |
import re | |
import random | |
def natural_sort_key(s): | |
"""Return a tuple that can be used for natural sorting.""" | |
return [ | |
int(text) if text.isdigit() else text.lower() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# See https://cdn.sick.com/media/docs/6/86/086/Operating_instructions_Flexi_Soft_Gateways_in_the_Safety_Designer_Configuration_software_de_IM0081086.PDF | |
# Page 36 | |
from pymodbus.client import ModbusTcpClient as ModbusClient | |
IP = "192.168.255.3" | |
PORT = 502 | |
ADDRESS = 1100 | |
REGISTERS = 25 | |
SLAVE_ID = 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
NEW_HOST=new_server | |
TARGET_FOLDER=/opt/docker/cloud/transfer/ | |
MYSQL_USER=nextcloud | |
MYSQL_PW=my_secure_db_pw | |
DATE=`date +"%Y%m%d"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$files = Get-ChildItem -Name ./*.svg | |
for ($i=0; $i -lt $files.Count; $i++) { | |
$newname = ([String]$files[$i]).Replace("svg","pdf") | |
& "C:\Program Files\Inkscape\bin\inkscape.exe" --actions="export-type:pdf;export-do" --export-filename=$newname $files[$i] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def rainbow_color_stops(n=10, end=2 / 3): | |
rgb = [hls_to_rgb(end * i / (n - 1), 0.5, 1) for i in range(n)] | |
hex = [f"#{int(255.0*r):02x}{int(255.0*g):02x}{int(255.0*b):02x}" for r, g, b in rgb] | |
return hex |
NewerOlder