Skip to content

Instantly share code, notes, and snippets.

<%@ control language="c#" inherits="ArenaWeb.Templates.SampleThree, Arena" %>
<script runat="server">
protected override void OnInit( EventArgs e )
{
base.OnInit( e );
HtmlMeta child = new HtmlMeta();
child.HttpEquiv = "X-UA-Compatible";
child.Content = "IE=edge";
@bzerangue
bzerangue / php5-fpm.conf
Created April 24, 2014 20:09
php5-fpm.conf
<IfModule mod_fastcgi.c>
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
<Directory "/var/www/fastcgi">
Order allow,deny
<Files "php5.fastcgi">
Order deny,allow
</Files>
@bzerangue
bzerangue / example.com
Created April 24, 2014 20:16
Virtual Host example with Apache MPM Worker and PHP-FPM
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName example.com
ServerAlias www.example.com
DocumentRoot /home/username/sites/example.com/public
<Directory /home/username/sites/example.com/public>
Options -Indexes FollowSymLinks -MultiViews
AllowOverride All
@bzerangue
bzerangue / get-esv.php
Last active August 29, 2015 14:00
Pull ESV Bible verses from http://www.esvapi.org/v2/
<?php
$key = "IP";
// This value would be in text field in Craft
$passage = urlencode("1 Thessalonians 1:8-9; Psalm 115:1-8");
$options = "audio-format=mp3";
$url = "http://www.esvapi.org/v2/rest/passageQuery?key=$key&passage=$passage&$options";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@bzerangue
bzerangue / UrlToolkit-PhileCMS.conf
Last active August 29, 2015 14:01
Hiawatha Web Server UrlToolkit for PhileCMS (philecms.com)
UrlToolkit {
ToolkitID = philecms
RequestURI exists Return
Match ^/index.php Return
Match ^/(.*)\?(.*) Rewrite /index.php?q=$1&$2
Match ^/(.*) Rewrite /index.php?q=$1
}
@bzerangue
bzerangue / symphonycms-nginx.conf
Created May 22, 2014 22:26
NGINX Rewrite Rules for Symphony CMS
# Symphony CMS nginx configuration
location ~ ^/manifest/(.*)$ {
return 403;
}
location ~ ^/workspace/utilities/(.*).xsl$ {
return 403;
}
location ~ ^/workspace/pages/(.*).xsl$ {
return 403;
}
@bzerangue
bzerangue / rss-markdown.rb
Created August 1, 2014 20:40
Jekyll Import RSS-Markdown
# Created by Kendall Buchanan (https://github.com/kendagriff) on 2011-12-22.
# Use at your own risk. The end.
#
# Usage:
# (URL)
# ruby -r 'jekyll/jekyll-import/rss' -e "JekyllImport::RSS.process(:source => 'http://yourdomain.com/your-favorite-feed.xml')"
#
# (Local file)
# ruby -r 'jekyll/jekyll-import/rss' -e "JekyllImport::RSS.process(:source => './somefile/on/your/computer.xml')"
@bzerangue
bzerangue / home.xml
Last active August 29, 2015 14:07 — forked from bauhouse/home.xml
<?xml version="1.0" encoding="utf-8" ?>
<data>
<params>
<today>2011-10-27</today>
<current-time>16:00</current-time>
<this-year>2011</this-year>
<this-month>10</this-month>
<this-day>27</this-day>
<timezone>-07:00</timezone>
<website-name>Symphony CMS</website-name>
<data>
<staff>
<section id="22" handle="leadership-and-staff-profiles">Leadership &amp; Staff Profiles</section>
<entry id="136">
<partner handle="arrvel-wilson">Arrvel Wilson</partner>
<info mode="formatted"><p><b>SWD Founder</b><br/>
</p>
</info>
<profile size="3 KB" path="/uploads" type="image/jpeg">
<filename>photo-arrvel-wilson-519a4a3b6be9b.jpg</filename>