Skip to content

Instantly share code, notes, and snippets.

View maxdmyers's full-sized avatar
💾

Max Myers maxdmyers

💾
View GitHub Profile
@maxdmyers
maxdmyers / add-gtm-wp.php
Created November 19, 2018 18:41 — forked from jsn789/add-gtm-wp.php
Add Google Tag Manager through functions.php in WordPress
/* Add Google Tag Manager javascript code as close to
the opening <head> tag as possible
=====================================================*/
function add_gtm_head(){
?>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
wp core download
wp core config --dbname= --dbuser=root
wp core install --url= --title= --admin_user=wordpress --admin_password=wordpress --admin_email=
wp plugin uninstall akismet
wp plugin uninstall hello
wp plugin install https://github.com/wp-premium/advanced-custom-fields-pro/archive/master.zip --activate
wp plugin install https://github.com/andersthorborg/ACF-Image-Crop/archive/master.zip --activate
wp plugin install https://github.com/wp-premium/gravityforms/archive/master.zip --activate
wp plugin install debug-bar --activate
wp plugin install https://github.com/timber/debug-bar-timber/archive/master.zip --activate
@maxdmyers
maxdmyers / bootstrap-size-indicator.html
Created October 14, 2016 15:37
Bootstrap Screen Size Indicator
<!-- FOR DEV USE ONLY - DO NOT USE IN PRODUCTION -->
<div class="hidden-sm-up bg-danger" style="position: relative; z-index: 100;">
<div class="container p-t-1"><p class="text-xs-center">XS</p></div>
</div>
<div class="hidden-xs-down hidden-md-up bg-warning" style="position: relative; z-index: 100;">
<div class="container p-t-1"><p class="text-sm-center">SM</p></div>
</div>
<div class="hidden-sm-down hidden-lg-up bg-success" style="position: relative; z-index: 100;">
<div class="container p-t-1"><p class="text-md-center">MD</p></div>
</div>
<VirtualHost *:80>
ServerName 192.168.33.10.xip.io
DocumentRoot /vagrant
<Directory /vagrant>
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
</Directory>
<IfModule mod_deflate.c>
#The following line is enough for .js and .css
AddOutputFilter DEFLATE js css
AddOutputFilterByType DEFLATE text/plain text/xml application/xhtml+xml text/css application/xml application/rss+xml application/atom_xml application/x-javascript application/x-httpd-php application/x-httpd-fastphp text/html
#The following lines are to avoid bugs with some browsers
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
</IfModule>
@maxdmyers
maxdmyers / LICENSE.txt
Created November 3, 2011 15:59 — forked from 140bytes/LICENSE.txt
140byt.es -- Click ↑↑ fork ↑↑ to play!
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004
Copyright (C) 2011 YOUR_NAME_HERE <YOUR_URL_HERE>
Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE