Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

Jeff Mcneill jeffmcneill

I may be slow to respond.
View GitHub Profile
lifeisfoo / dokuwiki ubuntu 16.04
Last active Dec 28, 2018
10 steps - a simple guide to setup dokuwiki on nginx and ubuntu 16.04 (even on AWS EC2)
View dokuwiki ubuntu 16.04
# 1. update apt
apt-get update
# 2. install nginx and php (source;?unb855sess=af28c8160e97b05e634124aa83451119)
apt-get install nginx php php-fpm php7.0-xml
# 3. download dokuwiki
curl -o dokuwiki.tgz
tar xvf dokuwiki.tgz
dokuwiki-2017-02-19e /var/www/dokuwiki
diogoca /
Created Jun 13, 2016
How to install Apache 2.4 and PHP 5.6 on Amazon Linux
# Remove Apache and PHP old version
# Install Apache 2.4, Mod_SSL and PHP 5.6
sudo service httpd stop
sudo yum erase httpd httpd-tools apr apr-util
sudo yum remove php-*
sudo yum install php56
sudo yum install php56-xml php56-xmlrpc php56-soap php56-gd php56-mbstring
sudo yum install php56-mysqlnd
ItsMePN / bacs-account-shortcode.php
Last active Jul 10, 2020
WooCommerce - Shortcode to list BACS accounts on checkout page
View bacs-account-shortcode.php
/* Usage: Put [bacs_account_details] shortcode in "WooCommerce > Settings > Checkout > BACS > Description field" */
/* This function outputs the BACS account details */
function list_bacs_accounts() {
$accounts = get_option( 'woocommerce_bacs_accounts');
if ( $accounts ) {
$list_accounts = '<table>
vicendominguez / ansible-linode-template.yml
Last active Aug 7, 2017
Ansible Linode template (tested and working)
View ansible-linode-template.yml
#### CentOS: yum install pip ; pip install linode-python ; pip install chube
- hosts: localhost
connection: local
gather_facts: false
- name: Create linode server
api_key: '---LINODE-API-KEY-HERE---'
Ookami86 / gist:94810bfafc786f3ec404
Last active Feb 15, 2017
Disable Adware installation for Mac Java 8u40+
View gist:94810bfafc786f3ec404
sed -i "" 's/install.disable.sponsor.offers.*/install.disable.sponsor.offers=true/g' ~/Library/Application\ Support/Oracle/Java/Deployment/
defaults write ~/Library/Application\ Support/JREInstaller/ThirdParty SPONSORS -string "0"
reigelgallarde / woocommerce_product_tabs_contact_form7.php
Last active Feb 27, 2017
WooCommerce Additional Tab Product Inquiry.
View woocommerce_product_tabs_contact_form7.php
* Plugin Name: WooCommerce plus Contact Form 7
* Plugin URI:
* Description: Additional Tab Product Inquiry.
* Author: Reigel Gallarde
* Author URI:
* Version: 0.1
* Tested up to: 4.1
matthewmueller /
Last active Aug 10, 2020
OSX for Hackers (Mavericks/Yosemite)
# OSX for Hackers (Mavericks/Yosemite)
# Source:
# Some things taken from here
# Ask for the administrator password upfront
jnovack /
Last active Jul 16, 2020
Opening up mosh in firewalld using firewall-cmd

Mosh (mobile shell) is a gift from the Gods(tm). Anyone with spotty internet or wireless connection has suffered the pain of a lost SSH session. Sure, one can fire up screen (or tmux as the kids are using these days), but that's an extra step and you are still using the SSH protocol.

I'm not here to tout the benefits of Mosh, you came here to open it up in your firewall.

  1. Create the following file as /etc/firewalld/services/mosh.xml
  2. firewall-cmd --add-service=mosh --permanent
  3. firewall-cmd --reload

If you tend to have a lot of sessions (not recommended), you can increase the ports, but the default should be fine for most applications.

jonschlinkert /
Last active Oct 15, 2020
A better markdown cheatsheet.
sergejmueller / .htaccess
Last active Dec 10, 2019
Apache: Detecting WebP support with Header Vary Accept
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_ACCEPT} image/webp
RewriteCond %{DOCUMENT_ROOT}/$1.webp -f
RewriteRule (.+)\.(jpe?g|png)$ $1.webp [T=image/webp,E=accept:1]
<IfModule mod_headers.c>
Header append Vary Accept env=REDIRECT_accept
You can’t perform that action at this time.