This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Fallback for Google Pagespeed sharding. | |
* | |
* Presumptions: | |
* Pagespeed sharding is on. | |
* This javascript is included at the bottom of the body (or there-abouts). | |
* The website in question includes jQuery on this page. | |
* Pagespeed is sharding the jQuery javascript (it isn't being loaded externally). | |
* If the user cannot get one of the shard subdomains, they cannot get them all. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof jQuery == 'undefined'){ | |
console.log('Filterizer: Cannot be ran. jQuery is not loaded yet.'); | |
} else { | |
(function($) { | |
$(document).ready(function(){ | |
var attempt_time = 10, // amount of time to keep trying in seconds | |
interval_ms = 150, // how frequently to attempt in ms | |
elapsed_time = 0, // elapsed time in ms | |
interval = setInterval(function(){ | |
elapsed_time += interval_ms; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Uncaught TypeError: Cannot read property 'fields' of undefined | |
$.fn.addressfield.apply | |
(anonymous function) | |
f.event.dispatch | |
f.event.add.h.handle.i | |
f.event.trigger | |
(anonymous function) | |
e.extend.each | |
e.fn.e.each | |
f.fn.extend.trigger |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Safely track outbound links in Google Analytics using jQuery | |
*/ | |
(function($) { | |
"use strict"; | |
// Wait till the dom has loaded | |
$(document).ready(function(){ | |
// Current page host | |
var host = window.location.host; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ...[curl code]... | |
$info = curl_getinfo($ch); | |
curl_close($ch); | |
$header = substr($response, 0, $info['header_size']); | |
$body = substr($response, -$info['download_content_length']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$data = array(1, 2, 3, 4, 5, 6, 7, 8, 9); | |
// assume by this point we are needing to respond by JSON or JSONP. $data can be an object or array :D | |
header('content-type: application/json; charset=utf-8'); | |
if (isset($_GET['callback']) && ctype_alnum($_GET['callback'])){ | |
// JSONP response | |
exit($_GET['callback'].'('.json_encode($data).')'); | |
} else { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function (window, document) { | |
var doc = document; | |
document._write = document.write; | |
var _tcproto = (window.location.protocol == "https:") ? "https" : "http"; | |
var _tchost = _tcproto + "://tc.convertro.com/tagroot"; | |
var _log_request = 0; | |
if (getQueryParam("tclogging") == 1) { | |
_log_request = 1 | |
} | |
var _args = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drush dis htmlmail -y | |
drush en update -y | |
drush updb -y | |
drush dis update -y | |
drush en htmlmail -y | |
drush updb -y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT | |
customer_entity.email as Email, | |
enterprise_giftregistry_entity.tui_holiday_contract_id as Contract, | |
enterprise_giftregistry_entity.tui_holiday_departure_date as Departure | |
FROM | |
enterprise_giftregistry_item, | |
enterprise_giftregistry_entity, | |
customer_entity | |
WHERE | |
# Only do this for holidays that have not yet departed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DELIMITER // | |
DROP PROCEDURE IF EXISTS MigrateDeletedProduct// | |
CREATE PROCEDURE MigrateDeletedProduct( | |
IN source_product_id INT, | |
IN dest_product_id INT) | |
BEGIN | |
UPDATE | |
enterprise_giftregistry_item | |
SET | |
# Define the destination product ID: |
OlderNewer