Skip to content

Instantly share code, notes, and snippets.

Avatar

Allen Moore allenmoore

View GitHub Profile
@allenmoore
allenmoore / WP CLI commands.sh
Last active Dec 30, 2016 — forked from joshlevinson/WP CLI commands.sh
Create new VVV sites with WP CLI + wildcard hosts
View WP CLI commands.sh
vagrant ssh
cd /srv/www/
mkdir site-name && cd site-name && touch vvv-hosts && echo "site-name.dev" >> vvv-hosts && touch wp-cli.yml && echo "path: htdocs" >> wp-cli.yml && mkdir htdocs && cd htdocs
wp core download
wp core config --dbname=site-name --dbuser=root --dbpass=root
wp db create
wp core install --url=site-name.dev --title=Site --admin_user=admin --admin_password=password --admin_email=admin@example.dev
@allenmoore
allenmoore / postcss.js
Last active Oct 12, 2016
Px to Rem with PostCSS
View postcss.js
var pxtorem = require( 'postcss-pxtorem' ),
pxtoremOptions = {
replace: false,
rootValue: 16,
unitPrecision: 10,
propWhiteList: [
'font', 'font-size', 'letter-spacing']
};
module.exports = {
@allenmoore
allenmoore / README.md
Last active Apr 16, 2019 — forked from jonathantneal/README.md
CSS Modules in PHP
View README.md

CSS Modules lets you write and use simple class names rather than remembering and maintaining long unique class names for every component. CSS Modules mutates all of your classnames from each partials into new, completely unique classnames that will not conflict when they are bundled together into your main CSS file. Then, a JSON file is generated that maps the happy classnames from each file to the unique classname in the combined file. You load this map in PHP, and begin using the easy-to-remember classnames as you wish.

@allenmoore
allenmoore / async.php
Last active Sep 6, 2016
Async an arrayed list of JavaScript files with script_loader_tag
View async.php
/**
* Function to Async an arrayed list of JavaScript files.
*
* @param $tag
* @param $handler
* @param $src
*
* @return mixed
*/
function async_scripts( $tag, $handler, $src ) {
@allenmoore
allenmoore / _responsive_tables_wordpress.md
Last active Aug 29, 2015
Responsive Tables for WordPress using jQuery
View _responsive_tables_wordpress.md

Responsive Tables

This is a jQuery solution for responsive tables to be used in WordPress. Originally posted on http://zurb.com/playground/projects/responsive-tables/index.html.

Required Files

The following files are required in order for this responsive tables solution to function correctly.

responsive-tables.js

This is the original javascript file from Zurb.

View keybase.md

Keybase proof

I hereby claim:

  • I am allenmoore on github.
  • I am allenmoore (https://keybase.io/allenmoore) on keybase.
  • I have a public key whose fingerprint is 22E4 AE4B 9450 15B2 E1AE 3FD1 C5E5 7B55 AEC3 6B5B

To claim this, I am signing this object: