Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am phillcoxon on github.
  • I am phillcoxon (https://keybase.io/phillcoxon) on keybase.
  • I have a public key ASAXvjdSBYqxoM0rr1mWvTenKFSCGmhf7JVaaKCzTp0o5go

To claim this, I am signing this object:

@phillcoxon
phillcoxon / download_private_github_release.sh
Created November 3, 2019 01:04 — forked from josh-padnick/download.sh
Download a private binary release file from GitHub in bash
#!/usr/bin/env bash
#
# This is an adaptation of code I wrote to download a private binary from GitHub. Such...pain.
# Why can't GitHub just offer a standardized URL you can download a release binary from and attach
# your Github Personal Access Token as a header?
#
# Since this code is an adaptation it hasn't been directly tested, but the code it was adapted from works
# and hopefully you can get the missing piece you're after by looking here.
#
@phillcoxon
phillcoxon / gist:4b6070a05362b4ab5783f9afcb788c4e
Created November 26, 2018 07:09
Example of responsive static bootstrap table
<div class="table-responsive">
<!--Table-->
<table id="tablePreview" class="table table-striped table-hover table-bordered">
<!--Table head-->
<thead>
<tr>
<th>#</th>
<th>From This City To >></th>
<th>Midwa-MDW</th>
<th>O'Hare-ORD</th>
@phillcoxon
phillcoxon / Advanced Options Settings
Created April 23, 2018 18:39 — forked from lukecav/Advanced Options Settings (Improved)
MainWP Dashboard - Advanced Options (Performance)
Cross IP Settings
Maximum simultaneous requests 0 Default: 4
Minimum delay between requests (milliseconds) 100 Default: 200
IP Settings
Maximum simultaneous requests per ip 0 Default: 1
Minimum delay between requests to the same ip (milliseconds) 200 Default: 1000
Frontend request Settings
Maximum simultaneous sync requests 12 Default: 8
@phillcoxon
phillcoxon / gist:c11dc85225ba84c389131379b0172a39
Last active January 29, 2018 07:29
Greyscale all images in Beaver Builder and Astra theme for Prototyping
/* Greyscale all site images in Beaver Builder and Astra them */
/* Add to Beaver Builder Global CSS */
img, body
{
filter: grayscale(100%) !important;
-moz-filter: grayscale(100%) !important;
-webkit-filter:grayscale(100%) !important;
-webkit-filter: grayscale(1) !important;
@phillcoxon
phillcoxon / gist:84d95dc85052b6144995d615b47f1b6a
Created December 14, 2017 19:55
GiveWP - Replace all occurrences of Donor / Donations with Contributor / Contributions
/* GiveWP - change "Donation Total" */
/*
function change_give_donation_total_label() {
return __('Contribution Total', 'give');
}
add_filter( 'give_donation_total_label', 'change_give_donation_total_label' );
*/
/*************************************************************************/
@phillcoxon
phillcoxon / functions.php
Created August 2, 2017 05:29 — forked from TimBHowe/functions.php
WooCommerce - Add custom post_meta data to the order REST API response.
<?php
/**
* Hook into order API response to add custom field data.
*
* @param $order_data array
* @param $order WC_Order
* @param $fields array
* @param $server array
*
@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
@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 / 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');