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
#define STATIC_CONSTRUCTOR(className, methodPostfix, methodArgs, initArgs, constructorArgs) \ | |
static className* create ## methodPostfix methodArgs \ | |
{ \ | |
className *instance = new className constructorArgs; \ | |
if (instance && instance->init ## methodPostfix initArgs) \ | |
{ \ | |
instance->autorelease(); \ | |
} \ | |
else \ | |
{ \ |
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
find ./ -type f | grep .DS_Store | xargs rm |
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
// Flag indicating that the punndit bar has | |
// already been loaded and initialized at least once. | |
var punnditLoaded = false; | |
// The WGNCustomAdHandler is going to be fired when the | |
// media in the WN player changes. The specific event we | |
// are interested in is the NewMedia event. It is fired | |
// whenever a pre-roll, clip and post-roll video is started. |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>JW Player Example - With Dynamic Video Changes</title> | |
<!-- Stylesheet for the Punndit Bar --> | |
<link rel="stylesheet" href="http://cdn.punndit.com/stylesheets/bar.css" type="text/css" media="screen" charset="utf-8" id="pndt-bar-css" /> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.js"></script> | |
<script type='text/javascript' src='./jwplayer.js'></script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> | |
<title>JW Player</title> | |
</head> | |
<body> | |
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script> | |
<script type='text/javascript' src='./jwplayer.js'></script> |
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
<!-- | |
This following lines should be placed at the location on your page where you would | |
like the punndit player to appear. | |
The data-punn-id attribute should be any value that will uniquely | |
identify the video you are attaching the punndit bar to. | |
For example if you were attaching the bar to a YouTube video | |
data-punn-id could be set to the URL of the YouTube video. | |
--> |
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
var app = $.sammy(function(){ | |
this.element_selector = '#content'; | |
this.get(/\#!\/(.*)/, function(context){ | |
this.partial('/' + this.params['splat']); | |
}); | |
}); | |
$(document).ready(function(){ | |
app.run('#!/'); | |
// We will setup all of our links in the |
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
var app = $.sammy(function(){ | |
this.element_selector = '#content'; | |
this.get(/\#!\/(.*)/, function(context){ | |
this.partial('/' + this.params['splat']); | |
}); | |
}); | |
$(document).ready(function(){ | |
app.run('#!/'); | |
}); |
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
<% @channel.articles.each do |article| %> | |
# all values of the article are available here | |
<% 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
# /usr/lib/ruby/gems/1.8/gems/zencoder-2.1.13/lib/zencoder/http.rb | |
require 'openssl' | |
OpenSSL::SSL::VERIFY_PEER = OpenSSL::SSL::VERIFY_NONE | |
# DAMMIT! Or you can just read the docs and figure out you can do this... | |
Zencoder::HTTP.default_options.merge!(:skip_ssl_verify => true) |
NewerOlder