Skip to content

Instantly share code, notes, and snippets.

View howardgrigg's full-sized avatar

Howard Grigg howardgrigg

View GitHub Profile
@howardgrigg
howardgrigg / gist:d4d7abeb5aea4eb8e048
Created July 17, 2014 22:38
Get Youtube ID from URL
function YouTubeID(){
if($youtube_url = $this->YouTubeLink){
$url = parse_url($youtube_url);
if( $url['host'] !== 'youtube.com' &&
$url['host'] !== 'www.youtube.com'&&
$url['host'] !== 'youtu.be'&&
$url['host'] !== 'www.youtu.be')
return '';
#!/bin/sh
GIT_WORK_TREE=~/sites/testdeploy/ git checkout -f
cd ~/sites/testdeploy/
composer install
sake dev/build
sake / flush=all
<table id="episodes">
<% control orderedEpisodes %>
<tr class="$EvenOdd $FirstLast">
<% if Top.PagePerEpisode %>
<td class="episode-date"><a href="{$Top.Link}episode/{$ID}" title="$Title">$Date.Nice</a></td>
<td class="episode-title"><a href="{$Top.Link}episode/{$ID}" title="$Title">$Title<br />$Speaker <% if Duration %><span class="duration">($Duration <% _t('Mins','mins') %>)</span><% end_if %></a></td>
<% else %>
<td class="episode-date">$Date.Nice</td>
<td class="episode-title">$Title<br />$Speaker <% if Duration %><span class="duration">($Duration <% _t('Mins','mins') %>)</span><% end_if %></td>