Skip to content

Instantly share code, notes, and snippets.

Devin Price devinsays

Block or report user

Report or block devinsays

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
devinsays / countries.html
Created Jan 11, 2020
List of WooCommerce Countries Selected
View countries.html
<select multiple="" name="country_restriction[]" style="width:350px" data-placeholder="Choose countries…" aria-label="Country" class="wc-enhanced-select select2-hidden-accessible enhanced" tabindex="-1" aria-hidden="true">
<option selected="selected" value="AX" selected="selected">Åland Islands</option><option selected="selected" value="AF" selected="selected">Afghanistan</option><option selected="selected" value="AL">Albania</option><option selected="selected" value="DZ" selected="selected">Algeria</option><option selected="selected" value="AS">American Samoa</option><option selected="selected" value="AD">Andorra</option><option selected="selected" value="AO">Angola</option><option selected="selected" value="AI">Anguilla</option><option selected="selected" value="AQ">Antarctica</option><option selected="selected" value="AG">Antigua and Barbuda</option><option selected="selected" value="AR">Argentina</option><option selected="selected" value="AM">Armenia</option><option selected="selected" value="AW">Aruba</o
devinsays / okta-testing.html
Last active Nov 4, 2019
Example Okta Code for Debugging
View okta-testing.html
<title>Okta Test</title>
<!-- Latest CDN production Javascript and CSS -->
<script src="" type="text/javascript"></script>
<link href="" type="text/css" rel="stylesheet"/>
<h1>Okta Testing</h1>
devinsays / image-gallery-formats.php
Created Oct 6, 2019
Customized example of the Image Gallery Formats template for Portfolio Press.
View image-gallery-formats.php
View initScrollReveal.js
// Init Scroll Reveal
initScrollReveal: function() {
window.scrollreveal = ScrollReveal();
$('[data-animation]').each( function() {
var settings = {
'origin' : 'bottom',
'distance' : '0',
devinsays / Gruntfile.js
Created Mar 27, 2019
Updated Gruntfile.js with Working Autoprefixer
View Gruntfile.js
'use strict';
// Packages
const fiberLibrary = require('fibers');
const sassLibrary = require('node-sass');
module.exports = function(grunt) {
// load all tasks
require('load-grunt-tasks')(grunt, {scope: 'devDependencies'});
View devinsays-append-query-strings.php
function devinsays_append_query_strings( $url ) {
error_log('inital url');
// If no cookie set, return.
if ( ! isset( $_COOKIE['affwp_ref'] ) ) {
return $url;
devinsays /
Created Aug 20, 2018
How to Convert a NodeList to an Array

Let's say you're selecting a DOM element like list items.

Option #1, use a spread:

const items = [... document.querySelectorAll('li')];

Option #2, use Array.from:

devinsays /
Created Jul 26, 2018
Resolving "Incorrect datetime value" in Laravel

While importing data into a local MySQL database in Laravel I hit this issue:

PDOException::("SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '2018-03-11 02:04:15' for column 'created_at' at row 825")

The problem is due to daylight savings time (DST). In OSX MySQL is generally set to use SYSTEM time rather than UTC.

So, in my case, the issue was that datetime 2018-03-11 02:04:15 technically did not exist in CST.

devinsays /
Created Jul 20, 2018
Support response that is not posting.

Hi. After reviewing your site again I see that you are using a custom content type (portfolio) for the content, which is why it doesn't show up on the home page like standard posts.

You could try setting a static page as the home page and using the [portfolio] shortcode as described here: However, the layout won't be the same as the standard posts.

Another option is to try another theme mentioned in that help doc that has specific portfolio content type support. These may provide better layout options for you.

Apologies for the delayed response. I typed out this whole message to you at once before, but it looks like it never finished posting.


devinsays / .htaccess
Created Mar 19, 2018
Restrict access to site to specific IPs
View .htaccess
order deny,allow
deny from all
allow from
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
You can’t perform that action at this time.