Skip to content

Instantly share code, notes, and snippets.

View eteubert's full-sized avatar

Eric Teubert eteubert

View GitHub Profile
{% for list in podlove.lists({slug: "meta"}) %}
    <h1><a href="{{ list.url }}">{{ list.title }}</a></h1>
    <h2>{{ list.subtitle }}</h2>
    <p>
        Sabbel: {{ list.description }}
    </p>
    <ul>
            {% for episode in list.episodes({limit: 5}) %}
@eteubert
eteubert / feed-list.twig
Created March 13, 2014 04:18
`[podlove-feed-list]` template
<table>
<thead>
<tr>
<th>Feed</th>
<th>Enclosure</th>
</tr>
</thead>
<tbody>
{% for feed in podcast.feeds %}
{% if feed.discoverable %}
@eteubert
eteubert / podlove-episode-list.twig
Created March 12, 2014 14:19
[podlove-episode-list] template
<table>
<thead>
<th></th>
<th>Date</th>
<th>Title</th>
<th>Duration</th>
</thead>
<tbody>
{% for episode in podcast.episodes %}
<tr class="podcast_archive_element">
@eteubert
eteubert / episode-contributors.twig
Last active August 29, 2015 13:56
Podlove Publisher Example Templates
{% macro iconSrc(icon) %}
{{ constant("\\Podlove\\PLUGIN_URL") }}/lib/modules/contributors/images/icons/{{ icon }}-128.png
{% endmacro %}
{% macro iconLink(title, icon, href) %}
<a target="_blank" title="{{ title }}" href="{{ href }}">
<img width="32" height="32" src="{{ _self.iconSrc(icon) }}" class="podlove-contributor-button" alt="{{ title }}" />
</a>
{% endmacro %}
@eteubert
eteubert / auphonic_file_upload.js
Created July 25, 2013 15:40
Create an Auphonic production. Then upload a file to that production.
// Create the XHR object
function createCORSRequest(method, url) {
var xhr = new XMLHttpRequest();
if ("withCredentials" in xhr) {
xhr.open(method, url, true); // XHR for Chrome/Firefox/Opera/Safari
} else if (typeof XDomainRequest != "undefined") {
xhr = new XDomainRequest(); // XDomainRequest for IE
xhr.open(method, url);
} else {
xhr = null; // CORS not supported
# syntax highlighting
source ~/code/git/dotfiles/zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
ZSH_HIGHLIGHT_HIGHLIGHTERS=(pattern)
ZSH_HIGHLIGHT_PATTERNS+=('git*["]?????????????????????????????????????????????????????????????????????????' 'fg=white,bold,bg=red')
ZSH_HIGHLIGHT_PATTERNS+=('gac ?????????????????????????????????????????????????????????????????????????' 'fg=white,bold,bg=red')
<?php
class Foo {
public function bar() {
// ok
$this->bar();
// nicht ok, weil $foo in einer anonymen Funktion steht und der Kontext der Klasse fehlt
add_action('init', function() {
@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
<?php
# into plugin or themes functions.php
function podlove_use_subtitle_as_excerpt( $excerpt ) {
if ( get_post_type() !== 'podcast' )
return $excerpt;
return \Podlove\Model\Episode::find_or_create_by_post_id( get_the_ID() )->subtitle;
}
alle weg