Skip to content

Instantly share code, notes, and snippets.

server {
listen 172.20.16.3:80;
location / {
proxy_pass http://172.20.16.3:8080;
}
}
server {
listen 172.20.16.3:443;
ssl on;
ssl_certificate /usr/local/web/conf/ssl.crt/DOMAIN.crt;
rawxml = '<?xml version="1.0" encoding="utf-8" ?>
<versions><version id='6'><id>6</id><auditid>0</auditid><version>NIV</version><name>New International Version</name><short_desc>A short description of the NIV</short_desc><description>A full description of the NIV</description><verse_desc>[NIV]</verse_desc><active>1</active><orderindex>4</orderindex><lang>eng</lang><lang_code>ISO 639-3</lang_code><copyright><![CDATA[Scripture taken from the HOLY BIBLE, NEW INTERNATIONAL VERSION&reg;. NIV&reg;. Copyright &copy; 1973, 1978, 1984 by International Bible Society. Used by permission of Zondervan. All rights reserved worldwide.]]></copyright></version></versions>'
xml =
{"versions"=>{"version"=>{"auditid"=>"0", "name"=>"New International Version", "orderindex"=>"4", "id"=>"6", "verse_desc"=>"[NIV]", "version"=>"NIV", "lang"=>"eng", "copyright"=>"Scripture taken from the HOLY BIBLE, NEW INTERNATIONAL VERSION&reg;. NIV&reg;. Copyright &copy; 1973, 1978, 1984 by International Bible Society. Used by permission of Zonde
// option 1 - "versions" key points to an array
{"versions":
[
{"version":{"id":...}},
{"version":{"id":...}}
]
}
// option 2 - "version" key points to an array
{"versions":
<?xml version="1.0" encoding="utf-8" ?>
<chapters><chapter id='GNT:Ezek.34'><auditid>0</auditid><label></label><text><![CDATA[<span class="title-passage"><span>The Shepherds of Israel</span></span><span class="para"><span class="v26_34_1"><sup class="v26_34_1">1</sup>The
<span class="divineName"><span class='divineCaps'>L</span>ORD</span> spoke to me.
</span><span class="v26_34_2">
<sup class="v26_34_2">2</sup>&ldquo;Mortal man,&rdquo; he said,
“denounce the rulers of Israel. Prophesy to them, and tell them what I, the Sovereign
<span class="divineName"><span class='divineCaps'>L</span>ORD</span>, say to them: You are doomed, you shepherds of Israel! You take care of yourselves, but never tend the sheep.
</span><span class="v26_34_3"><sup class="v26_34_3">3</sup>You drink the milk, wear clothes made from the wool, and kill and eat the finest sheep. But you never tend the sheep.
</span><span class="v26_34_4"><sup class
@lukebaker
lukebaker / ee-template-with-php.php
Created October 19, 2010 15:47
Stuff in EE template
<? $user_info = array(
'set.BillingEmail' => '{email}'
);
foreach ($user_info as $key => $v) {
print $user_info[$key]." == ";
print substr($user_info[$key], 0, -1)."\n";
}
print_r($user_info);
?>
<div id="ideamarketplace" class="box">
<h2>Idea Marketplace</h2>
<!-- uncomment on launch day
<iframe src="http://widget.allourideas.org/princetonusg?submit_button=FCC044&vote_button=FCC044&flag_text=000000&tab_hover=000000&cant_decide_button=FCC044&add_idea_button=FF7600&question_text=000000&text_on_color=000000" width=815 height=400 frameborder=0 scrolling="no"> </iframe>
-->
<!-- default widget code
<iframe src="http://widget.allourideas.org/princetonusg" width=815 height=400 frameborder=0 scrolling="no"> </iframe>
-->
</div>
@lukebaker
lukebaker / widget-info.html
Created March 29, 2011 13:52
Dynamically insert widget with info code.
<div id="ideamarketplace"></div>
<script>
(function(appendTo, info) {
var el = document.createElement("iframe");
el.src = 'http://widget.allourideas.org/testmarketplace?info='+info+'&submit_button=FCC044&vote_button=FCC044&flag_text=000000&tab_hover=000000&cant_decide_button=FCC044&add_idea_button=FF7600&question_text=000000&text_on_color=000000';
el.width = '815';
el.height = '400';
el.frameborder = '0';
el.scrolling = 'no';
document.getElementById(appendTo).appendChild(el);
@lukebaker
lukebaker / playlist-sample.json
Created June 22, 2011 19:55
Sample Playlist
{
"playlist" : {
"id" : "asf123",
"videos" : [
{
"id": "987zyx",
"title": "Aderholt discusses politics on national Christian Radio",
"thumbnail": "thumbnail.jpg",
"poster": "http://www.frc.org/img/item/MD11E02_NORMAL.jpg",
@lukebaker
lukebaker / example-head.html
Created June 29, 2011 18:46
FRC Playlist HTML Head
<script type="text/javascript" src="FRC.player-prod.js"></script>
<link rel="stylesheet" type="text/css" href="playlist-layout.css">
<link rel="stylesheet" type="text/css" href="playlist-colors.css">
@lukebaker
lukebaker / frc-playlist-initialize.html
Created June 29, 2011 18:49
FRC Playlist Initialize
<script>
FRC.player.initialize({
element : '#container',
playlist : '/playlist/123.json',
width: '380',
height: '200',
playlistOrientation: 'vertical'
});
</script>