This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- static xml use as static xml datasource to configure --> | |
<entry> | |
<name type="required"> | |
<text size="40" /> | |
</name> | |
</entry> | |
<entry> | |
<lastname type="optional"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<images> | |
<file size="345 KB" path="/images" type="image/jpeg"> | |
<filename>1z9x6l7.jpg</filename> | |
<meta creation="2013-09-11T13:39:53+01:00" width="2560" height="1440" /> | |
</file> | |
<file size="367 KB" path="/images" type="image/jpeg"> | |
<filename>adfp6hk.jpg</filename> | |
<meta creation="2013-09-11T13:40:30+01:00" width="1920" height="1280" /> | |
</file> | |
<file size="4.15 MB" path="/images" type="image/jpeg"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// After making the required edits below, use something like http://daringfireball.net/2007/03/javascript_bookmarklet_builder to create the bookmarklet. | |
(function(){ | |
var form=document.createElement("form"); | |
// Edit the action value to match your domain and section names. | |
form.setAttribute("action","http://example.com/symphony/publish/entries/new/"); | |
form.setAttribute("method","post"); | |
// Edit the params to match your auth-token | |
// (found on the author page) and section fields. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// configuration | |
mysql_connect("host","username","password"); | |
mysql_select_db("database"); | |
// do it | |
$resource = mysql_query("SHOW TABLES"); | |
while ($row = mysql_fetch_array($resource)) { | |
$table = $row[0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"require": { | |
"slim/slim": "2.*", | |
"illuminate/database": "*", | |
"dhorrigan/capsule": "*" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check for the hostname here | |
SetEnvIfNoCase HOST ^(www\.)?website\.co\.uk$ PROTECTED_HOST | |
<Directory /path/to/htdocs> | |
AuthType Basic | |
AuthName "Authentication" | |
AuthUserFile /path/to/.htpasswd | |
Order Deny,Allow | |
Satisfy any | |
Deny from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @package toolkit | |
*/ | |
/** | |
* The DatabaseException class extends a normal Exception to add in | |
* debugging information when a SQL query fails such as the internal | |
* database error code and message in additional to the usual |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<data> | |
<site-basket-contents> | |
<group id="basket"> | |
<item id="261" count="1"> | |
<item id="price">135.00</item> | |
<item id="shipping">9.50</item> | |
</item> | |
<item id="57" count="1"> | |
<item id="price">58.50</item> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env ruby | |
submods = Hash.new | |
%x{git config -f .gitmodules --get-regexp '^submodule\..*\.(path|url)$'}.lines.each do |l| | |
submodule, key, value = l.match(/^submodule\.(.*)\.(path|url)\s+(.*)$/)[1..3] | |
submods[submodule] = Hash.new unless submods[submodule].is_a?(Hash) | |
submods[submodule][key] = value | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
# | |
# INSPIRATION FROM Nick Dunn (in the Symphony CMS forum) | |
# "Convert a Directory of Markdown Text Files for Dynamic XML Datasource Use" | |
# http://getsymphony.com/discuss/thread/60701/#position-2 | |
# | |
# AND FROM Stack Overflow | |
# http://stackoverflow.com/questions/8545010/php-reading-first-2-lines-of-file-into-variable-and-cylce-through-subfolders/8545451#8545451 | |
# |