- Download getcomposer.org/composer.phar to your account's home directory —
/home/username
. - Edit
.bashrc
file in same directory by addingalias composer='/usr/local/php56/bin/php-cli ~/composer.phar'
line. Updatephp56
part to current relevant version, if necessary. - Restart SSH session or run
source ~/.bashrc
to reload config. - Use
composer
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
// Place this in wp-config | |
define( 'ACF_5_KEY', 'yourkeyhere' ); | |
// Set ACF 5 license key on theme activation. Stick in your functions.php or equivalent. | |
function auto_set_license_keys() { | |
if ( ! get_option( 'acf_pro_license' ) && defined( 'ACF_5_KEY' ) ) { | |
$save = array( | |
'key' => ACF_5_KEY, |
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 | |
/* | |
Plugin Name: Clear Elementor Cache After WP Migrate DB Migration | |
Plugin URI: https://gist.github.com/heyfletch/769c64ad1fab8679032b076433afafd1 | |
Description: Deletes CSS in uploads/elementor/css, which auto-regenerates on pageload. This clears the cache locally and remotely. Must-use plugin (mu-plugin). | |
Author: Fletcher Digital | |
Version: 0.1 | |
Author URI: https://fletcherdigital.com | |
*/ |
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 | |
PLUGINS=$(wp plugin list --update=available --field=name | tr -d '\r'); | |
wp plugin update-all; | |
for plugin in $PLUGINS; do | |
git add -A "wp-content/plugins/$plugin"; | |
git commit -m "Update plugin: $plugin"; | |
done; |
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/sh | |
if [ `nvram get https_enable` -gt 0 ] ; then | |
# get the absolute directory of the executable | |
SELF_PATH=$(cd -P "$(dirname "$0")" && pwd -P) | |
echo SELF_PATH: ${SELF_PATH} | |
# extract the mount path |
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
# ============== shell | |
# Case-insensitive globbing. | |
shopt -s nocaseglob; | |
# Do not overwrite files when redirecting using ">", ">&" or "<>". | |
# Note that you can still override this with ">|". | |
set -o noclobber; | |
# UTF-8 all the way. | |
export LC_ALL='en_GB.UTF-8'; |
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 | |
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after. | |
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars. | |
# Get active services: launchctl list | grep -v "\-\t0" | |
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents | |
# Agents to disable | |
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi |
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 ruby | |
# encoding: utf-8 | |
SILENT = ENV['SL_SILENT'] =~ /false/i ? false : true || true | |
VERSION = '2.2.3' | |
# SearchLink by Brett Terpstra 2015 <http://brettterpstra.com/projects/searchlink/> | |
# MIT License, please maintain attribution | |
require 'net/https' | |
require 'rexml/document' | |
require 'shellwords' |
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
.ck_form.single_line { | |
background: #f9f9f9; | |
font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; | |
line-height: 1.5em; | |
overflow: hidden; | |
color: #666; | |
font-size: 16px; | |
border: solid 1px #d1d1d1; | |
-webkit-box-shadow: none; | |
-moz-box-shadow: none; |
This gist assumes:
- you have a local git repo
- with an online remote repository (github / bitbucket etc)
- and a cloud server (Rackspace cloud / Amazon EC2 etc)
- your (PHP) scripts are served from /var/www/html/
- your webpages are executed by apache
- apache's home directory is /var/www/
NewerOlder