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 |
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
#!/bin/bash | |
# Retrieves past and present logs for a site in Acquia Enterprise | |
# Put this in your /usr/local/bin folder and chmod it 0755 | |
# Then you can search/view logs quickly from any terminal | |
if [ "$1" = "" ] || [ "$2" = "" ] | |
then | |
echo "Retrieves past and present logs for a site in Acquia Enterprise" | |
echo "Usage: $0 <site-alias> <site-environment>" | |
echo "Example: $0 qrk test" |
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
/** | |
* Linkedin auto-connect thingy. | |
* | |
* Step 1) Log in to Linkedin and go to https://www.linkedin.com/people/pymk | |
* (This is the "People You May Know page") | |
* Step 2) Open your browser console and run this javascript. | |
*/ | |
(function($) { | |
var processedCards = []; | |
var lih = function(){ |
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
#! /bin/bash | |
cf_user=<inset your email address here> | |
cf_token=<inset your api token here> | |
RED='\033[0;31m' | |
GREEN='\033[0;32m' | |
NC='\033[0m' | |
if [ -z $1 ] |
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 | |
/** | |
* Automatically extrapolate JSON keys/values from a CSV into their own columns. | |
* JSON is flattened, and null values/keys are ignored. | |
* | |
* Usage: | |
* | |
* php UnpackCSVJSON.php original.csv destination.csv | |
*/ | |
$file = $argv[1]; |
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
DROP TABLE IF EXISTS jobs_copy; | |
CREATE TABLE `jobs_copy` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `queue` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `payload` text COLLATE utf8_unicode_ci NOT NULL, `attempts` tinyint(3) unsigned NOT NULL, `reserved` tinyint(3) unsigned NOT NULL, `reserved_at` int(10) unsigned DEFAULT NULL, `available_at` int(10) unsigned NOT NULL, `created_at` int(10) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=29972441 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; | |
INSERT INTO `jobs_copy` SELECT * FROM `jobs`; | |
DELETE FROM jobs WHERE `reserved` != 1 AND `id` IN (SELECT `id` FROM jobs_copy ORDER BY `id` DESC); | |
# Repeat ad nauseam: | |
INSERT INTO `jobs` (SELECT * FROM `jobs_copy` ORDER BY `id` ASC LIMIT 500); DELETE FROM `jobs_copy` ORDER BY `id` ASC LIMIT 500; SELECT SLEEP(18); SELECT COUNT(*) FROM `jobs`; |
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
# ************************************************************ | |
# Database: mautic_eb_multi | |
# ************************************************************ | |
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; | |
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; | |
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; | |
/*!40101 SET NAMES utf8 */; | |
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; |