Skip to content

Instantly share code, notes, and snippets.

View katmoody's full-sized avatar

Katrina Moody katmoody

View GitHub Profile

Keybase proof

I hereby claim:

  • I am katmoody on github.
  • I am katmoody (https://keybase.io/katmoody) on keybase.
  • I have a public key ASDxAGgdPSOs2Z2MBYGB1tGfDD5nNV3weu1Edkz7SMMj1wo

To claim this, I am signing this object:

@katmoody
katmoody / how-i-work.md
Last active March 1, 2023 23:02 — forked from rmccue/how-i-work.md
A description of how I work, where I work, and the habits I use to work remotely

How I Work

This is an evolving document about my work habits.

Deep Work

I use the concept of deep work and focus time so that I can avoid context switching. The book Deep Work by Cal Newport prompted the examination of my work and learning habits. A few key principles I adopted after reading this book are:

  • Reserving time blocks I dedicate to deep work each day, depending on the time available in my schedule.
  • Cutting off as many distractions as possible, including email, Slack, and other notifications from my computer and phone.
  • Reducing 'shallow' tasks wherever possible (tasks can become busy work and waste time)
@katmoody
katmoody / git-cheat-sheet.md
Created December 11, 2017 14:34 — forked from iansheridan/git-cheat-sheet.md
A cheat sheet for GIT

Setup

git clone <repo>

clone the repository specified by ; this is similar to "checkout" in some other version control systems such as Subversion and CVS

Add colors to your ~/.gitconfig file:

@katmoody
katmoody / facebook-meta-tags.html
Created June 30, 2015 15:55
Copy and Paste Facebook Meta Tags (Just Fill in and Go!)
<meta property="og:image" content="DIRECT LINK TO IMAGE HERE"/>
<meta property="og:title" content="PREFERRED FB TITLE HERE"/>
<meta property="og:url" content="ACTUAL POST/PAGE URL HERE"/>
<meta property="og:site_name" content="SITE NAME"/>
<meta property="og:type" content="CHOOSE: article, blog,or website or see https://developers.facebook.com/docs/sharing/opengraph/object-properties for more information"/>
<meta property="og:description" content="THE DESCRIPTION YOU WANT TO APPEAR ON FB"/>
@katmoody
katmoody / Custom-Grid-Loop-Excerpt
Created May 17, 2015 02:08
Customize Genesis Grid Loop for Excerpt, with dual excerpt lengths for teaser and features, custom Read More with accessibility added
/**
* Change the number of words in excerpt if in the grid loop and customize READ MORE, add accessibility
*/
function kat_grid_content() {
// First, we make sure we're in the grid loop.
if( ! apply_filters( 'is_genesis_grid_loop', false ) )
return;
// Change length if teaser
<?php
/**
* Grid Content
* Change the number of words in excerpt if in the grid loop
*/
function be_grid_content() {
// First, we make sure we're in the grid loop.
if( ! apply_filters( 'is_genesis_grid_loop', false ) )
return;
@katmoody
katmoody / kat-fonticon
Last active August 29, 2015 14:21
Register and Enqueue FontIcons, using native WordPress function
// Register fonticon script
wp_register_script( 'kat-fonticon', 'https://use.fonticons.com/91a2525c.js', array(), null, false );
//* Enqueue scrip with Altitude Pro theme
add_action( 'wp_enqueue_scripts', 'kat_enqueue_scripts_styles' );
function kat_enqueue_scripts_styles() {
wp_enqueue_script( 'kat-fonticon' );
// Add other scripts and/or CSS here if it has already been registered
}
@katmoody
katmoody / remove-genesis-entry-title-link.php
Last active August 29, 2015 14:20 — forked from joshuadavidnelson/remove-genesis-entry-title-link.php
Changing to add link to enable underline effect
<?php
/**
*
* Remove Links from Post Titles in Genesis
*
* @author Joshua Nelson
* @link http://joshuadnelson.com
*
*/

The reason you might not be able to remove the Open Sans font that Wordpress >= 3.8 adds to the frontend is that quite a few WP styles and scripts list 'open-sans' as a dependancy when being registered and enqueued. When you remove the 'open-sans' style the other plugins dependant on it will not load. So you just need to deregister WP's open sans style and register your own, with a false value for the src like below.

Credit to seventhsteel from http://wordpress.org/support/topic/turning-off-open-sans-for-the-38-dashboard

<?php
// add parameter html5=1 to oembed YouTube requests as per
// http://stackoverflow.com/questions/17747443/css-transform-translate-breaking-youtube-embedded-video
// using modified version of code on http://www.alittleofboth.com/2013/06/modifying-youtube-video-display-in-wordpress/
add_filter( 'oembed_result', 'youtube_oembed_html5_parameter', 10, 3);
function youtube_oembed_html5_parameter($data, $url, $args = array()) {
// add &html5=1 parameter
$data = preg_replace('/(youtube\.com.*)(\?feature=oembed)(.*)/', '$1?' . apply_filters("hyrv_extra_querystring_parameters", "feature=oembed&amp;html5=1&amp;") . 'rel=0$3', $data);
return $data;
}