Skip to content

Instantly share code, notes, and snippets.

View michaelbrazell's full-sized avatar

Mike Murray michaelbrazell

View GitHub Profile
@michaelbrazell
michaelbrazell / CSS Property Order - Box Model
Last active January 26, 2018 21:25
Ordering CSS properties by the box model
width: ;
height: ;
min-width: ;
max-width: ;
min-height: ;
max-height: ;
padding: ;
padding-top: ;
padding-right: ;
@michaelbrazell
michaelbrazell / foundation-remove-class-modal-close.js
Created July 15, 2017 00:03
Foundation 6.3.1 has an issue when modifying Reveal where it doesn't remove the is-reveal-open class from the body after closing a reveal. You can hook into the close event to fire this. This was fixed in 6.4 but if you can't update and don't want to modify the core Foundation files, you can add this to your page. Requires jQuery obviously.
// Fix issue with foundation not closing "is reveal open"
$(document).on('closed.zf.reveal', function() {
if ($('body').hasClass('is-reveal-open')) {
$('body').removeClass('is-reveal-open');
}
});
@michaelbrazell
michaelbrazell / WP_child-page-loop.php
Created June 22, 2017 23:23
Loop through the contents of a child page, displaying it as a modal with foundation
if ( ! function_exists ( 'xad_product_childpage ' )) :
function xad_product_childpage($pageId) {
$childArgs = array(
'sort_order' => 'ASC',
'sort_column' => 'menu_order',
'child_of' => $pageId
);
$childList = get_pages($childArgs);
@michaelbrazell
michaelbrazell / wp-cli_backup.sh
Last active February 24, 2017 21:52
A simple shell script for backing up your WP Database and WP Files using the wp-cli
#!/usr/local/bin/bash
# Backup script using wp-cli
DBMESSAGE="Backing up database..."
FSMESSAGE="Backing up file system..."
DONEMESSAGE="Done."
MOVEMESSAGE="Moving files to public location..."
FINISHED="Backup complete."
echo $DBMESSAGE
/path/to/wp-cli/wp db export wordpress_$(date +%Y%m%d).sql --path=/var/www/html
echo $DONEMESSAGE
[{"abbrName":"BAL","cityName":"Baltimore","defScheme":11,"displayName":"Ravens","divName":"AFC North","injuryCount":4,"logoId":24,"nickName":"Ravens","offScheme":0,"ovrRating":79,"primaryColor":4985505,"secondaryColor":0,"teamId":757727261,"userName":""},{"abbrName":"PIT","cityName":"Pittsburgh","defScheme":11,"displayName":"Steelers","divName":"AFC North","injuryCount":4,"logoId":28,"nickName":"Steelers","offScheme":1,"ovrRating":83,"primaryColor":16763904,"secondaryColor":0,"teamId":757727265,"userName":""},{"abbrName":"CIN","cityName":"Cincinnati","defScheme":6,"displayName":"Bengals","divName":"AFC North","injuryCount":2,"logoId":1,"nickName":"Bengals","offScheme":3,"ovrRating":85,"primaryColor":15220224,"secondaryColor":0,"teamId":757727235,"userName":""},{"abbrName":"CLE","cityName":"Cleveland","defScheme":9,"displayName":"Browns","divName":"AFC North","injuryCount":2,"logoId":4,"nickName":"Browns","offScheme":4,"ovrRating":77,"primaryColor":16727040,"secondaryColor":2233612,"teamId":757727238,"userName
@michaelbrazell
michaelbrazell / cfm-errors.txt
Last active December 8, 2016 23:49
Errors from CFM export
2016-12-08T21:23:01.841292+00:00 heroku[router]: at=info method=POST path="/xbox/1211026/standings" host=maddencfm.herokuapp.com request_id=02ae2dad-2a38-4267-9666-d9745ea11ca7 fwd="144.212.3.4" dyno=web.1 connect=1ms service=9ms status=500 bytes=232
2016-12-08T21:23:01.748122+00:00 app[web.1]: ReferenceError: body is not defined
2016-12-08T21:23:01.748135+00:00 app[web.1]: at /app/app.js:38:11
2016-12-08T21:23:01.748137+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
2016-12-08T21:23:01.748138+00:00 app[web.1]: at next (/app/node_modules/express/lib/router/route.js:131:13)
2016-12-08T21:23:01.748138+00:00 app[web.1]: at Route.dispatch (/app/node_modules/express/lib/router/route.js:112:3)
2016-12-08T21:23:01.748139+00:00 app[web.1]: at Layer.handle [as handle_request] (/app/node_modules/express/lib/router/layer.js:95:5)
2016-12-08T21:23:01.748140+00:00 app[web.1]: at /app/node_modules/express/lib/router/index.js:277:22
2016-12-
This is my sync file for atom.
@michaelbrazell
michaelbrazell / project-photograph.html
Created April 28, 2016 04:23
tips on project photography
<h4>How to take a good project photo</h4>
[efsrow]
[efscolumn lg="8" md="8" smoff="0" mdoff="0" lgoff="0" ]
<h3>Tip #1</h3>
<h5>Take quality color photos</h5>
Plan to take new (current conditions) photos of your subject. To ensure quality:
<ul>
<li>Take a number of photos, then choose the best. You will need at least three (3) quality color photos per project. You may include more than three.</li>
<li>Use a tripod if necessary so the photos are clear and focused.</li>
</ul>
@michaelbrazell
michaelbrazell / gravity-forms-api-data.json
Created December 9, 2015 16:14
Json of a Gravity forms form output
{
"status": 200,
"response": {
"1000": false,
"28": {
"title": "Test Form",
"description": "",
"labelPlacement": "top_label",
"descriptionPlacement": "below",
"button": {
@michaelbrazell
michaelbrazell / pyramid-scheme.txt
Last active August 29, 2015 14:26
A pyramid scheme template for recruiting your friends to whatever the latest pyramid scheme is.
Hi {{f.name}} what's up? For {{f.time}} days now I have been actively using {{f.pyramid.scheme.name}} and
I have already seen so many {{f.superlative}} results! I have always been skeptical of other {{f.pyramid.scheme.category}}
but after seeing the positive progress that all of my friends, like {{f.friend.name}}, have made using {{f.pyramid.scheme.name}}
I decided to give it a shot.
Let me just tell you that {{f.pyramid.scheme.name}} is unlike any other {{f.pyramid.scheme.category}}
that you have ever heard of before. Normally {{f.pyramid.scheme.name}} is ${{f.price.orig}} but now you,
{{f.name}}, can get these {{f.superlative}} results for the LOW discount price of ${{f.discount.price}}.
YES YOU HEARD {{f.affirmative}}, YOU CAN JOIN {{f.pyramid.scheme}} FOR ONLY {{f.discount.price}}!!
Best of all, if you spread the news to {{f.pyramid.scheme.sucker.number}} friends,
then you receive additional discounts on your subscription to {{f.pyramid.scheme.name}}