This file contains 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 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 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 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 |
This file contains 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
from subprocess import Popen, PIPE | |
from datetime import datetime as dt | |
import json | |
occ = ["docker-compose", "exec", "-u", "www-data", "app", "/var/www/html/occ"] | |
list_users_cmd = occ + ["user:list", "--output=json"] | |
with Popen(list_users_cmd, stdout=PIPE) as proc: | |
users = json.loads(proc.stdout.read().decode("UTF-8")) |
This file contains 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 | |
case $1 in | |
"update" ) | |
docker-compose $(find . -maxdepth 2 -name compose.*.yaml -type f -print | sed -e 's/^/-f /') pull --ignore-pull-failures && \ | |
docker-compose $(find . -maxdepth 2 -name compose.*.yaml -type f -print | sed -e 's/^/-f /') up -d;; | |
"status" ) | |
docker-compose $(find . -maxdepth 2 -name compose.*.yaml -type f -print | sed -e 's/^/-f /') ps -a;; | |
"lf" ) | |
docker-compose $(find . -maxdepth 2 -name compose.*.yaml -type f -print | sed -e 's/^/-f /') logs -f ${@:2};; |
This file contains 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
{ | |
"annotations": { | |
"list": [ | |
{ | |
"builtIn": 1, | |
"datasource": { | |
"type": "datasource", | |
"uid": "grafana" | |
}, | |
"enable": true, |
This file contains 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
# Maintainer: Andy Makovec <andymakovec[at]gmail[dot]com> | |
# Contributor: Rachel Mant <dx-mon[at]users[dot]sourceforge[dot]net> | |
# Contributor: Bouni <bouni-aur[at]owee[dot]de> | |
pkgname=kicad-nightly-bin | |
_pkgname=kicad-nightly | |
provides=('kicad-nightly') | |
conflicts=('kicad-nightly') | |
pkgdesc='Electronic schematic and printed circuit board (PCB) design tools' | |
arch=('x86_64') |
This file contains 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/bash | |
# Tom Hale, 2016. MIT Licence. | |
# Print out 256 colours, with each number printed in its corresponding colour | |
# See http://askubuntu.com/questions/821157/print-a-256-color-test-pattern-in-the-terminal/821163#821163 | |
set -eu # Fail on errors or undeclared variables | |
printable_colours=256 |
This file contains 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
# Generated by Powerlevel10k configuration wizard on 2023-05-30 at 10:41 CEST. | |
# Based on romkatv/powerlevel10k/config/p10k-classic.zsh, checksum 09432. | |
# Wizard options: nerdfont-complete + powerline, large icons, classic, unicode, dark, | |
# 24h time, angled separators, sharp heads, flat tails, 1 line, compact, many icons, | |
# fluent, instant_prompt=verbose. | |
# Type `p10k configure` to generate another config. | |
# | |
# Config for Powerlevel10k with classic powerline prompt style. Type `p10k configure` to generate | |
# your own config based on it. | |
# |
NewerOlder