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 / ttrss-update.service
Created September 17, 2015 12:31
Start TinyTinyRSS update Service with systemd instead using cron.
# This file is part of my tinytinyRSSinstallation
# It is used by systemd under Debian Jessie
# WorkingDirectory=/var/www/html/ttrss must be YOUR Installationpath without
# ending slash /
#
# vim /lib/systemd/system/ttrss-update.service
# systemctl enable ttrss-update.service
# systemctl --system daemon-reload
# systemctl start ttrss-update.service
# systemctl status ttrss-update.service
@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
@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 / updatevirtualboxextions
Created December 20, 2012 17:42
Checks if the Extension Pack version matches the installed VirtualBox version and if not, delete the Extension Pack, downloads and installs the new one.
#! /bin/bash
#
#: Title : updateVboxExt
#: Date Created: Fri May 13 13:54:26 PDT 2011
#: Last Edit : Fri May 13 14:34:37 PDT 201
#: Author : please_try_again
#: Version : 1.0
#: Description : Install or update VirtualBox Extension pack
pkg_sit="http://download.virtualbox.org/virtualbox/"