Skip to content

Instantly share code, notes, and snippets.

View eteubert's full-sized avatar

Eric Teubert eteubert

View GitHub Profile
@eteubert
eteubert / wordpress-passwort-reset-unmultisite.php
Last active April 15, 2024 20:45
Multisite: Passwort Reset on Local Blog
<?php
/**
* Plugin Name: Multisite: Passwort Reset on Local Blog
* Plugin URI: https://gist.github.com/eteubert/293e07a49f56f300ddbb
* Description: By default, WordPress Multisite uses the main blog for passwort resets. This plugin enables users to stay in their blog during the whole reset process.
* Version: 1.0.0
* Author: Eric Teubert
* Author URI: http://ericteubert.de
* License: MIT
*/
@eteubert
eteubert / Git Workflow
Created January 17, 2011 19:03
2 branches: master = live, dev = development
# start work on a new feature
# creates a new branch based on the latest stable version (which is master)
function gfnew () {
git checkout master
git checkout -b $*
}
# make the feature available in dev.ingame.de
# push changes to dev and then checkout featurebranch again
# so you can continue to work on it immediately
@eteubert
eteubert / default.twig
Created November 1, 2023 20:03
Podlove Publisher Default Template
{% if not is_feed() %}
{# display web player for episode #}
{{ episode.player }}
{% endif %}
{# display contributors if module is active #}
{% if shortcode_exists("podlove-episode-contributor-list") %}
{# see http://docs.podlove.org/podlove-publisher/reference/shortcodes.html#contributors for parameters #}
@eteubert
eteubert / feeds_unique.txt
Created July 12, 2013 18:10
List of Podcast RSS Feeds, extracted via iTunes API
This file has been truncated, but you can view the full file.
<http://sailortalk.podOmatic.com/rss2.xml>
HTTP://www.knient.com/CAL/CAL-Podcast/CAL-Podcast.xml
Http://feeds.feedburner.com/fridgeandhbomb
Http://feeds.feedburner.com/wfodicks
Http://ravenc-taouf.podomatic.com/rss2.xml
Http://www.calvaryonline.org/podcasts/podcast.xml
Http://www.changkhui.com/XML/teemateepai.xml
httP://dtfreunde.podcaster.de/Deutsches_Theater.rss
http://-myantioch.sermon.tv/rss/main
http://004.podOmatic.com/rss2.xml
@eteubert
eteubert / iex
Last active May 9, 2023 13:58
nl_buffer.ex
alias Sandbox.Buffer
{:ok, pid} = Buffer.start_link([])
Buffer.push(pid, %{created_at: 5})
Buffer.push(pid, %{created_at: 7})
Buffer.push(pid, %{created_at: 1})
Buffer.inspect(pid)
Buffer.pop(pid) # nil
Process.sleep(3100)
Buffer.pop(pid) # created_at: 1
@eteubert
eteubert / user_agents.csv
Created August 25, 2019 08:59
10.000 Random User Agents
We can't make this file beautiful and searchable because it's too large.
Mozilla/5.0 (Linux\; Android 9\; Mi A1 Build/PKQ1.180917.001\; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.111 Mobile Safari/537.36 GSA/10.33.5.21.arm64
yourApplicationName/2.17.43 (Linux\;Android 5.1.1) ExoPlayerLib/2.10.0
atc/1.0 watchOS/6.0 model/Watch4,4 hwp/t8006 build/17R558 (6\; dt:193)
Mozilla/5.0 (Linux\; Android 9\; Mi MIX 2S) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Mobile Safari/537.36
Mozilla/5.0 (Linux\; Android 9\; SAMSUNG SM-G960F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.4 Chrome/67.0.3396.87 Mobile Safari/537.36
Mozilla/5.0 (Linux\; Android 9\; SM-G950F Build/PPR1.180610.011\; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/76.0.3809.111 Mobile Safari/537.36 GSA/10.33.5.21.arm64
Mozilla/5.0 (Linux\; Android 9\; SM-J600FN) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.111 Mobile Safari/537.36
AppleCoreMedia/1.0.0.19A536g (Macintosh\; U\; Intel Mac OS X 10_15\; de_de)
radio.de 4.14.0 (sa
@eteubert
eteubert / readme.md
Last active October 7, 2022 15:56
Simple template for Podlove Publisher Shownotes

Preview:

@eteubert
eteubert / scaffolding.php
Created November 5, 2011 10:01
WordPress: Tab Layout for Settings Pages
<?php
// initialize plugin
if ( function_exists( 'add_action' ) && function_exists( 'register_activation_hook' ) ) {
add_action( 'plugins_loaded', array( 'tabbed_plugin', 'get_object' ) );
}
class tabbed_plugin
{
// singleton class variable
static private $classobj = NULL;
@eteubert
eteubert / functions-login.php
Created November 7, 2011 13:06
WordPress: Activation Email Customization
<?php
function change_welcome_mail_loginlink( $welcome_email, $user_id, $password, $meta ) {
$welcome_email = str_replace( 'LOGINLINK', 'http://www.mysite.com/my/custom/login/url', $welcome_email );
return $welcome_email;
}
add_filter( 'update_welcome_user_email', 'change_welcome_mail_loginlink', 10, 4 );
@eteubert
eteubert / abstract-example.php
Created October 31, 2011 11:07
WordPress: Customize Page & Post Metaboxes
<?php
$wp_meta_boxes[ 'post' ][ 'normal' ][ 'core' ][ 'post excerpt' ][ 'title' ] = 'Abstract';
$wp_meta_boxes[ 'post' ][ 'normal' ][ 'core' ][ 'post excerpt' ][ 'id' ] = 'postabstract';