Skip to content

Instantly share code, notes, and snippets.

View florianbrinkmann's full-sized avatar

Florian Brinkmann florianbrinkmann

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Keybase proof

I hereby claim:

  • I am florianbrinkmann on github.
  • I am florianbrinkmann (https://keybase.io/florianbrinkmann) on keybase.
  • I have a public key whose fingerprint is 1BA6 7B53 EE82 8489 0CEA 0EB7 9C4A 410F 7E81 845E

To claim this, I am signing this object:

<?php
/**
* Needs php_mbstring extension
*/
ini_set( 'memory_limit', '1024M' );
date_default_timezone_set( 'UTC' );
// Damit es in der Konsole nicht so lange dauert
error_reporting( 0 );
// <load users file>
/**
* If registration for new network sites is disabled,
* the NOBLOGREDIRECT constant redirects to a specific URL
* if a user tries to access a nonexisting network site.
*/
// add this to wp-config.php and adjust the URL
define( 'NOBLOGREDIRECT', 'https://example.com' );
/**
@florianbrinkmann
florianbrinkmann / dropcap.js
Last active September 4, 2018 00:10
Modified version of Adobe’s dropcap.js (https://github.com/adobe-webplatform/dropcap.js) to make it responsive
/*
Copyright 2014 Adobe Systems Incorporated. Licensed under the Apache 2.0 License.
http://www.apache.org/licenses/LICENSE-2.0.html
*/
(function () {
"use strict";
// Reference terms: http://blogs.wayne.edu/bcam/wp-content/blogs.dir/308/files/2013/09/glyphterms.gif
<?php
/*
Plugin Name: UTF8mb4-convert
Version: 1.0
*/
function update_db_to_utf8mb4() {
if ( ! isset( $_GET['update-utf8bm4'] ) ) {
return;
}
;(function () {
/**
* Run function when customizer is ready.
*/
wp.customize.bind('ready', function () {
wp.customize.control('slug_select_control', function (control) {
/**
* Run function on setting change of control.
*/
control.setting.bind(function (value) {
@florianbrinkmann
florianbrinkmann / custom-tinymce-button.js
Last active June 27, 2017 14:24
Code to add a custom button to the TinyMCE editor (needs WordPress 4.8)
/**
* Listen to setup of a TinyMCE instance.
*/
jQuery(document).on('tinymce-editor-setup', function (event, editor) {
/**
* Add the id of the soon-to-create button to the
* toolbar1.
*
* @type {string}
*/
@florianbrinkmann
florianbrinkmann / style.css
Last active December 26, 2017 14:59
Child theme stylesheet for rindby theme
/*
Theme Name: Rindby Child
Theme URI: https://florianbrinkmann.com/en/wordpress-themes/rindby/
Author: Florian Brinkmann
Description: Child theme for Rindby.
Version: 1.0.0
Template: rindby
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
@florianbrinkmann
florianbrinkmann / lazy-loader-spinner.css
Last active February 22, 2018 14:06
Add spinner to images that are currently loaded by lazysizes
/* Spinner SVG by Sam Herbert (https://github.com/SamHerbert/SVG-Loaders), published under the MIT License */
.lazyloading {
color: transparent;
opacity: 1;
transition: opacity 300ms;
background: url("data:image/svg+xml,%3Csvg width='44' height='44' xmlns='http://www.w3.org/2000/svg' stroke='%23333'%3E%3Cg fill='none' fill-rule='evenodd' stroke-width='2'%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='0s' dur='1.8s' values='1; 20' calcMode='spline' keyTimes='0; 1' keySplines='0.165, 0.84, 0.44, 1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='0s' dur='1.8s' values='1; 0' calcMode='spline' keyTimes='0; 1' keySplines='0.3, 0.61, 0.355, 1' repeatCount='indefinite'/%3E%3C/circle%3E%3Ccircle cx='22' cy='22' r='1'%3E%3Canimate attributeName='r' begin='-0.9s' dur='1.8s' values='1; 20' calcMode='spline' keyTimes='0; 1' keySplines='0.165, 0.84, 0.44, 1' repeatCount='indefinite'/%3E%3Canimate attributeName='stroke-opacity' begin='-0.9s' dur='1.8s' values='1