Skip to content

Instantly share code, notes, and snippets.

View murtaugh's full-sized avatar
👋

Tim Murtaugh murtaugh

👋
View GitHub Profile
@murtaugh
murtaugh / cursor-reset.css
Last active May 11, 2023 17:28
CSS Cursor Reset
html,
body {
cursor: default;
}
code {
cursor: text;
}
/*
Our favorite cruise was on the <i>Explorer of the Seas</i>, --> italicize the name of a ship
which we read about in <cite>Cruising</cite> magazine, --> reference the name of a publication
and we <em>loved</em> it. --> emphasize a feeling
(<b>Note:</b> This was before everyone got all sick --> start a note with bolded text
and was throwing up <strong>everywhere</strong>.) --> make a strong statement
@murtaugh
murtaugh / eems-droplet-for-EE2.md
Last active October 27, 2021 03:33
Set up a DigitalOcean droplet for ExpressionEngine

(This is an updated version of Clearfire's tutorial, which is excellent, but has become slightly outdated as Digital Ocean updates their applications.)

  1. Create your droplet. Name it, select your size and location, then hit the Applications tab and select (as of this writing) "LAMP on 14.04". Add your SSH key if you want, and submit.
  2. SSH into your new droplet, and maybe check to make sure the following PHP modules have been installed: (In my recent experience, these have all been installed automatically, but that could change, and it takes 10 seconds to check.)

    apt-get install php5-gd

    apt-get install php5-mysql

    apt-get install php5-curl

  3. Make sure mod_rewrite is enabled, with a2enmod rewrite.
  4. If you like, increase PHP's upload_max_filesize and post_max_filesize values by editing the php.ini file, with this: nano /etc/php5/apache2/php.ini
  5. Give Apach
@murtaugh
murtaugh / 1. single-line.html
Last active April 21, 2021 16:23
Blockquote patterns for ALA
<figure class="quote">
<blockquote>It is the unofficial force—the Baker Street irregulars.</blockquote>
</figure>
@murtaugh
murtaugh / auto-footnote.js
Last active January 4, 2021 19:45
Sniff out superscripts that should be footnote links
$('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> ');
});
@murtaugh
murtaugh / menu-items.md
Last active May 17, 2020 13:22
How would you mark up an item on a restaurant menu?

I was thinking about restaurant menus, and started wondering how best to mark up individual items on the menu. Assuming you're going to put the each item in an li one approach could be:

<li>
	<h2>Home-Style Burger</h2>
	<p>half-pound burger with grilled onions</p>
	<p class="price">$7.25</p>
</li>	
@murtaugh
murtaugh / meal-kit-necessities.csv
Last active May 4, 2020 20:33
Meal Kit checklists
equipment recommended URL
skillet https://www.amazon.com/dp/B01M7T40KR/
medium pot https://www.amazon.com/Cuisinart-6194-20-Nonstick-Hard-Anodized-Saucepan/dp/B0001LO5FE
chef's knife https://cookathing.com/blue-apron-pro-tips-buy-a-decent-knife-and-learn-how-to-use-it-440048b287be
baking sheet https://www.webstaurantstore.com/bakers-mark-18-x-13-half-size-19-gauge-wire-in-rim-aluminum-bun-sheet-pan/407BUNHALF.html
cutting board https://www.webstaurantstore.com/18-x-24-x-1-2-white-cutting-board/20318245.html
wooden spoon https://www.amazon.com/Scraper-FAAY-Handcraft-Resistance-Cookware/dp/B079WJ328R
mixing bowls https://www.amazon.com/Cuisinart-CTG-00-3MBW-BPA-free-Mixing-Bowls/dp/B007TFNTX4
vegetable peeler https://www.amazon.com/Messermeister-Touch-Swivel-Peeler-Black/dp/B00020H30I
long spatula https://www.amazon.com/dp/B000931ENU
@murtaugh
murtaugh / salts.csv
Last active April 30, 2020 19:18
weights of salts
type the weight of 2 tablespoons
coarse sea salt (La Baleine) 37g
table salt 36g
kosher salt (Morton's) 33g
flaky salt (Maldon) 22g
kosher salt (Diamond Crystal) 18g
@murtaugh
murtaugh / lazy load images.js
Created July 25, 2018 16:50
Wilto's Lazy Loader for images
(function() {
function loadAsync() {
var lazyimgs = document.querySelectorAll( '[data-lazy]' ),
attrswap = function( img ) {
img.src = img.getAttribute( 'data-src' );
img.setAttribute( "sizes", img.getAttribute( 'data-sizes' ) );
img.setAttribute( "srcset", img.getAttribute( 'data-srcset' ) );
img.parentElement.setAttribute( "class", "shown" );
},
supports = "IntersectionObserver" in window

(This is an updated version of my own tutorial for EE2.)

  1. Create your droplet. Name it, select your size and location, then hit the Applications tab and select (as of this writing) "LAMP on 14.04". Add your SSH key if you want, and submit.
  2. Make sure mod_rewrite is enabled, with a2enmod rewrite.
  3. If you like, increase PHP's upload_max_filesize and post_max_filesize values by editing the php.ini file, with this: nano /etc/php/7.0/apache2/php.ini
  4. Give Apache a restart: service apache2 restart
  5. Run mysql_secure_installation. It will ask for the initial mysql root password which is saved in /root/.digitalocean_password.
  6. Log in to MySQL: mysql -u root -p (It will prompt you for your password.)
  7. Create a new user, so we aren't using root all the time: CREATE USER [NEW USERNAME]@'%' IDENTIFIED BY '[NEW PASSWORD]';
  8. Grant the new user full access: GRANT ALL PRIVILEGES ON * . * TO '[NEW USERNAME]'@'%';