Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View will-in-wi's full-sized avatar

William Johnston will-in-wi

View GitHub Profile
@will-in-wi
will-in-wi / arw.xml
Created January 20, 2017 18:37
HTTPS enclosures to test validators
<rss version="2.0" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>American RadioWorks</title>
<link>http://www.americanradioworks.org/</link>
<description>American Public Media's American RadioWorks creates documentaries, series projects, and investigative reports for the public radio system and the Internet.We have a special interest in exploring the people, ideas, and innovations that are changing education in the 21st century. We also examine critical issues in civil society, health care, the environment, business and economics.@amradioworks</description>
<language>en-us</language>
<copyright>Copyright 2017 American Public Media</copyright>
<ttl>60</ttl>
<itunes:author>American RadioWorks</itunes:author>
<itunes:summary>American Public Media's American RadioWorks creates documentaries, series projects, and investigative reports for the public radio system and the Internet.We have a special interest in ex

Keybase proof

I hereby claim:

  • I am will-in-wi on github.
  • I am willinwi (https://keybase.io/willinwi) on keybase.
  • I have a public key ASDmHXlBeEB7URpkGmjRNdy8dTtc6dV3SV4Evr20jmosugo

To claim this, I am signing this object:

require "capistrano/setup"
require "capistrano/deploy"
@will-in-wi
will-in-wi / soundmanager-position.html
Created January 21, 2014 16:00
A test for starting at the right position on initial playback.
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Test time to duration</title>
<meta name="viewport" content="width=device-width, user-scalable=no" />
<script src="script/soundmanager2.js"></script>
@will-in-wi
will-in-wi / serialization-test-case.php
Created December 13, 2013 21:29
Test case for PHP serialization bug
<?php
class HelloWorld implements Serializable {
public $test;
public function __construct($str)
{
$this->test = $str;
}
@will-in-wi
will-in-wi / jquery-oas.js
Created June 10, 2013 19:40
An attempt to create a jquery plugin for async OAS usage. Unused.
(function($){
// Properties is an object with the following keys:
// listpos (required) A comma delimited list (no spaces) of the used positions on this page.
// sitepage (optional) The page to be sent for the ad server. Defaults to the current page.
//
// Position is defined by the data-oas-pos attribute. The ad will be inserted inside.
$.fn.oas = function(properties) {
// Set default properties and fail on required properties.
if (typeof(properties.sitepage) === 'undefined') {
@will-in-wi
will-in-wi / calendar.html
Created May 31, 2013 10:42
Responsive calendar which switches between a grid and list.
<!DOCTYPE html>
<html>
<head>
<title>Calendar Multires Demo</title>
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0" />
<style type="text/css">
body {
font-family: Arial;
@will-in-wi
will-in-wi / gist:5031902
Created February 25, 2013 18:07
SSI Copyright Example
<footer>
<p>&copy; <!--#config timefmt="%Y" --> <!--#echo var="DATE_LOCAL" --> My Company, Inc.</p>
</footer>
@will-in-wi
will-in-wi / displayChars.php
Last active December 12, 2015 12:19
Useful for debugging weird character encoding issues.
<?php
function displayChars($str) {
$arr = array();
$chars = str_split($str);
foreach ($chars as $key => $value) {
$arr[] = array($value, ord($value));
}
var_dump($arr);
}
@will-in-wi
will-in-wi / sphere.js
Created January 13, 2013 19:52
Basic code to create a filled sphere with ScriptCraft
function sphere(material, radius) {
for (var i = 0; i <= radius; i++) {
up(radius + i).fwd(radius - Math.round(Math.sqrt(radius*radius - i*i))).right(radius - Math.round(Math.sqrt(radius*radius - i*i))).cylinder(material, Math.round(Math.sqrt(radius*radius - i*i)), 1);
up(radius - i).fwd(radius - Math.round(Math.sqrt(radius*radius - i*i))).right(radius - Math.round(Math.sqrt(radius*radius - i*i))).cylinder(material, Math.round(Math.sqrt(radius*radius - i*i)), 1);
}
}