Skip to content

Instantly share code, notes, and snippets.

How-To: Install Memcache on CentOS (WHM/cPanel)

Without wasting much time, Let us get started!

Follow these simple instructions:

  • Step 1: Login into your WHM panel and using easyapache enable Memcache

  • Step 2: SSH into your server and fire this command yum install memcached.x86_64 php-pecl-memcache.x86_64

@phillcoxon
phillcoxon / gist:09760a88e08928cf84d8
Created September 30, 2015 02:05
MailMate Custom Keybindings
{
// Jeremy's person key bindings for MailMate
//http://jeremy.cowgar.com/2014/09/22/my-mailmate-keybindings/
// Email Creation
"c" = "newMessage:";
"r" = "replyAll:";
"R" = "replySender:";
"f" = "forwardMessage:";
@phillcoxon
phillcoxon / gist:bd8ac321348bea0322d6
Created October 16, 2015 04:05
WordPress debug script (put in wp-config.php)
define( 'WP_DEBUG', true );
if ( WP_DEBUG ) {
define ('JETPACK_DEV_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX || defined( 'DOING_CRON' ) && DOING_CRON ) {
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
} else {
@phillcoxon
phillcoxon / gist:799327a9b392555c9cc8
Created October 16, 2015 04:05
WordPress debug script (put in wp-config.php)
define( 'WP_DEBUG', true );
if ( WP_DEBUG ) {
define ('JETPACK_DEV_DEBUG', true );
define( 'WP_DEBUG_LOG', true );
define( 'SCRIPT_DEBUG', true );
if ( defined( 'DOING_AJAX' ) && DOING_AJAX || defined( 'DOING_CRON' ) && DOING_CRON ) {
define( 'WP_DEBUG_DISPLAY', false );
@ini_set( 'display_errors', 0 );
} else {

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@phillcoxon
phillcoxon / Contract Killer 3.md
Created June 19, 2016 00:00
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@phillcoxon
phillcoxon / backup.sh
Created November 1, 2016 11:20 — forked from bradt/backup.sh
Simple WordPress Backups v2
#!/bin/bash
NOW=$(date +%Y%m%d%H%M%S)
SQL_FILE=${NOW}_database.sql
# Backup database
wp db export ../backups/$SQL_FILE --add-drop-table
# Compress the database file
gzip ../backups/$SQL_FILE
@phillcoxon
phillcoxon / strip_visual_composer_shitcodes.php
Last active March 11, 2021 11:31
Strip Visual Composer shortcodes from posts
<?php
/*
Load selected posts, strip out Visual Composer shortcodes leaving the content intact and update the post again.
*/
require('wp-load.php');
require_once('wp-includes/functions.php');
require_once('wp-includes/shortcodes.php');
@phillcoxon
phillcoxon / stream_to_youtube.sh
Created April 23, 2017 20:19 — forked from olasd/stream_to_youtube.sh
Stream video to youtube via ffmpeg
#! /bin/bash
#
# Diffusion youtube avec ffmpeg
# Configurer youtube avec une résolution 720p. La vidéo n'est pas scalée.
VBR="2500k" # Bitrate de la vidéo en sortie
FPS="30" # FPS de la vidéo en sortie
QUAL="medium" # Preset de qualité FFMPEG
YOUTUBE_URL="rtmp://a.rtmp.youtube.com/live2" # URL de base RTMP youtube
@phillcoxon
phillcoxon / wordmove_with_localbyflywheel.sh
Last active March 7, 2019 00:53 — forked from k4zuki02h4t4/wordmove_with_localbyflywheel.sh
Enable Wordmove with "Local by Flywheel".
#!/usr/bin/env bash
set -xu
RUBY_VERSION=2.4.1
LIBSSL_VERSION=$(dpkg -s libssl1.0.0 | grep -i ^version | awk '{print $2;}')
apt-get update -y
apt-get upgrade -y
apt-get install -y git ssh-pass