Skip to content

Instantly share code, notes, and snippets.

@blueprintmrk
blueprintmrk / gw-gravity-forms-map-fields-to-field.php
Created May 2, 2016 17:08 — forked from spivurno/gw-gravity-forms-map-fields-to-field.php
Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
<?php
/**
* Gravity Wiz // Gravity Forms // Map Submitted Field Values to Another Field
*
* Preview your Gravity forms on the frontend of your website. Adds a "Live Preview" link to the Gravity Forms toolbar.
*
* Usage
*
* 1 - Enable "Allow field to be populated dynamically" option on field which should be populated.
* 2 - In the "Parameter Name" input, enter the merge tag (or merge tags) of the field whose value whould be populated into this field.
@blueprintmrk
blueprintmrk / criticalcss-bookmarklet-devtool-snippet.js
Created February 7, 2016 18:25 — forked from PaulKinlan/criticalcss-bookmarklet-devtool-snippet.js
CriticalCSS Bookmarklet and Devtool Snippet.js
(function() {
var CSSCriticalPath = function(w, d, opts) {
var opt = opts || {};
var css = {};
var pushCSS = function(r) {
if(!!css[r.selectorText] === false) css[r.selectorText] = {};
var styles = r.style.cssText.split(/;(?![A-Za-z0-9])/);
for(var i = 0; i < styles.length; i++) {
if(!!styles[i] === false) continue;
var pair = styles[i].split(": ");
@blueprintmrk
blueprintmrk / wp-config.php
Created December 16, 2015 05:54 — forked from joshkoenig/wp-config.php
This is the wp-config.php supplied by Pantheon to allow automagic operation with WordPress
<?php
/**
* This config file is yours to hack on. It will work out of the box on Pantheon
* but you may find there are a lot of neat tricks to be used here.
*
* See our documentation for more details:
*
* http://helpdesk.getpantheon.com/
*/
@blueprintmrk
blueprintmrk / es-419
Last active December 15, 2016 06:45
examplesite.com/es-419 hreflang
Google gives us some examples where rel=”alternate” hreflang=”x” is recommended:
The entire website is fully translated in another language, i.e. one version in Spanish – http://www.examplesite.com/es and one version in German http://www.examplesite.com/de.
You have regional variations within a single language, i.e. one version in Spanish for users in Mexico – http://www.examplesite.com/es-419-mx and one version in Spanish for users in Spain – http://www.examplesite.com/es-es.
Your site is partially translated with the main content being in a single language i.e. sites with translated site temple only (navigation menu/footer). This is very common on user-generated sites like forums and discussion boards.
So, how does an SEO implement hreflang correctly? Google gives us three methods:
1. HTML Link Element In Header
@blueprintmrk
blueprintmrk / gf-salesforce-web-to-lead-datetime.php
Created November 3, 2015 00:46 — forked from zackkatz/gf-salesforce-web-to-lead-datetime.php
Use DateTime for Gravity Forms Salesforce Web-to-Lead Addon
<?php
/**
* 1. Tell the plugin to use DateTime instead of Date for the "MyPrefix__Date_and_Time__c" field
*
* @param string $boolean Whether to use DateTime instead of Date (default: false)
* @param string $key The Field Name (or API Name if a custom field) used in Salesforce
* @param array $additional_info Associative array with form, entry, field, feed data
*/
function modify_gf_salesforce_use_datetime( $boolean = false, $key = '', $additional_info = array() ) {
@blueprintmrk
blueprintmrk / browser-redirect.js
Created October 19, 2015 23:24 — forked from sickOscar/browser-redirect.js
WPML - browser-redirect.js - Fix
/*globals wpml_browser_redirect_params */
jQuery(document).ready(function () {
if (jQuery.cookie !== undefined) {
// Check if cookie are enabled
jQuery.cookie('wpml_browser_redirect_test', '1');
var cookie_enabled = jQuery.cookie('wpml_browser_redirect_test') === '1';
jQuery.removeCookie('wpml_browser_redirect_test');
if (cookie_enabled) {
@blueprintmrk
blueprintmrk / hhvm.conf
Last active August 29, 2015 14:27 — forked from tomazzaman/hhvm.conf
Monit configurations for commonly used services
check process hhvm with pidfile /var/run/hhvm/pid
group hhvm
start program = "/usr/sbin/service hhvm start" with timeout 60 seconds
stop program = "/usr/sbin/service hhvm stop"
if failed unixsocket /var/run/hhvm/hhvm.sock then restart
if mem > 400.0 MB for 1 cycles then restart
if 5 restarts with 5 cycles then timeout
@blueprintmrk
blueprintmrk / ie-css-hacks.css
Last active August 29, 2015 14:26 — forked from necolas/ie-css-hacks.css
IE CSS hacks
/*
* Property prefix hacks
*/
/* IE6 only - any combination of these characters */
_ - £ ¬ ¦
/* IE6/7 only - any combination of these characters */
https://github.com/rafaelstz/atom-magento-tools.git
@blueprintmrk
blueprintmrk / gist:67c1fbffa1c64c3c9c73
Last active August 29, 2015 14:24
110220volts zonefile
;---------------------------------------------
; Current zone definition
;---------------------------------------------
110220volts.com. 300 IN A 74.121.238.37
110220volts.com. 300 IN MX 10 alt3.aspmx.l.google.com.
110220volts.com. 300 IN MX 10 alt4.aspmx.l.google.com.
110220volts.com. 300 IN MX 1 aspmx.l.google.com.
110220volts.com. 300 IN MX 5 alt2.aspmx.l.google.com.
110220volts.com. 300 IN MX 5 alt1.aspmx.l.google.com.
110220volts.com. 300 IN TXT "v=spf1 include:_spf.google.com include:trustpilotservice.com include:mailgun.org ~all"