Skip to content

Instantly share code, notes, and snippets.

@zvineyard
zvineyard / nnu_youtube_embed.js
Last active December 20, 2015 09:09
JS: NNU Embed YouTube Video
<script>
var configYouTubePlayer = {
// The YouTube video ID that identifies the video that the player will load.
videoID: 'Rk6_hdRtJOE',
// The height of the video player. The default value is 390.
height: 390,
// The width of the video player. The default value is 640.
width: 640,
@zvineyard
zvineyard / vagrant-bootstrap
Last active January 3, 2016 00:19
Vagrant (VirtualBox) bootstrap. Holla!
#!/usr/bin/env bash
# Upgrade Base Packages
sudo apt-get update
sudo apt-get upgrade -y
# Install Web Packages
sudo apt-get install -y apache2
rm -rf /var/www
ln -fs /vagrant /var/www
@zvineyard
zvineyard / Typo3: Body Tag Class
Created January 21, 2014 22:16
Add class to body tag using TypoScript.
# Add class to body tag
page.bodyTag >
page.bodyTagCObject = TEXT
page.bodyTagCObject.value= industrial
page.bodyTagCObject.wrap = <body class="|">
@zvineyard
zvineyard / PyroCMS: Multiple Relationship Streams Example
Last active August 29, 2015 13:56
A multiple relationship streams tag example for PyroCMS, using two streams to output data.
{{ streams:cycle stream="articles" namespace="cope" paginate="yes" pag_segment="2" limit="10" order_by="created" sort="desc" }}
<!--{{ total }} entries returned-->
<div>
{{ entries }}
<p>{{ title }}</p>
<p>
{{ streams:departments }}
@zvineyard
zvineyard / pyrocms_core_hacks
Last active August 29, 2015 13:56
PyroCMS Core Hacks
system/cms/core/Public_Controller.php, around line 103:
if($this->uri->segment(1) !== 'story')
{
$this->template->set_metadata('canonical', site_url($this->uri->uri_string()), 'link');
}
@zvineyard
zvineyard / cope_articles_pyrocms_tag
Last active August 29, 2015 13:57
PyroCMS Tag: Cope Articles
<div class="posts">
{{ articles:preview limit="2" }}
<div class="post" style="border:none;margin:0;">
<h2><a href="story/{{ article_slug }}">{{ article_title }}</a></h2>
<div class="meta">
<p class="pub_date">{{ helper:date timestamp=created }}</p>
</div>
{{ if thumb_id }}
@zvineyard
zvineyard / typo3_link_conversion_functions
Last active December 22, 2017 10:21
Typo3: Convert <link> to <a> Regex PHP
@zvineyard
zvineyard / gist:6e2f4b1c8fe896fc0915
Last active August 29, 2015 14:06
Messenger Homepage HTML with Tag
<div class="grid_8 alpha">
<div class="posts">
{{ articles:preview limit="4" where="`messenger_issue`='summer_2014'" }}
<div class="post">
<h2><a href="story/{{ article_slug }}">{{ article_title }}</a></h2>
<div class="meta">
<p class="pub_date">{{ helper:date timestamp=article_created }}</p>
</div>
{{ if thumb_id }}
image original dimensions (???x???)
files/large/1
files/thumb/1/auto/auto
files/thumb/1/auto/auto/fill
files/thumb/1/auto/auto/fit
max default dimensions (100x100) with aspect ratio
files/thumb/1
@zvineyard
zvineyard / ssl_apache_config.txt
Created June 17, 2015 04:33
SSL Apache Config
<VirtualHost *:443>
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/yourdomain_com.crt
SSLCertificateKeyFile /etc/apache2/ssl/yourdomain_com.key
SSLCACertificateFile /etc/apache2/ssl/yourdomain_com.cer
ServerAdmin [email protected]
ServerName www.yourdomain.com
DocumentRoot /var/www/yourdomain.com/public_html/
ErrorLog /var/www/yourdomain.com/logs/error.log