Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View megmorsie's full-sized avatar
🇵🇸

Megan Rose megmorsie

🇵🇸
View GitHub Profile
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>name</key>
<string>Once Upon a Time</string>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>Jessica Allen</string>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>Jessica Allen</string>
@megmorsie
megmorsie / cgc-upcoming-events.php
Last active July 21, 2019 15:00
Quick Plugin Made for Cleveland GiveCamp 2018 & Updated for 2019 | Usage: [events] | Requires The Events Calendar to be installed and activated.
<?php
/*
* Plugin Name: TCBA Events Shortcode
* Plugin URI: https://gist.github.com/megmorsie/f3f3b51adfa677dc243a147a26090740
* Description: Sets up a shortcode [events] to be used to display an unordered list of upcoming events (set to 5).
* Version: 1.0
* Author: Cle GiveCamp
* Author URI: http://clevelandgivecamp.org
* License: GPL2
* Text Domain: cle_givecamp
@megmorsie
megmorsie / wckent-2019-style.css
Created June 11, 2019 02:27
Remote CSS Because Customizer Was Broken
/* @import url('https://fonts.googleapis.com/css?family=Acme|Vast+Shadow'); */
h3 {
font-size: 35px !important;
/* font-family: "Vast Shadow"; */
}
@media screen and (max-width: 767px) {
.has-header-image.twentyseventeen-front-page .site-branding, .has-header-video.twentyseventeen-front-page .site-branding, .has-header-image.home.blog .site-branding, .has-header-video.home.blog .site-branding {
display: block;
height: auto;
<?php
/**
* Function to list filters on a specified hook.
* Source: https://stackoverflow.com/a/5225021
*/
function rose_print_filters_for( $hook = '' ) {
global $wp_filter;
if ( empty($hook) || !isset($wp_filter[$hook]) ) {
return;
}
@megmorsie
megmorsie / wp-responsive-images.php
Created December 18, 2016 01:54
This is an example of using WordPress Image Sizes and the picture element to implement responsive images. I prefer this method over using srcset on the img tag because that method doesn't account for window resizing or server-side caching.
<?php
// Put in functions.php
/**
* Image Sizes
*/
add_image_size( 'featured', 960, 250, array( 'center', 'center' ) );
add_image_size( 'cropped', 450, 180, array( 'center', 'center' ) );
@megmorsie
megmorsie / wp-append-social-links.php
Created July 15, 2016 16:16
Add FontAwesome social links in an li in your primary WordPress nav.
@megmorsie
megmorsie / media-queries.css
Last active August 30, 2016 12:52
This file explains media queries, designing for mobile-first, and using min-width queries instead of max-width queries.
/**
* /////////////////////
* /// Media Queries ///
* ////////////////////
*
* Widths by Device:
* - iPhone 5 - Vertical = 320px
* - iPhone 5 - Horizontal = 568px
* - iPhone 6 - Vertical = 375px
* - iPhone 6 - Horizontal = 667px
@megmorsie
megmorsie / increment-hex-values.php
Created April 21, 2016 17:40
Increment Hex Values
<?php
// This file increments hex values and keeps any leading zeroes.
// Example: Use to generate a list of MySQL CREATE DATABASE functions to set up database shards.
$x = 0; // Counter
$hex = "00"; // When the amount of digits changes in $hex, remember to change the str_pad() function, too.
while ($x < 256) { // The amount of times to loop.
echo "$hex <br />";
$hex = dechex(hexdec($hex)+1); // Increment the hex value.