Skip to content

Instantly share code, notes, and snippets.

@extraordinaire
extraordinaire / reconnecting_pdo.php
Last active June 27, 2023 11:12
Reconnectable PDO
<?php
class ReconnectingPDO
{
protected $dsn, $username, $password, $pdo, $driver_options;
public function __construct($dsn, $username = "", $password = "", $driver_options = array())
{
$this->dsn = $dsn;
$this->username = $username;
$this->password = $password;
@foo4u
foo4u / 30_docker_ports.config
Last active July 6, 2023 00:45
Infinispan on Amazon AWS Beanstalk (should work with vanilla EC2 and ECS)
files:
/opt/elasticbeanstalk/hooks/appdeploy/post/10_docker_nat.sh:
mode: "000755"
owner: root
group: root
content: |
#!/bin/bash
set -u # Fail on unset variables
set -e # Fail if any command fails
PATH="$PATH:/sbin:/usr/bin"