Skip to content

Instantly share code, notes, and snippets.

@bhwebworks
bhwebworks / add to functions.php
Last active December 17, 2015 05:09
Filter the genesis_seo_site_title function to use an image for the logo instead of a background image
/**
* Filter the genesis_seo_site_title function to use an image for the logo instead of a background image
*
* The genesis_seo_site_title function is located in genesis/lib/structure/header.php
* @link http://blackhillswebworks.com/?p=4144
*
*/
add_filter( 'genesis_seo_title', 'bhww_filter_genesis_seo_site_title', 10, 2 );
<?php function mobile_device($classes) {
global $variable;
$is_ipad = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPad');
$is_iphone = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPhone');
$is_ipod = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'iPod');
$is_android = (bool) strpos($_SERVER['HTTP_USER_AGENT'],'Android');
if ( $is_android ) {
$mobile_device = 'android';
} elseif ( $is_iphone || $is_ipad || $is_ipod ) {
@PurpleBooth
PurpleBooth / README-Template.md
Last active November 17, 2024 18:07
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@Shelob9
Shelob9 / 0-links.md
Created February 17, 2018 20:31
Install create-guten-block and use it to create a plugin with a block (and optionally eject from cgb-scripts)
@trevorgreenleaf
trevorgreenleaf / px-rem-tw.csv
Last active April 1, 2024 15:42
PX to REM'S to TAILWIND CSS
PX REM TW
4 0.25 1
8 0.5 2
16 1 4
32 2 8
48 3 12
64 4 16
80 5 20
96 6 24
112 7 28
@swyxio
swyxio / Gatsby-bootstrap-lifecycle.md
Last active April 1, 2022 11:19
Gatsby bootstrap lifecycle

Sequence of Gatsby's bootstrap lifecycle with links to source code as of v2.0.0

  1. open and validate gatsby-config (get-config-file.js) 1.5 load themes (swyx added this note July 2019)
  2. load plugins (load-plugins/index.js) from the list given in gatsby-config.js
  3. onPreBootstrap: runs onPreBootstrap if it is implemented in any plugins, for example gatsby-plugin-typography. Receives handy [apiCallArgs](https://github.com/gatsbyjs/gatsby/blob/ffd8b2d691c9
@garmjs
garmjs / just.js
Created January 6, 2019 20:16
Make working scrollMagic and GSAP on Gatsby
// put this on gatsby-node.js file
exports.onCreateWebpackConfig = ({
stage,
rules,
loaders,
plugins,
actions,
}) => {
actions.setWebpackConfig({
resolve: {