Skip to content

Instantly share code, notes, and snippets.

View Bouni's full-sized avatar
🦥

bouni Bouni

🦥
View GitHub Profile
@Bouni
Bouni / doco.sh
Created July 25, 2023 13:31
A shell script to handle mutiple docker-compose files easily
#!/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};;
@Bouni
Bouni / blocky-dashboard.json
Created June 29, 2023 15:17
Blocky Grafana Dashboard
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": {
"type": "datasource",
"uid": "grafana"
},
"enable": true,
@Bouni
Bouni / PKGBUILD
Created June 20, 2023 07:34
Arch Linux package for Kicad nightly bin
# 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')
@Bouni
Bouni / print256colours.sh
Created June 9, 2023 08:58 — forked from HaleTom/print256colours.sh
Print a 256-colour test pattern in the terminal
#!/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
@Bouni
Bouni / .p10k.zsh
Created May 30, 2023 09:05
Custom Powerlevel10K color scheme
# 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.
#

List of all supported devices

Currently 355 devies are supported.

Manufacturer Device Implemented Tested
Beckhoff AX5101-0000-0003
Beckhoff AX5101-0000-0004
Beckhoff AX5101-0000-0005
Beckhoff AX5101-0000-0006
@Bouni
Bouni / git_fix_author_name.txt
Created May 12, 2023 11:36
change author af several commits back
1. git rebase -i <hash_of_last_good_commit>
2. change prefix to edit
3. git commit --amend --author="Bouni <[email protected]>" --no-edit
4. git rebase --continue
Do steps 3 and 4 for every commit
@Bouni
Bouni / EP23XX-PDO.txt
Last active May 3, 2023 10:34
Beckhoff EP23XX PDOs
======================================EP2308======================================
====================================Input PDOs====================================
1 Name: Input Index: 0x6000 SubIndex: 1 BitLength: 1 Datatype: BOOL
2 Name: Input Index: 0x6010 SubIndex: 1 BitLength: 1 Datatype: BOOL
3 Name: Input Index: 0x6020 SubIndex: 1 BitLength: 1 Datatype: BOOL
4 Name: Input Index: 0x6030 SubIndex: 1 BitLength: 1 Datatype: BOOL
===================================Output PDOs====================================
1 Name: Output Index: 0x7040 SubIndex: 1 BitLength: 1 Datatype: BOOL
2 Name: Output Index: 0x7050 SubIndex: 1 BitLength: 1 Datatype: BOOL
@Bouni
Bouni / diskspace-uptime.sh
Last active May 13, 2023 13:59
Use Uptime Kuma for disk space monitoring
#!/bin/bash
BASE_URL="https://uptime.bouni.de/api/push/"
disks=("/dev/sda1")
alerts=(85)
urls=("pCDwxLPOoI")
check () {
DISK=$1
<template>
<v-combobox v-model="country" :items="countries" item-title="name" item-value="code" label="Land" return-object>
<template v-slot:prepend-inner>
<span class="mr-2">
<country-flag :country='country.code.toLowerCase()' size='normal' v-if="country"/>
</span>
</template>
<template v-slot:item="{ item }">
<v-list-item>
<span class="mr-2">