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: |
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
DELETE FROM | |
enterprise_giftregistry_item | |
WHERE | |
enterprise_giftregistry_item.item_id IS IN (667, 31013, 33823, 35795, 35826); |
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 | |
core_fleet_boats.code as 'Boat Code', | |
core_fleet_boats.name as 'Boat Name', | |
core_bs_node_extras.search_description as 'Short Boat Description', | |
CONCAT('http://www.sunsail.co.uk/', (core_files.filepath)) as 'Layout Image URL', /* note, this is the original file, not web-optimized */ | |
/* Get the first 4 images of this boat as columns */ | |
CONCAT('http://www.sunsail.co.uk/', (SELECT core_files.filepath FROM | |
core_content_field_gallery, | |
core_files | |
WHERE |
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
/* Find all instances of registry/holiday products that are missing from the website that they exist in */ | |
SELECT * FROM | |
enterprise_giftregistry_item, | |
enterprise_giftregistry_entity, | |
catalog_product_website | |
WHERE | |
enterprise_giftregistry_entity.entity_id = enterprise_giftregistry_item.entity_id AND /* get the registry entity */ | |
enterprise_giftregistry_item.product_id = catalog_product_website.product_id AND /* get the product entity */ | |
enterprise_giftregistry_entity.website_id NOT IN ( | |
SELECT |
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
javascript:styles%3D%27div.krumo-nest %7Bdisplay: block !important%3B%7D%27%3B newSS %3D document.createElement(%27link%27)%3B newSS.rel %3D %27stylesheet%27%3B newSS.href %3D %27data:text/css,%27 %2B escape(styles)%3B document.documentElement.childNodes%5B0%5D.appendChild(newSS)%3B void 0 |
OlderNewer