Skip to content

Instantly share code, notes, and snippets.

@careydayrit
careydayrit / gist:28b63f8d1c4432631d4e3de5997681b9
Last active August 25, 2019 18:19
Getting New Wordfence to Work on Pantheon
Switch to git mode
clone the repo from the pantheon dashboard
cd wp-content
ln -s ./uploads/wflogs ./wflogs
#!/bin/bash
# set the environment
export PANTHEON_SITE_NAME='carey-drupal8'
export PANTHEON_ENV='dev'
export TERMINUS=~/vendor/pantheon-systems/terminus/bin/terminus
# Before updating change to sftp mode
$TERMINUS connection:set $PANTHEON_SITE_NAME.$PANTHEON_ENV sftp
Host *.getpantheon.com *.panth.io *.pantheon.io
User darwindelimos
ServerAliveInterval 60
ServerAliveCountMax 10
<h1>Pantheon MyISAM to InnoDB engine converter</h1>
<?php
/*
* Use this script ONLY if you are a Pantheon customer.
* ONLY RUN THIS SCRIPT IN DEV!
*/
$mysqli = @new mysqli($_ENV['DB_HOST'], $_ENV['DB_USER'], $_ENV['DB_PASSWORD'], $_ENV['DB_NAME'], $_ENV['DB_PORT']);
if ($mysqli->connect_errno) {
@careydayrit
careydayrit / composer.json
Created October 10, 2019 14:21
PHP Tool set VS Code
{
"require": {
"pantheon-systems/terminus": "^2.0",
"squizlabs/php_codesniffer": "^3.5"
}
}
#!/usr/bin/bash
terminus backup:create dayrit.live --element=db
terminus backup:create dayrit.live --element=code
terminus backup:create dayrit.live --element=files
<?php
ini_set('ioncube.loader.encoded_paths', '/');
@careydayrit
careydayrit / get_server_timezone.php
Created October 22, 2019 14:10
Get Server Timezone
<?php
echo date_default_timezone_get();
echo '<br>';
echo date('d-m-Y H:i:s');
@careydayrit
careydayrit / info.txt
Last active March 12, 2020 14:14
Get System Information
MariaDB 10.0.23-MariaDB
Nginx 1.8.1
Fedora 22