Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Christian M. Grube seraphyn

🏠
Working from home
View GitHub Profile
@seraphyn
seraphyn / wikijs-keycloak-config-guide.md
Created May 30, 2022 — 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
View wikijs-keycloak-config-guide.md
@seraphyn
seraphyn / .htaccess
Created Jul 6, 2020 — forked from seoagentur-hamburg/.htaccess
UPDATE 2019/07: 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.
View .htaccess
########################################################################
# OPTIMAL .htaccess FILE FOR SPEED AND SECURITY @Version 2020
# ----------------------------------------------------------------------
# @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
########################################################################
View mycli-ssh
#!/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 Oct 7, 2016 — forked from lewg/block_china_ufw.sh
UFW blocks for China, Korea, Malaysia, Phillipines, Singapore, Thailand and Vietnam netblocks
View block_china_ufw.sh
#!/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 Feb 22, 2016 — forked from mbirth/tt2srt.py
Timed Text Captions to SRT Subtitles converter script
View tt2srt.py
#!/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 Jan 29, 2012 — 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/
View youtube.rb
module Jekyll
class Youtube < Liquid::Tag
@@width = 640
@@height = 510
def initialize(name, id, tokens)
super
@id = id
end