Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Phil Taylor PhilETaylor

🎯
Focusing
View GitHub Profile
View How To Disable Strict SQL Mode in MySQL 5.7.MD

How To Disable Strict SQL Mode in MySQL 5.7

I wrote a quick script for those that provision servers often enough.

To get this to work take the following steps

  1. Log into your server as root
  2. Get script wget https://gist.githubusercontent.com/nfourtythree/90fb8ef5eeafdf478f522720314c60bd/raw/disable-strict-mode.sh
  3. Make is executable chmod +x disable-strict-mode.sh
  4. Run the script ./disable-strict-mode.sh
@PhilETaylor
PhilETaylor / docker-compose.yml
Last active Feb 28, 2020 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac (Mojave) with Native NFS
View docker-compose.yml
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
@PhilETaylor
PhilETaylor / install_predis.sh
Created Dec 30, 2017 — forked from palpalani/install_predis.sh
Installing Redis, Hiredis on Ubuntu 14.04
View install_predis.sh
#!/bin/bash
echo "--------------------------------------------------------------------------------------------"
echo "Installing Predis on Ubuntu 16.04"
echo "Read more: https://github.com/nrk/predis"
echo "Author: Ralf Rottmann | @ralf | http://rottmann.net"
echo "--------------------------------------------------------------------------------------------"
PHP_CONF_DIR="/etc/php/7.0/apache2/conf.d"
echo "Checking prerequisites..."
echo "Git available?"
[ ! -s /usr/bin/git ] && sudo apt-get -q -y install git || echo "Git already installed."
View enable-os-x-screen-sharing.sh
$ ssh <user>@<mac-without-screen>
$ sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
$ sudo launchctl load /System/Library/LaunchDaemons/com.apple.screensharing.plist
/System/Library/LaunchDaemons/com.apple.screensharing.plist: Service is disabled
$ sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist
@PhilETaylor
PhilETaylor / mailcatcher-install.md
Last active Dec 18, 2017 — forked from pitpit/mailcatcher-install.md
Install Mailcatcher on OSX
View mailcatcher-install.md

Install MailCatcher (https://rubygems.org/gems/mailcatcher/versions/0.5.12)

brew install ruby
sudo gem install mailcatcher

Then set it a daemon:

 curl https://gist.githubusercontent.com/sj26/1638617/raw/67505ad7c9191298abcd64ccdcd0cdcf767dccac/me.mailcatcher.plist >>~/Library/LaunchAgents/me.mailcatcher.plist

then run

@PhilETaylor
PhilETaylor / listupdates.php
Created Sep 16, 2017 — forked from renekreijveld/listupdates.php
List extension updates
View listupdates.php
<?php
/**
* @package Joomla.Cli
*
* @copyright Copyright (C) 2016 Rene Kreijveld, All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* This is a script which should be called from the command-line, not the web.
@PhilETaylor
PhilETaylor / .htaccess
Created May 13, 2017 — forked from allysonsouza/.htaccess
Enabling PHP 7 on Hostgator trough htaccess
View .htaccess
# Habilitar o PHP 7.0
AddHandler application/x-httpd-php70 .php
<IfModule mod_suphp.c>
suPHP_ConfigPath /opt/php70/lib
</IfModule>
View reverse-engineering-wordpress-0day-exploit.txt
REVERSE ENGINEERING CRITICAL WORDPRESS 0day EXPLOIT
This past weekend, I noticed an interesting alert from my mod_security logs for a request being made to my Wordpress site. Although the request was un-successful, I decided to dig deeper to understand what this was request was actually trying to do. After time, I've concluded that this is possibly a new 0day exploit attempt against Wordpress or a related Wordpress plugin (iThemes Security??). I'm still trying to uncover the exact flaw being exploited here so if anyone has any further details, feel free to contact me at 1N3@hushmail.com or twitter @CrowdShield.
ORIGINAL MOD-SECURITY REUQUEST
==> /var/log/apache2/error.log <==
[Sat Aug 15 19:00:10 2015] [error] [client 46.148.18.226] ModSecurity: Warning.
@PhilETaylor
PhilETaylor / masterplugin.php
Last active Mar 28, 2019 — forked from jneubauer/masterplugin.php
Joomla! plugin that fires all possible plugin events
View masterplugin.php
<?php
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
jimport('joomla.log.log');
class PlgSystemMasterplug extends JPlugin
{
function onExtensionBeforeInstall(){
JLog::add(JText::_('onExtensionBeforeInstall'), JLog::WARNING);
View importer.php
<?php
//@unlink('importxml.xml');
$_SERVER['HTTP_HOST'] = '127.0.0.1';
define('_JEXEC', 1);
define('JPATH_BASE', realpath(__DIR__ . '/../'));
require_once '../includes/defines.php';
require_once '../includes/framework.php';
error_reporting(E_ALL);
You can’t perform that action at this time.