Skip to content

Instantly share code, notes, and snippets.

View joshfitzgerald's full-sized avatar

Josh Fitzgerald joshfitzgerald

  • Slickdeals
  • Las Vegas
View GitHub Profile
@joshfitzgerald
joshfitzgerald / animation-slide-down-section-using-js.markdown
Created June 6, 2019 18:56
Animation - Slide-Down Section Using Js
@joshfitzgerald
joshfitzgerald / index.html
Created April 24, 2019 18:09
Replace content with random array item on page load
<blockquote id="quoteDisplay"></blockquote>
@joshfitzgerald
joshfitzgerald / Background-image.css
Last active June 6, 2022 05:24
CSS background image examples
/* The following sets a background image on an element using the shorthand property. */
.element {
background: #eee url(path/to/image.jpg) top 50% / contain fixed no-repeat;
}
/* The above declaration is equivalent to the following single declarations: */
.element {
background-image: url(path/to/image.jpg);
background-color: #eee;
background-position: top 50%;
background-size: contain;
@joshfitzgerald
joshfitzgerald / functions.php
Created March 6, 2018 19:47 — forked from mor10/functions.php
Custom page template with no sidebar for Twenty Sixteen child theme
<?php
/**
* Adds custom classes to the array of body classes.
*
* @param array $classes Classes for the body element.
* @return array (Maybe) filtered body classes.
*/
function wpcampus_body_classes( $classes ) {
// Adds a class of no-sidebar to custom no-sidebar page template.
if ( is_page_template('page-no-sidebar.php') ) {
@joshfitzgerald
joshfitzgerald / same-width-flexbox.com
Created February 7, 2018 22:22
Using CSS Flexbox, give items equal width
.flex-container {
display: flex;
}
.flex-item {
flex: 1;
}
@joshfitzgerald
joshfitzgerald / center-content-xy.css
Last active February 7, 2018 22:19
Center vertically and horizontally using CSS Flexbox
.middle {
display: flex;
flex-direction: row; /* sets main axis as horizontal */
justify-content: center; /* affects main axis - horizontal here */
align-items: center; /* affects cross axis - vertical here */
}
@joshfitzgerald
joshfitzgerald / php.ini
Last active February 5, 2018 20:43
INCREASE WP MEMORY LIMIT & PHP MAX INPUT VARS - For WordPress, add a php.ini file to wp-admin folder if one doesn't exist and paste the following inside.
max_execution_time = 180
max_input_vars = 5000;
@joshfitzgerald
joshfitzgerald / php.ini
Created February 5, 2018 20:42
INCREASE WP MEMORY LIMIT & PHP MAX INPUT VARS
max_execution_time = 180
max_input_vars = 5000;
@joshfitzgerald
joshfitzgerald / pdf-links.css
Created January 19, 2018 20:26
Style links that point to a .pdf file as a ghost button with a font awesome icon
@joshfitzgerald
joshfitzgerald / functions.php
Last active January 17, 2018 16:05
disable Wordpress Visual Editor for all users. No more <p> being stripped because switched from Text Mode to Visual Editor. Tell the lazy MFers to get off of Fakebook and learn simple HTML
//disable Visual Editor for all users
add_filter ( 'user_can_richedit' , create_function ( '$a' , 'return false;' ) , 50 );