Skip to content

Instantly share code, notes, and snippets.

View ezdata's full-sized avatar

Jeff ezdata

View GitHub Profile
@Netzberufler
Netzberufler / style.css
Created April 12, 2017 13:18
Twenty Seventeen Full Width page template
body.page-template-template-full-width #content #primary {
max-width: 100%;
}
body.page-template-template-full-width #content #primary .entry-header,
body.page-template-template-full-width #content #primary .entry-content {
float: none;
width: 100%;
}
@anythinggraphic
anythinggraphic / gravity-forms-notification-popup-keep-form.php
Last active November 27, 2020 21:30
Gravity Forms Notification Popup (Genesis Framework)
<?php
//* OPTIONAL STEP - Keep the form disappearing.
//* Gravity Forms notification popup instead of the page redirect or AJAX notification.
//* Props to @WilliamAlexander in the comments
//* @link https://anythinggraphic.net/gravity-forms-notification-popup
add_filter( 'gform_confirmation', 'ag_custom_confirmation', 10, 4 );
function ag_custom_confirmation( $confirmation, $form, $entry, $ajax ) {
add_filter( 'wp_footer', 'ag_overlay');
@tureki
tureki / json_encode-null-to-empty-string-1.php
Last active March 31, 2021 18:53
json_encode null to empty string.
$value = array(
"deep"=>1,
"data"=>null,
"node"=>array(
"deep"=>2,
"data"=>null,
"node"=>array(
"deep"=>3
)
),
@joech4n
joech4n / Configure Postfix for Gmail SMTP in Mac OSX.md
Last active May 13, 2023 10:34 — forked from larrybotha/readme.markdown
Configure Postfix for Gmail SMTP in Mac OSX
@JohnBunka
JohnBunka / embed-pdf-google-viewer.php
Created August 16, 2013 21:10
Embed PDFs with Google PDF viewer
<iframe src="http://docs.google.com/gview?url=http://example.com/mypdf.pdf&embedded=true" style="width:100%; height:1000px;" frameborder="0"></iframe>
@hadl
hadl / microtime_diff.php
Last active March 5, 2021 04:05
PHP Microtime Diff -- Calculate a precise time difference
<?php
/**
* Calculate a precise time difference.
* @param string $start result of microtime()
* @param string $end result of microtime(); if NULL/FALSE/0/'' then it's now
* @return flat difference in seconds, calculated with minimum precision loss
*/
function microtime_diff($start, $end = null)
{
if (!$end) {