Skip to content

Instantly share code, notes, and snippets.

💻
<code />

Greg Rickaby gregrickaby

💻
<code />
Block or report user

Report or block gregrickaby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View html5-schema.org-markup.html
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
@gregrickaby
gregrickaby / remove-woocommerce-styles-scripts.php
Last active Aug 1, 2019
Remove WooCommerce styles and scripts.
View remove-woocommerce-styles-scripts.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below into functions.php
/**
* Manage WooCommerce styles and scripts.
*/
function grd_woocommerce_script_cleaner() {
// Remove the generator tag
remove_action( 'wp_head', array( $GLOBALS['woocommerce'], 'generator' ) );
@gregrickaby
gregrickaby / composer.json
Created Jul 12, 2019
WDS New Project Composer Setup
View composer.json
{
"name": "foo-project/wordpress-wp-content",
"description": "Plugins and Theme to power the Foo Project website built atop WordPress.",
"type": "project",
"require": {
"webdevstudios/sso": "^2.0",
"webdevstudios/advanced-custom-fields-pro": "^5.8",
"yoast/wordpress-seo-premium": "^11.6",
"wpackagist-plugin/stream": "^3.3",
"webdevstudios/wp-migrate-db-pro": "^1.9",
@gregrickaby
gregrickaby / _mixins.scss
Created Sep 12, 2013
The ultimate SASS - PX to REM mixin
View _mixins.scss
// Create REM values with PX fall back
//
// Generate a REM with PX fallback from
// $baseFontSize. Enter the desired size based
// on pixels in numerical form. Supports shorthand.
//
// Forked from: http://codepen.io/thejameskyle/pen/JmBjc
//
// @author Greg Rickaby
// @since 1.0
@gregrickaby
gregrickaby / example-nginx.conf
Last active May 22, 2019 — forked from pmgarman/gist:8fba357c97193633a66d
Defer the loading of images to the production server. Use either Apache or NGINX depending on your local server setup.
View example-nginx.conf
################################################################
# Example configuration file for nginx
#
# To add a new local WordPress domain to your environment, copy
# this file using a filename that matches the domain you wish to
# setup. For example - mylocaldomain.com.conf would be an ideal
# filename for http://mylocaldomain.com
#
# Once copied, you will need to modify two settings in the server
# configuration provided:
@gregrickaby
gregrickaby / even_odd_classes.php
Last active Apr 29, 2019
Even odd classes in WordPress loop
View even_odd_classes.php
<?php
// WP_Query Arguments
$args = array(
'order' => 'DESC',
'posts_per_page' => 5
);
// The Loop
$query = new WP_Query( $args );
@gregrickaby
gregrickaby / _golden-ratio.scss
Last active Apr 23, 2019
Golden Ratio Typography for Sass
View _golden-ratio.scss
//
// Golden Ratio Typography
// --------------------------------------------------
// Golden Ratio Math
//
// Let's do some math so we can build beautiful typography and vertical rhythm.
// For any magic to happen, set the $ContentWidth variable on _variables.scss
// to match your content box width (normally this is 640px, 740px, etc...).
@gregrickaby
gregrickaby / infinite-scroll-masonry-imagesloaded.php
Last active Apr 12, 2019
Infinite Scroll + Masonry + ImagesLoaded
View infinite-scroll-masonry-imagesloaded.php
/**
* Be sure to include library scripts in this order. Can be placed either
* in the header or footer.
*/
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.0/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery-infinitescroll/2.0b2.120519/jquery.infinitescroll.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/masonry/3.1.2/masonry.pkgd.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery.imagesloaded/3.0.4/jquery.imagesloaded.min.js"></script>
@gregrickaby
gregrickaby / custom.css
Last active Apr 12, 2019
CSS markup to make Tiny Tiny RSS look a bit more like Google Reader. Paste this into the Custom CSS box inside "Preferences".
View custom.css
/* Reset
------------------------------------------------------------ */
body#ttrssMain,
body#ttrssPrefs,
body#ttrssLogin,
body {
color: #000;
font-family: "Arial", sans-serif;
font-size: 100%; /* Set to default browser size, 16px */
line-height: 1.5;
You can’t perform that action at this time.