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
#!/usr/bin/env bash | |
# Prevent cron tasks from being ran by multiple instances in Elastic Beanstalk. | |
# Automatically adjusts to new "leading instance" when scaling up or down. | |
# Stores the result in an environment variable for other uses as AWS_EB_CRON | |
# | |
# This must be ran by cron as the root user to function correctly. | |
# Anything after this file will be executed as webapp for security. | |
# | |
# Example Cron (should be created by .ebextensions): |
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
#!/usr/bin/env bash | |
# Upgrade an Amazon Linux EC2 to PHP 7.3 | |
# | |
# Last tested w/ PHP 7.2 AWS Linux version 2.8.5 | |
# | |
# Must be ran as sudo: | |
# sudo bash upgrade-php7.sh | |
# | |
# Can be added to ./.ebextensions/20_php.config like so: | |
# container_commands: |
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 */; |
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
Symfony Container Public Services | |
================================= | |
------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------- | |
Service ID Class name | |
------------------------------------------------------------------------------------------------------ --------------------------------------------------------------------------------------- | |
annotation_reader Doctrine\Common\Annotations\CachedReader | |
assets.context Symfony\Component\Asset\Context\RequestStackContext | |
assets.packages Symfony\Component\Asset\Packages | |
babdev\trans |
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
$sql = $query->getSQL(); | |
foreach($query->getParameters() as $key => $val) { | |
if (is_numeric($val)) { | |
$sql = str_replace(':' . $key, $val, $sql); | |
} else { | |
$sql = str_replace(':' . $key, '"'.$val.'"', $sql); | |
} | |
} |
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
Found by php app/console debug:container --show-private --env=dev | grep -i "listener:" | |
bazinga.oauth.event_listener.exception Bazinga\OAuthServerBundle\EventListener\OAuthExceptionListener | |
bazinga.oauth.event_listener.request Mautic\ApiBundle\EventListener\OAuth1\OAuthRequestListener | |
Symfony\Component\Security\Http\Firewall\ExceptionListener | |
debug.debug_handlers_listener Symfony\Component\HttpKernel\EventListener\DebugHandlersListener | |
doctrine.orm.default_entity_listener_resolver Doctrine\Bundle\DoctrineBundle\Mapping\ContainerAwareEntityListenerResolver | |
doctrine.orm.default_listeners.attach_entity_listeners Doctrine\ORM\Tools\AttachEntityListenersListener | |
fos_rest.body_listener |
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
From 23a41e73f13cfbc9bc0156ee8bcb69ff15fa29c1 Mon Sep 17 00:00:00 2001 | |
From: heathdutton <hdutton@thedmsgrp.com> | |
Date: Mon, 9 Apr 2018 16:47:13 -0400 | |
Subject: [PATCH 1/5] Support includes/excludes with text fields for bulk | |
filtering. | |
--- | |
app/bundles/LeadBundle/Entity/LeadListRepository.php | 10 ++++++++++ | |
app/bundles/LeadBundle/Entity/OperatorListTrait.php | 2 ++ | |
2 files changed, 12 insertions(+) |
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
diff --git a/app/bundles/LeadBundle/Entity/LeadListRepository.php b/app/bundles/LeadBundle/Entity/LeadListRepository.php | |
index 8cdfbae108..234535214f 100644 | |
--- a/app/bundles/LeadBundle/Entity/LeadListRepository.php | |
+++ b/app/bundles/LeadBundle/Entity/LeadListRepository.php | |
@@ -1677,11 +1677,44 @@ public function getListFilterExpr($filters, &$parameters, QueryBuilder $q, $isNo | |
case 'in': | |
case 'notIn': | |
+ if (is_string($details['filter'])) { | |
+ // Expound the string to an array based on common string array notations. |