Skip to content

Instantly share code, notes, and snippets.

@jls
jls / example_punndit_jwplayer.html
Created August 30, 2011 15:39
Example Punndit Embed for JW Player
<!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>
@jls
jls / example_pndt_jwplayer_dynamic.html
Created September 16, 2011 19:52
Example Punndit Embed for JW Player with Dynamic Video Changing
<!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>
@jls
jls / punndit_example_worldnow.js
Created October 5, 2011 14:40
PunnBar with Worldnow example
// 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.
@jls
jls / remove_ds_store_files.sh
Created April 15, 2012 00:45
Remove all of the .DS_Store files in the current directory and all sub directories.
find ./ -type f | grep .DS_Store | xargs rm
@jls
jls / gist:3041591
Created July 3, 2012 18:25
Cocos2d-x Static Constructor Macro
#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 \
{ \