Skip to content

Instantly share code, notes, and snippets.

View frankdarnese's full-sized avatar

Frank D frankdarnese

  • Surrey, England
View GitHub Profile
@frankdarnese
frankdarnese / WP_Query.php
Created March 14, 2019 16:39 — forked from Dimasmagadan/WP_Query.php
#WordPress query with args
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.com
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/3.9/src/wp-includes/query.php
*/
$args = array(
//////Author Parameters - Show posts associated with certain author.

security.ubuntu.com timeout on apt-get update

Issue

When running the apt-get update command, the process 'hangs' when checking security.ubuntu.com endpoints. This is apparantely due to an issue some sites face when trying to connect over IPv6 and whilst it is assumed that this will be fixed at some point in the future (sooner rather than later judging by the transition to IPv6 by most), the fix below resolves this issue, allowing the update process to complete successfully.

Fix

@frankdarnese
frankdarnese / installing-phpmyadmin-on-subdomain.md
Last active November 22, 2017 10:22 — forked from harryfinn/installing-phpmyadmin-on-subdomain.md
How to install PHPMyAdmin on a subdomain

Installing PHPMyAdmin on a subdomain

I was recently tasked with adding PHPMyAdmin to one of our LAMP servers for a 3rd party with little/no ssh knowledge to use in order to access the MySQL database(s). This gist documents how I configured PHPMyAdmin on the LAMP server on a subdomain with an SSL.

Prerequisites

Before following this guide, it is assumed that you already have a LAMP server up

@frankdarnese
frankdarnese / pagespeed-module.md
Created November 9, 2017 10:01 — forked from harryfinn/pagespeed-module.md
Pagespeed module (Apache) instructions

Using Google Pagespeed module (Apache)

Install

Follow initial install instructions here

Recommended additional modules

Add the following to the bottom (but inside the <IfModule /> block) of /etc/apache2/mods-available/pagespeed.conf

@frankdarnese
frankdarnese / ubuntu16.04-lamp-nodejs-wp-cli.md
Created November 9, 2017 10:00 — forked from harryfinn/ubuntu16.04-lamp-nodejs-wp-cli.md
Ubuntu 16.04: LAMP w/ NodeJS & WP-CLI

Ubuntu 16.04 LAMP w/ NodeJS & WP-CLI

Setup LAMP stack

Apache

apt-get update
apt-get install apache2
@frankdarnese
frankdarnese / letsencrypt-wordpress-setup.md
Last active March 8, 2018 12:18 — forked from harryfinn/letsencrypt-wordpress-setup.md
Instructions on how to setup a Letsencrypt SSL certificate on a WordPress site

Letsencrypt (for WordPress sites)

Note: This setup assumes you are running Ubuntu 16.04 OS with Apache 2.4.23, older versions of Ubuntu (i.e. 14.04) require minor configuration changes in order for this setup to work.

Setup

Follow the install instructions for certbot (letsencrypt's SSL manager) on https://certbot.eff.org/, making sure to select the correct server OS version.

Note: You only need to complete the Install section, then return to this README in order to setup your SSL

@frankdarnese
frankdarnese / wp-cli-migrate-db.md
Last active November 22, 2017 11:45 — forked from harryfinn/wp-cli-migrate-db.md
WP-CLI DB migrate instructions

Instructions for using WP-CLI to migrate a WordPress DB

Export current (local) DB
wp db export db.sql
Copy file from local to server (may need to amend server path if not in html folder)

The example below is for local to remote, simply swap these 2 around for remote to local

@frankdarnese
frankdarnese / gist:5e3cc9228df4693274b27dcbf43dba22
Last active November 22, 2017 11:53 — forked from alimd/gist:3344523
All github Emoji (Smiles)

All github Emoji (Smiles)

[ali.md/emoji](http://ali.md/emoji)

:bowtie: | :smile: | :laughing: | :blush: | :smiley: | :relaxed: | :smirk: | :heart_eyes: | :kissing_heart: | :kissing_face: | :flushed: | :relieved: | :satisfied: | :grin: | :wink: | :wink2: | :tongue: | :unamused: | :sweat_smile: | :sweat:

:weary: | :pensive: | :disappointed: | :confounded: | :fearful: | :cold_sweat: | :persevere: | :cry: | :sob: | :joy: | :astonished: | :scream: | :neckbeard: | :tired_face: | :angry: | :rage: | :triumph: | :sleepy: | :yum: | :mask:
@frankdarnese
frankdarnese / 0_reuse_code.js
Last active August 29, 2015 14:19
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console