Skip to content

Instantly share code, notes, and snippets.

@rubo77
rubo77 / print_current_color.sh
Last active April 9, 2024 22:33
defines a set of colors, interpolates between them to create a smooth gradient and then changes the keyboard backlight color to match the current time
#!/bin/bash
# defines a set of colors, interpolates between them to create a smooth gradient
# and then changes the keyboard backlight color to match the current time
# uses https://github.com/wroberts/rogauracore
# options for the program: -h=help, -t=test
while getopts ":ht" opt; do
case ${opt} in
h )
@rubo77
rubo77 / cla.md
Created March 16, 2023 19:05
Eastcoast Laboratories CLA

Eastcoast Laboratories Contributor License Agreement

The document below clarifies the terms under which You (the copyright owner or legal entity authorized by the copyright owner), may make "The Contributions" (software, bug fixes, configuration changes, documentation, or any other materials) to "The Work" (Eastcoast Laboratories). This license protects You, "Eastcoast Laboratories" and licensees; it does not change your rights to use your own contributions for any other purpose.

You and "Eastcoast Laboratories" agree:

• You grant to "Eastcoast Laboratories" a non-exclusive, irrevocable, worldwide, royalty-free, sublicenseable, relicenseable, transferable license under all of Your relevant intellectual property rights, to use, copy, prepare derivative works of, distribute and publicly perform and display "The Contributions" on any licensing terms, including without limitation: (a) open source licenses like the GNU General Public (v2.0) license; and (b) binary, proprietary, or commercial licenses. Except

#!/bin/bash
# siehe https://wiki.freifunk.net/ECDSA_Util
# dies gilt nur für Kiel
# falls du noch keinen key hast:
# ecdsakeygen -s > ecdsautil_key.secret
# cat ecdsautil_key.secret|ecdsakeygen -p > ecdsautil_key.public
branch=stable
[Unit]
Description=deletes all but the last 1000 lines of syslog due to possible logging spam by VLC
[Service]
Type=oneshot
ExecStart=-/usr/local/sbin/truncate_syslog.sh
TimeoutSec=0
StandardOutput=syslog
After=suspend.target
@rubo77
rubo77 / planet2png.py
Last active November 28, 2020 23:43
converts a jpeg file with a planet on black background to a transparent png
#!/usr/bin/python3
# converts a jpeg file with a planet on black background to a transparent png
# like this imagemagick function does:
# for i in planet_*.jpg; do nr=$(echo ${i/planet_/}|sed s/.jpg//g|xargs); convert $i -fuzz 1% -transparent black trans/planet_${nr}.png; done
# but the python script will create them without arkifacts
# needs
# sudo apt install python3-opencv python3-sklearn python3-skimage
@rubo77
rubo77 / list_of_all_ciphers_in_tlsv1.3.txt
Created May 9, 2020 05:10
list of all ciphers in TLSv1.3 in Debian buster
# this is the output when you expand the rules to the full list of ciphers with
# openssl ciphers 'TLSv1.3:HIGH:!LOW:!MEDIUM:!EXP:!NULL:!aNULL@STRENGTH'
TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-DSS-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-CCM8:ECDHE-ECDSA-AES256-CCM:DHE-RSA-AES256-CCM8:DHE-RSA-AES256-CCM:ECDHE-ECDSA-ARIA256-GCM-SHA384:ECDHE-ARIA256-GCM-SHA384:DHE-DSS-ARIA256-GCM-SHA384:DHE-RSA-ARIA256-GCM-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA256:ECDHE-ECDSA-CAMELLIA256-SHA384:ECDHE-RSA-CAMELLIA256-SHA384:DHE-RSA-CAMELLIA256-SHA256:DHE-DSS-CAMELLIA256-SHA256:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA:DHE-DSS-AES256-SHA:DHE-RSA-CAMELLIA256-SHA:DHE-DSS-CAMELLIA256-SHA:RSA-PSK-AES256-GCM-SHA384:DHE-PSK-AES256-GCM-SHA384:RSA-PSK-CHACHA20
@rubo77
rubo77 / comments_in_gluon_firmware.ascii
Created April 5, 2020 07:39
all comments in gluon firmware
# Copyright (C) 2013 Project Gluon
# Copyright (C) 2013 Project Gluon
# Firewall script for inserting and removing ebtables rules.
# Example format, for filtering any IPv4 multicast packets to the SSDP UDP port:
# rule FORWARD --logical-out br-client -d Multicast -p IPv4 --ip-protocol udp --ip-destination-port 5355 -j DROP
# Removing all rules:
# $ /etc/init.d/gluon-ebtables stop
# Inserting all rules:
# $ /etc/init.d/gluon-ebtables start
# Inserting a specific rule file:
@rubo77
rubo77 / rotatescreen.sh
Last active October 7, 2024 07:15
This script rotates the screen (tested on a Lenovo Yoga 730-15iwl) (source: https://askubuntu.com/a/1217290/34298)
#!/bin/bash
# This script rotates the screen and touchscreen
# by Ruben Barkow-Kuder: https://gist.github.com/rubo77/daa262e0229f6e398766
#### configuration
# find your Touchscreen device with `xinput`
TouchscreenDevice="$(xrandr |grep eDP|cut -d" " -f1)"
if [ "$1" = "--help" ] || [ "$1" = "-h" ] ; then
@rubo77
rubo77 / matrix-synapse-commands-in-riot.md
Last active April 26, 2022 06:48
matrix synapse commands in riot

/shrug

args:

<message>

description:

Prepends ¯\(ツ)/¯ to a plain-text message

/plain

args:

``

@rubo77
rubo77 / snap-update.sh
Last active September 20, 2024 17:14
start snap service, delete snap backups, do a refresh and disable it again
#!/bin/bash
# this script starts the snapd service, deletes old snap images, does a refresh and disables it again
# put it in /usr/local/sbin/snap-update and give it executable rights
# Note: If you run apt upgrade and there is an update to a package that is managed by snapd,
# the upgrade will hang if snapd is still masked, so remember to unmask snapd in that case
# and start apt upgrade again
set -x
systemctl unmask snapd.service