Skip to content

Instantly share code, notes, and snippets.

View murtaugh's full-sized avatar
👋

Tim Murtaugh murtaugh

👋
View GitHub Profile
  • 1 tablespoon olive oil
  • 6 ounces pancetta or salt pork, diced
  • 2 1/2 pounds beef chuck, seasoned with 2 teaspoons kosher salt
  • 1/2 cup diced celery
  • 1/2 cup diced carrot
  • 1 rounded tablespoon tomato paste
  • 1 teaspoon freshly ground black pepper
  • 1 bay leaf
  • 2/3 cup white wine (optional)
  • 4 pounds yellow onions, sliced
@murtaugh
murtaugh / tabmaster.html
Created July 24, 2015 15:29
Tabmaster: in-page tab navigation management
<label for="username">Username</label>
(<a id="register-link" data-tabto="reset-link" href="#">register</a>)
<input id="username" type="text" data-tabmaster="true" data-tabto="password" />
<label for="password">Password</label>
(<a id="reset-link" data-tabto="submit" href="#">reset password</a>)
<input id="password" type="password" data-tabto="register-link" />
<input id="submit" data-tabmaster="false" type="submit" value="Submit" />
@murtaugh
murtaugh / wait.js
Created November 20, 2013 22:56
a function that does what I always expect .delay() to do
$.wait = function( callback, seconds){
return window.setTimeout( callback, seconds * 1000 );
}
// usage
$.wait( function(){ $("#message").slideUp() }, 5);
@murtaugh
murtaugh / .htaccess
Last active June 1, 2016 23:02
Convince ExpressionEngine to show SVG thumbnails
# redirect requests to (non-existent) SVG thumbnails to the main image
RewriteRule ^/assets_content/_thumbs/?\.svg$ /assets_content/$1.svg [NC,L]
# FWIW, I had to swap out the ? for (.*) in my environment
@murtaugh
murtaugh / hide-genius-annotations.css
Last active March 29, 2016 16:49
Attempts to hide Genius annotations
// hides the yellow indication of an annotation
genius-referent {
background: transparent !important;
cursor: text !important;
}
// hides the "Annotate" popup that appears when you select text
genius-pre-annotation-prompt {
display: none !important;
}
<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>
</figure>
@murtaugh
murtaugh / placeholder-polyfill.js
Created September 20, 2013 15:21
In my experience, `placeholder` polyfills try way too hard, and the results are mixed. Here's mine.
if (!Modernizr.input.placeholder) {
$('*[placeholder]').each(function() {
placeholder = $(this).attr('placeholder');
$(this).attr('value', placeholder).addClass('fakePlaceholder');
});
@murtaugh
murtaugh / columns.css
Created September 16, 2013 19:48
CSS Columns
.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
murtaugh / In-Page Nav Functions.js
Last active December 20, 2015 04:39
In-page nav, with smooth scrolling, update on scroll, and proper location.hash updating
$(document).ready(function() {
$("#in-page-nav-1 a").click(function(e){
e.preventDefault();
var dest = 0;
if ($(this.hash).offset().top > $(document).height()-$(window).height()){
@murtaugh
murtaugh / autogrow.js
Last active December 19, 2015 07:59 — forked from jlong/jquery.autogrow.js
I un-plugin-ified this for my own purposes.
(function($){
$(document).ready(function (){
$('textarea[data-autoresize]').on('input propertychange', function() {
autoResize($(this));
});