Skip to content

Instantly share code, notes, and snippets.

View moskowite's full-sized avatar

Tyler Moskowite moskowite

  • Santa Rosa, CA
  • 15:38 (UTC -07:00)
View GitHub Profile
@moskowite
moskowite / HTML 5 1
Created September 5, 2012 23:55
slideshow cpt
add_action( 'init', 'make_slideshow_cpt' );
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Weekend Projects Sponsored by Radio Shack</title>
<style type="text/css">
body { font-family: sans-serif; margin:0px; width:520px; overflow:hidden; }
.new_red { padding:17px; border:3px solid #c61d23; margin:15px 0px; background-color: #ed1c24; display:inline-block; color:#fff;}
.new_red h1 { color:#fff; font-size:22px; text-transform: uppercase; }
@moskowite
moskowite / gist:3101367
Created July 12, 2012 22:00
bottle raido
<div class="span3">
<div class="blurbMini">
<div class="blurbImage">
<a class="" target="_blank" href="http://makeprojects.com/Project/Bottle-Radio/2077/1">
<img class="pull-left thumbnail" src="http://guide-images.makeprojects.org/igi/IH43iswYQZNRMPWU.thumbnail" alt="Blurb image" />
</a>
@moskowite
moskowite / js
Created June 11, 2012 23:44
wtf is this js
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-upload fade">
<td class="preview"><span class="fade"></span></td>
<td class="name"><span>{%=file.name%}</span></td>
<td class="size"><span>{%=o.formatFileSize(file.size)%}</span></td>
{% if (file.error) { %}
<td class="error" colspan="2"><span class="label label-important">{%=locale.fileupload.error%}</span> {%=locale.fileupload.errors[file.error] || file.error%}</td>
{% } else if (o.files.valid && !i) { %}
<td>
<div class="progress progress-success progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="0"><div class="bar" style="width:0%;"></div></div>
<div class="control-group">
<label class="control-label" for="textarea">Content</label>
<div class="controls">
<textarea class="input-xlarge" id="textarea" rows="3"></textarea>
<p class="help-block">Suggested content/contributor quote.</p>
</div>
</div>
$att = "value";
$bogus = array('<p>', '</p>', '<br>');
foreach ($results as $item) {
$blurb = $item->S;
$better = str_replace($bogus, "", $blurb);
$image = $item->xpath(".//DataObject[@type='cse_image']/Attribute");
if ( !empty($image)) {
echo '<div class="row result"><div class="result">';
echo '<div class="span2">';
http://blogs.oreilly.com/makedeal/shed.js
var newcontent = document.createElement('p');
newcontent.id = 'js-shed-homepage';
newcontent.appendChild(document.write('<MTEntries lastn="1" sort_order="descend"><div id="dotd"><img src="<MTentrydatadotd_image>" alt="<MTentrydatadotd_product_title>" /><h4><MTentrydatadotd_product_title></h4></div></mtentries>'));
var scr = document.getElementById('maker-shed-grabber');
scr.parentNode.insertBefore(newcontent, scr);
http://blog.makezine.com/mshomepagewidget/
<div class="promo last dotd">
<style>.dotd img { float:right;max-width:90px;padding:3px;background:#EEE; border: 1px solid #CCC;border-image: initial; } </style>
<h3>Deal of the Day</h3>
<script type="text/javascript" id="maker-shed-grabber" src="http://blogs.oreilly.com/makedeal/shed.js"></script><div id="dotd"><img src="http://www.makershed.com/v/vspfiles/photos/MKLH1-2T.jpg" alt="DIY Hologram Kit"><h4>DIY Hologram Kit</h4></div>
<a href="http://www.makershed.com/dealoftheday.asp" class="cta">Save Now</a>
</div>
<div class="promo last dotd">
<style>.dotd img { float:right;max-width:90px;padding:3px;background:#EEE; border: 1px solid #CCC;border-image: initial; } </style>
<h3>Deal of the Day</h3>
<script type="text/javascript" id="maker-shed-grabber" src="http://blogs.oreilly.com/makedeal/shed.js"></script><div id="dotd"><img src="http://www.makershed.com/v/vspfiles/photos/MKLH1-2T.jpg" alt="DIY Hologram Kit"><h4>DIY Hologram Kit</h4></div>
<a href="http://www.makershed.com/dealoftheday.asp" class="cta">Save Now</a>
</div>
<!DOCTYPE html>
<html lang="en">
<head>
<meta>
<title>Maker Faire - The Worlds Largest DIY Festival</title>
<meta name="description" content="">
<meta name="author" content="">
<!-- Le HTML5 shim, for IE6-8 support of HTML elements -->