Skip to content

Instantly share code, notes, and snippets.

View sawyerh's full-sized avatar

Sawyer Hollenshead sawyerh

View GitHub Profile
@sawyerh
sawyerh / 3d-html.html
Created April 1, 2012 03:08
3d Zoomable Website - Report
<div id="wrap">
<div id="container">
<div id="environment">
<div id="content">
<section id="level-1">Level 1 Content</section>
<section id="level-2">Level 2 Content</section>
<section id="level-3">Level 3 Content</section>
</div>
@sawyerh
sawyerh / gist:2847661
Created June 1, 2012 00:48
Black and White Images With SVG
<svg width="640" height="360" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2000/svg">
<filter id="grayscale">
<feColorMatrix type="saturate" values="0"/>
</filter>
<image class="bw" filter="url(#grayscale)" width="100%" height="100%" xlink:href="image.jpg" />
<image class="color" width="100%" height="100%" xlink:href="image.jpg" />
</svg>
@sawyerh
sawyerh / clippath.svg
Created June 12, 2012 04:26
SVG Clippath
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@sawyerh
sawyerh / email-template.html
Created July 2, 2012 20:52
Template for BrowserID emails
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
#outlook a{
padding:0;
}
body{
background: url("https://static.dev.anosrep.org/v/fb16875e7d/common/i/grain.png") #76868f;
@sawyerh
sawyerh / gist:4127017
Created November 21, 2012 19:17
bookmarklet
javascript:void((function()%7Bvar%20e=document.createElement('script');e.setAttribute('type','text/javascript');e.setAttribute('charset','UTF-8');e.setAttribute('id', 'wander-bookmarklet-script');e.setAttribute('src','http://lvh.me:3000/bookmarklet/bookmarklet-local.js?v=1&url='+encodeURIComponent(window.location.href));document.body.appendChild(e)%7D)());
<? preg_match('#(?:https?://(?:www\.){0,1}amazon\.(com|ca|co\.uk)(?:/.*){0,1}(?:/dp/|/gp/product/))(.*?)(?:/.*|$)#',$item->content,$matches); ?>
{% if current.type == 'page' %}
{% for post in posts %}
{{ post.body }}
{% endfor %}
{% elsif current.type == 'post' %}
{{ body }}
var attrs = imageNode.attrs;
attrs.src = 'http://example.com/image.jpg';
var replacement = imageNode.type.create(attrs);
editor.tr.replaceWith(pos.from, pos.to, replacement).apply();
{
"presets": [
"react",
"es2015"
]
}

Keybase proof

I hereby claim:

  • I am sawyerh on github.
  • I am sawyer (https://keybase.io/sawyer) on keybase.
  • I have a public key ASBLD4Q7cshgms5cr00G-CA7Qc_pCD1HrlpgQ_Ufr_ZWvgo

To claim this, I am signing this object: