Skip to content

Instantly share code, notes, and snippets.

View douglas-johnson's full-sized avatar

Douglas Johnson douglas-johnson

View GitHub Profile
# Install and activate typical plugins.
plugins:
wp plugin delete hello akismet; \
wp plugin install debug-bar disable-emojis jetpack query-monitor woocommerce --activate; \
# Install, copy and clean up drop-ins.
cache-plugins:
wp plugin install batcache memcached-redux; \
cp wp-content/plugins/batcache/advanced-cache.php wp-content/advanced-cache.php; \
cp wp-content/plugins/memcached-redux/object-cache.php wp-content/object-cache.php; \
@douglas-johnson
douglas-johnson / composing-utility-classes-into-components.md
Created October 2, 2018 13:51
Composing Utility Classes into Components

I would like to be able to compose utility classes into components.

PostCSS

You can do it using the PostCSS @apply plugin

:root{
	.some-utility:{
 property: value;
@douglas-johnson
douglas-johnson / machine-learning.md
Created June 27, 2017 16:19
Notes and Resource from Machine Learning Independent Study

Bad

<figure class="op-tracker">
	<iframe>
		<script>
			var x = new Image();
			x.src = "https://pixel.wp.com/b.gif?host=thoughtcatalog.com&amp;blog=7369149&amp;post=725360&amp;subd=thoughtcatalog&amp;ref=&amp;feed=1&rand=" +Math.random();
		</script>
	
@douglas-johnson
douglas-johnson / map-modules.js
Last active June 2, 2016 18:51
Javascript module for creating map points and maintaining their location resize.
(function($){
var $mapBody = null,
$mapArticles = null,
mapAspect = 5 / 3,
mapFullWidth = 1600,
mapBreakWidth = 1024,
mapWidth = 1600,
mapHeight = 960
;