Skip to content

Instantly share code, notes, and snippets.

Evan Mattson aaemnnosttv

Block or report user

Report or block aaemnnosttv

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
aaemnnosttv / gravity-forms-select-optgroupify.php
Created Oct 5, 2018
GravityForms filter to allow for grouping select choices into labelled groups using special choice options.
View gravity-forms-select-optgroupify.php
* Filter for GravityForms to group select field choices by a special "optgroup" choice.
* Simply add a new choice with a value of 'optgroup' to the dropdown to start a group of options.
* All following choices will be grouped under it using its label for the group.
* Any number of groups can be created, as each optgroup choice will start a new group.
* Supports field placeholder & ungrouped options, but must be before the first group.
* This snippet can be added to your theme's functions.php, or a custom plugin.
View revslider-query-fix.php
* Prevent revslider from adding a query on every request.
* Calling `update_option('rs_tables_created', true)` causes
* a database query to run since it's get_option value ("1")
* does not match the value it is called to set it to.
* Since the query casts `true` to "1" the update query is run on every request as true !== '1'.
aaemnnosttv / wp-offload-s3-config.php
Created Mar 24, 2017
Offload S3 Environment-Based Configuration
View wp-offload-s3-config.php
* There are many possible ways to set this, but it can only be defined once.
* Using an environment variable by the same name
* define( 'WP_ENV', getenv( 'WP_ENV' ) );
* Matching the hostname
* define( 'WP_ENV', '' == $_SERVER['SERVER_NAME'] ? 'production' : 'staging' );
aaemnnosttv / my-solution.html
Created Jan 16, 2017
JavaScript 30 // #10 - Hold Shift to Check Multiple Checkboxes
View my-solution.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8">
html {

Keybase proof

I hereby claim:

  • I am aaemnnosttv on github.
  • I am aaemnnosttv ( on keybase.
  • I have a public key ASDP8nGBRCckhApflbk_o4CWjs7CTtz4r5ZcLzP_jmSEvwo

To claim this, I am signing this object:


MAMP to Valet

One-time Dependency Setup/Configuration

Install Composer

wget && chmod +x composer.phar && sudo mv /usr/local/bin/composer && composer self-update
aaemnnosttv / aws-iam-s3-single-bucket-policy.json
Created Feb 12, 2016
AWS IAM S3 Single Bucket Policy Template (Full Access)
View aws-iam-s3-single-bucket-policy.json
"Statement": [
"Action": [
"Effect": "Allow",
"Resource": "arn:aws:s3:::*"
aaemnnosttv / return.php
Created Jan 3, 2016
Simple value callback return generator
View return.php
if ( ! function_exists('__return') ) :
* Simple return callback generator
* @param null $return
* @return Closure
function __return($return = null) {
return function() use ($return) {
aaemnnosttv / drop-by-prefix.sql
Created Nov 16, 2015
mysql: Drop all tables by prefix
View drop-by-prefix.sql
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'tablename_goes_here'
AND TABLE_NAME LIKE 'thetableprefix_%');
SET @delStmt = CONCAT('DROP TABLE ', @tbls);
-- SELECT @delStmt;
PREPARE stmt FROM @delStmt;
aaemnnosttv / config.yml
Created Aug 21, 2015
wp-cli base config
View config.yml
- vendor/autoload.php
You can’t perform that action at this time.