Skip to content

Instantly share code, notes, and snippets.


Tim Murtaugh murtaugh

View GitHub Profile
murtaugh / sarcastic.html
Created Dec 23, 2011
The Sarcastic Font Treatment (inspired by the Sarcastic Font project:
View sarcastic.html
em.sarcastic {
display: inline-block;
font-style: normal;
-webkit-transform: rotate(-15deg) skew(0, 15deg);
-moz-transform: rotate(-15deg) skew(0, 15deg);
murtaugh / 1. single-line.html
Last active Nov 26, 2020
Blockquote patterns for ALA
View 1. single-line.html
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
murtaugh / cursor-reset.css
Last active Feb 17, 2020
CSS Cursor Reset
View cursor-reset.css
body {
cursor: default;
code {
cursor: text;
View Regexes
Email regex: (supports pluses and dots in username)
URL regex: (validates both with and without http://)
murtaugh / autogrow.js
Last active Dec 19, 2015 — forked from jlong/jquery.autogrow.js
I un-plugin-ified this for my own purposes.
View autogrow.js
$(document).ready(function (){
$('textarea[data-autoresize]').on('input propertychange', function() {
murtaugh / In-Page Nav Functions.js
Last active Dec 20, 2015
In-page nav, with smooth scrolling, update on scroll, and proper location.hash updating
View In-Page Nav Functions.js
$(document).ready(function() {
$("#in-page-nav-1 a").click(function(e){
var dest = 0;
if ($(this.hash).offset().top > $(document).height()-$(window).height()){
View code-sample-with-caption.html
<figure class="code">
<pre><code class=“language-markup”>&lt;meta charset="utf-8"/></code></pre>
<figcaption>A UTF-8 encoding declaration should appear at the beginning of every &lt;head&gt; element.</figcaption>
View columns.css
.columns {
display: block;
list-style-type: none;
margin-bottom: 24px;
-moz-column-count: 2;
-moz-column-gap: 24px;
-webkit-column-count: 2;
-webkit-column-gap: 24px;
column-count: 2;
column-gap: 24px;
murtaugh / placeholder-polyfill.js
Created Sep 20, 2013
In my experience, `placeholder` polyfills try way too hard, and the results are mixed. Here's mine.
View placeholder-polyfill.js
if (!Modernizr.input.placeholder) {
$('*[placeholder]').each(function() {
placeholder = $(this).attr('placeholder');
$(this).attr('value', placeholder).addClass('fakePlaceholder');
murtaugh / auto-footnote.js
Last active Sep 19, 2017
Sniff out superscripts that should be footnote links
View auto-footnote.js
$('sup[data-footnote]').each(function(index) {
noteCount = $(this).html();
$(this).html('<a id="ref' + noteCount + '" href="#note' + noteCount + '">' + noteCount + '</a>');
$('#footnotes li').eq(noteCount - 1).attr('id', 'note' + noteCount).prepend('<a href="#ref' + noteCount + '">' + noteCount + '.</a> ');
You can’t perform that action at this time.