Skip to content

Instantly share code, notes, and snippets.

View seraphyn's full-sized avatar
🏠
Working from home and loving' it

Christian M. Grube seraphyn

🏠
Working from home and loving' it
View GitHub Profile
@seraphyn
seraphyn / ugreen_truenas_led.md
Created November 12, 2024 08:56 — forked from Kerryliu/ugreen_truenas_led.md
TrueNAS UGREEN DXP4800 Plus Status LED Guide

UGREEN DXP4800 Plus TrueNAS Status LED Guide

20240609_035951642_iOS

The following is a quick guide on getting basic status LED functionality working with TrueNAS running on the UGREEN DXP4800 Plus. Theoretically, it should work on all models (with some small revisions to the script), but I only have a DXP4800 Plus. :)

This guide is for cron job that runs a script to update the LEDs every couple minutes, but I'm sure the following can be modified for blinky LEDs as well.

Steps:

[guide] keycloak authentication for proxmox

How to setup Proxmox to use Keycloak as authentication realm.

Proxmox Setup

root@proxmox:/etc/pve# cat domains.cfg
pam: pam
        comment Linux PAM standard authentication
@seraphyn
seraphyn / sles_udpates_list.yml
Last active September 24, 2024 12:28
There is a zypper core module for ansible (https://docs.ansible.com/ansible/latest/collections/community/general/zypper_module.html), which unfortunately does not show the available updates. I helped myself to write this ansible playbook years ago and thought maybe someone else could use it in their everyday life.
- hosts: sles
become: true
become_user: root
tasks:
- name: Zypper Uppate awk to file
shell:
" zypper ref && zypper lu | awk '{print $5, $7, $9 }' | sed -e '1,10d' | sed 's/\"//' > /tmp/awklist.txt "
register: lsout
tags: lsout
@seraphyn
seraphyn / UserScript-RedditNoPromoted.js
Created October 4, 2023 15:54 — forked from rohenaz/UserScript-RedditNoPromoted.js
UserScript - Remove Reddit Promoted Post
// ==UserScript==
// @name Reddit Hide Promoted Links (New Design)
// @namespace http://github.com/rohenaz
// @version 0.1
// @description remove promoted posts and advertisements
// @author Satchmo
// @match https://www.reddit.com/*
// @grant none
// ==/UserScript==
@seraphyn
seraphyn / README.md
Created May 22, 2023 14:09 — forked from darrenpmeyer/README.md
Automatically start a single instance of ssh-agent for all terminal sessions to share (bash)

Installation

  1. mkdir -p ~/.config && touch ~/.config/ssh-agent.pid
  2. Paste the contents of ssh-agent-manage.sh into your .bashrc or .bash_profile or similar
  3. killall -9 ssh-agent
  4. Start a new terminal session (note: old sessions will not see ssh-agent, only new ones)

Details

This snippet, when included in .bashrc, will ensure that your session has a working ssh-agent with all your ssh keys loaded into it. It does this without creating separate ssh-agent processes by:

@seraphyn
seraphyn / .htaccess
Created February 8, 2023 07:20 — forked from seoagentur-hamburg/.htaccess
UPDATE 2022/10: Perfect .htaccess file for highspeed and security. You can use it for every WordPress-Website without problems. Highspeed and Security - testet on hundreds of Websites. If you are using a WordPress Multisite, change the last part of this file.
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2.0.6 - 10/2022
# ----------------------------------------------------------------------
# @Author: Andreas Hecht
# @Author URI: https://seoagentur-hamburg.com
# License: GNU General Public License v2 or later
# License URI: http://www.gnu.org/licenses/gpl-2.0.html
########################################################################
@seraphyn
seraphyn / wikijs-keycloak-config-guide.md
Created May 30, 2022 11:48 — forked from Sherex/wikijs-keycloak-config-guide.md
A guide for configuring Keycloak as a authentication provider in WikiJS | https://wiki.js.org | Feature request for adding this to the docs: https://requarks.canny.io/wiki/p/keycloak-auth-docs-proposal-for-a-guide-written
@seraphyn
seraphyn / listusercronjobs.sh
Created September 24, 2021 09:54
Cron aller Benutzer anzeigen
#!/bin/bash
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")
# Given a stream of crontab lines, exclude non-cron job lines, replace
@seraphyn
seraphyn / debian_upgradable_ansible
Created September 23, 2021 15:24
Zeige upgradefähige Pakete auf deb-basierte Servern und gebe sie aus
- hosts: servers
tasks:
- name:
apt:
update_cache: yes
- name:
command: apt list --upgradable
register: updates
- debug: var=updates.stdout_lines
@seraphyn
seraphyn / psn-account-id.py
Created April 13, 2021 07:14
Dieses Script ermöglicht es uns die PSN Account ID für die Anmeldung an unsere Konsole in Erfahrung zu bringen. Bei der PSN Account ID handelt es sich nicht um unseren PSN Spielernamen bzw. die Kontendaten für das Playstationnetwork.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import requests
from urllib.parse import urlparse, parse_qs, quote, urljoin
import pprint
import base64