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 / 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
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Use mycli (http://mycli.net/) through ssh
Usage:
$ mycli-ssh yourhost [extra args passed to mycli]
"""
@seraphyn
seraphyn / block_china_ufw.sh
Created October 7, 2016 08:18 — forked from lewg/block_china_ufw.sh
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
#!/bin/sh
# UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
# Based on http://www.wizcrafts.net/chinese-iptables-blocklist.html
# Cambodia (KH)
ufw deny from 114.134.184.0/21 to any port 22
# Chinese (CN) IP addresses follow:
ufw deny from 1.192.0.0/13 to any port 22
ufw deny from 1.202.0.0/15 to any port 22
@seraphyn
seraphyn / tt2srt.py
Created February 22, 2016 08:20
Timed Text Captions to SRT Subtitles converter script
#!/usr/bin/env python
# Usage: python tt2srt.py source.xml output.srt
# FROM: https://gist.github.com/adammw/915259
from xml.dom.minidom import parse
import sys
def fixTime(time):
parts = time.split(':')
frames = int(parts[3]) # 00..24
@seraphyn
seraphyn / youtube.rb
Created January 29, 2012 20:01 — forked from portwaypoint/youtube.rb
Jekyll youtube liquid template tag. Use with {% youtube IDOFVIDEO %} ... Found http://www.portwaypoint.co.uk/jekyll-youtube-liquid-template-tag-gist/
module Jekyll
class Youtube < Liquid::Tag
@@width = 640
@@height = 510
def initialize(name, id, tokens)
super
@id = id
end