Skip to content

Instantly share code, notes, and snippets.

View conorbarclay's full-sized avatar

Conor Barclay conorbarclay

View GitHub Profile
/**
* Middleware to check a user token
* @param {Object} req Express request object
* @param {Object} res Express response object
* @param {Function} next Express response object
*/
function authCheck(req, res, next) {
const token = req.signedCookies.token
if (token && token !== 'null') {
@conorbarclay
conorbarclay / wp_auto_install.sh
Created September 25, 2019 16:01 — forked from nicomollet/wp_auto_install.sh
WP-CLI auto install script
#!/bin/bash
# Default options
LOCALE="fr_FR"
DB_HOST='localhost'
VIRUSTOTAL_KEY='YOUR_KEY'
printf "Name of the project? cf My Project: "
read PROJECT_NAME
@conorbarclay
conorbarclay / hny-disable-acf-on-frontend.php
Last active July 26, 2019 19:28 — forked from billerickson/be-disable-acf-frontend.php
A forked and modified version of Bill Erickson's "Disable ACF Frontend" MU plugin that adds some extra checks for front-end requests.
<?php
/**
* Plugin Name: Disable ACF on Front-End
* Description: Provides a performance boost if ACF front-end functions aren't being used.
* Version: 1.0
* Author: Honeycomb Creative
* Author URI: https://www.billerickson.net/code/disable-acf-frontend/
* License: MIT
* License URI: http://www.opensource.org/licenses/mit-license.php
*/