Skip to content

Instantly share code, notes, and snippets.

View mlangone's full-sized avatar

Mike Langone mlangone

  • Gilbert, Arizona
View GitHub Profile
@mlangone
mlangone / apple-mq.css
Created December 9, 2017 05:58 — forked from AllThingsSmitty/apple-mq.css
iPhone 6/6 Plus and Apple Watch CSS media queries
/* iPhone 6 landscape */
@media only screen and (min-device-width: 375px)
and (max-device-width: 667px)
and (orientation: landscape)
and (-webkit-min-device-pixel-ratio: 2)
{ }
/* iPhone 6 portrait */
@media only screen
and (min-device-width: 375px)
@mlangone
mlangone / default
Created January 21, 2018 19:02 — forked from dtomasi/default
Brew Nginx PHP7
server {
listen 80;
server_name localhost;
root /Users/YOUR_USERNAME/Sites;
access_log /Library/Logs/default.access.log main;
location / {
include /usr/local/etc/nginx/conf.d/php-fpm;
}
@mlangone
mlangone / gravity_forms_validation.php
Created February 26, 2018 17:31 — forked from BronsonQuick/gravity_forms_validation.php
Change the default validation message and add validation on default values in Gravity Forms
<?php
//This is a filter to change the default validation message that Gravity Forms generates
add_filter('gform_validation_message', 'change_validation_message', 10, 2);
function change_validation_message($message, $form)
{
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>";
}
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back
@mlangone
mlangone / gravity_forms_validation.php
Created February 26, 2018 17:31 — forked from BronsonQuick/gravity_forms_validation.php
Change the default validation message and add validation on default values in Gravity Forms
<?php
//This is a filter to change the default validation message that Gravity Forms generates
add_filter('gform_validation_message', 'change_validation_message', 10, 2);
function change_validation_message($message, $form)
{
return "<div class='validation_error'><strong>Oops!</strong> Looks like there’s something wrong. Please review the form above.</div>";
}
// Often forms in Gravity Forms to need to start with default values and we need to check the form in case the user hasn't entered new data and give them a validation message back
@mlangone
mlangone / _mediaQueries.scss
Last active March 22, 2018 00:22
Zurb Foundation6 Media Queries default breakpoints and custom devices - WIP
/************************************************
Stylesheet: Media Queries
*************************************************/
// Media Queries
$screen: "only screen" !default;
$breakpoints: (
small: 480px,
medium: 640px,
large: 1024px,
xlarge: 1200px,
@mlangone
mlangone / http-to-https.php
Created March 28, 2018 21:52 — forked from danielbachhuber/http-to-https.php
Update a specific site from 'http://' to 'https://'.
<?php
/**
* Update a specific site from 'http://' to 'https://'.
*
* Only touches the 'home' and 'siteurl' options.
* Depending on plugins, etc., you may need to update other options too.
*
* Run on WordPress multisite with:
*
* wp site list --field=url | xargs -I % wp eval-file http-to-https.php --url=%
@mlangone
mlangone / schema-org-structured-data-markup-using-microdata.html
Created April 16, 2018 18:02 — forked from milanaryal/schema-org-structured-data-markup-using-microdata.html
An example of how to mark up a HTML5 webpage using the schema.org schemas and microdata.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Site Title</title>
<link rel="stylesheet" href="/assets/css/style.min.css">
@mlangone
mlangone / config
Created September 6, 2018 22:29 — forked from justinpawela/config
AWS CodeCommit Multiple Account Config
# This file is: ~/.ssh/config
# You may have other (non-CodeCommit) SSH credentials stored in this
# config file – in addition to the CodeCommit settings shown below.
# NOTE: Make sure to run [ chmod 600 ~/.ssh/config ] after creating this file!
# Credentials for Account1
Host awscc-account1 # 'awscc-account1' is a name you pick
Hostname git-codecommit.us-east-1.amazonaws.com # This points to CodeCommit in the 'US East' region
@mlangone
mlangone / function.php
Last active February 21, 2019 16:57 — forked from tessak22/function.php
Hero ACF Block (Requires ACF Pro 5.8) - Big Thanks to https://github.com/tessak22 @tessak22
/**
* Register hero block
*/
add_action('acf/init', 'hero');
function hero() {
// check function exists
if( function_exists('acf_register_block') ) {
// register a hero block
@mlangone
mlangone / sane-caching.nginx.conf
Created April 3, 2019 22:44 — forked from philipstanislaus/sane-caching.nginx.conf
Sample Nginx config with sane caching settings for modern web development
# Sample Nginx config with sane caching settings for modern web development
#
# Motivation:
# Modern web development often happens with developer tools open, e. g. the Chrome Dev Tools.
# These tools automatically deactivate all sorts of caching for you, so you always have a fresh
# and juicy version of your assets available.
# At some point, however, you want to show your work to testers, your boss or your client.
# After you implemented and deployed their feedback, they reload the testing page – and report
# the exact same issues as before! What happened? Of course, they did not have developer tools
# open, and of course, they did not empty their caches before navigating to your site.