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 | |
namespace FinalClass; | |
require_once __DIR__ . '/vendor/autoload.php'; | |
use PHPUnit\Framework\TestCase; | |
final class Foo | |
{ | |
protected $bar; |
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 | |
# | |
# This will create and setup a MySQL group replication cluster with a given number of members. | |
# Set the number of members below, and then execute this file. You probably want at least 3 members. | |
# | |
# This will create volumes and containers named mysql-X, where X is the number of the member. | |
# If you currently have volumes with the same name, these might be destroyed! | |
# | |
MEMBERS=3 |
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
const NONCE_SECRET = "S3CR3T" // Identify where to inject nonces in your page | |
class ElementHandler { | |
constructor(generatedNonce, nonceReplaceValue) { | |
this.generatedNonce = generatedNonce | |
this.nonceReplaceValue = nonceReplaceValue | |
} | |
element(element) { | |
// An incoming element, such as `div` |
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'ubuntu/trusty64' is up to date...
==> default: Clearing any previously set forwarded ports...
There was an error while executing `VBoxManage`, a CLI used by Vagrant
for controlling VirtualBox. The command and stderr is shown below.
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 | |
# names of latest versions of each package | |
export NGINX_VERSION=1.15.5 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
export VERSION_LIBRESSL=libressl-2.8.1 | |
export VERSION_PCRE=pcre-8.42 | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta | |
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
# Local Dates: | |
git log --date=local --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.local.tsv.txt | |
# ISO Dates: | |
git log --date=iso --pretty=format:"%h%x09%an%x09%ad%x09%s" > commits.iso.tsv.txt |
This guide requires you have the original database directories handy. You may also struggle restoring InnoDB instances because of the way they work, however a guide can be found at the bottom of this gist.
Move your backup database folders to an appropriate location, a temporary folder is preferable as MariaDB will put its own data within this directory.
Within the directory, run the following docker command:
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 | |
# SSH into a Vagrant VM, forwarding ports in a way that allows node within Vagrant to be debugged by a debugger | |
# or IDE in the host operating system. Don't know why, but Vagrantfile port forwarding does not work. | |
# (https://groups.google.com/forum/#!topic/vagrant-up/RzPooJ0dp6Q) | |
/usr/bin/vagrant ssh-config > $TMPDIR/vagrant-ssh-config | |
ssh -F $TMPDIR/vagrant-ssh-config -L 5858:127.0.0.1:5858 default | |
rm $TMPDIR/vagrant-ssh-config |