Skip to content

Instantly share code, notes, and snippets.

View tonyclemmey's full-sized avatar

Tony Clemmey tonyclemmey

  • London
View GitHub Profile
@tonyclemmey
tonyclemmey / netplan2NM.sh
Created November 24, 2022 12:40 — forked from dbkinghorn/netplan2NM.sh
Change Ubuntu 20.04 server netplan to use NetworkManager instead of networkd
#!/usr/bin/env bash
# netplan2NM.sh
# Ubuntu server 20.04 Change from netplan to NetworkManager for all interfaces
echo 'Changing netplan to NetowrkManager on all interfaces'
# backup existing yaml file
cd /etc/netplan
cp 01-netcfg.yaml 01-netcfg.yaml.BAK
@tonyclemmey
tonyclemmey / usps-remove-priority-flat-rate-envelopes.php
Last active October 2, 2022 12:57 — forked from woogists/usps-remove-priority-flat-rate-envelopes.php
[USPS Shipping Method] To remove all the USPS Priority Flat Rate envelopes, leaving only the Small, Medium, and Large Flat Rate boxes, add this to your theme's functions.php file:
<?php
/**
* Plugin Name: Woocommerce USPS Shipping Method remove flat rate envelopes
* Plugin URI: https://tcdesignio.co.uk
* Description: <code>Woocommerce USPS Shipping Method remove flat rate envelopes <strong> - TCDESIGN</strong></code>
* Version: 1.0.0
* Tested up to: 6.0
*/
/**
@tonyclemmey
tonyclemmey / install_libdb4.8.sh
Created June 28, 2022 20:17 — forked from darosior/install_libdb4.8.sh
Install libdb4.8 on Debian (from Ubuntu ppa) for i386 or amd64
#!/usr/bin/env bash
if [ "$#" -ne "1" ]; then
echo "usage :"
echo " $0 <amd64|i386>"
elif ! [ "$1" = "amd64" ] && ! [ "$1" = "i386" ]; then
echo "Bad architecture argument. First and only argument must be amd64 or i386."
else
mkdir "tmplibdb" && cd "tmplibdb"
if [ "$1" = "amd64" ]; then
@tonyclemmey
tonyclemmey / nginx_client_cn_auth.conf
Created May 2, 2022 15:50 — forked from schtobia/nginx_client_cn_auth.conf
CN-based client authentification with nginx. This emulates Apache's SSLRequire (%{SSL_CLIENT_S_DN_CN} in {"Really Me"})
map $ssl_client_s_dn $ssl_client_s_dn_cn {
default "";
~/CN=(?<CN>[^/]+) $CN;
}
server {
listen 80;
listen [::]:80;
listen 443 ssl;
@tonyclemmey
tonyclemmey / wp_config.php
Created April 8, 2022 19:33 — forked from butlerblog/wp_config.php
Configure WordPress #wp_mail function to send through #SMTP server https://b.utler.co/Y3
<?php
/*
* Set the following constants in wp-config.php.
* These should be added somewhere BEFORE the constant ABSPATH is defined.
*
* Author: Chad Butler
* Author URI: https://butlerblog.com
*
* For more information and instructions, see: https://b.utler.co/Y3
@tonyclemmey
tonyclemmey / .htninja
Last active January 10, 2022 00:14 — forked from jcchikikomori/.htninja
NinjaFirewall config for Bedrock
<?php
/*
+=====================================================================+
| NinjaFirewall optional configuration file |
| |
| See: https://nintechnet.com/ninjafirewall/wp-edition/help/?htninja |
| |
+=====================================================================+
| |
| BEDROCK SUPPORT |

Install MySQL

See what formula are available.

brew search mysql
==> Formulae
@tonyclemmey
tonyclemmey / squid3-install.sh
Last active January 10, 2022 17:34 — forked from james-see/squid_http_setup_ubuntu.sh
squid http proxy setup
#!/bin/bash
############################################################
# Squid Proxy Installer
# Author: Yujin Boby
# Email: [email protected]
# Github: https://github.com/serverok/squid-proxy-installer/
# Web: https://serverok.in/squid
############################################################
# For paid support, contact
# https://serverok.in/contact
@tonyclemmey
tonyclemmey / woocommerce.css
Created May 4, 2021 22:32 — forked from catchthemes/woocommerce.css
Make the WooCommerce Cart Table Responsive for Mobile Devices
/* START Make the WooCommerce Cart Table Responsive for Mobile */
/* CSS published in http://www.jeremycarter.com.au/optimising-woocommerce-checkout-for-mobile/ */
@media screen and (max-width: 600px) {
/* Force table to not be like tables anymore */
.woocommerce-page table.shop_table,
.woocommerce-page table.shop_table thead,
.woocommerce-page table.shop_table tbody,
.woocommerce-page table.shop_table th,
@tonyclemmey
tonyclemmey / Cordova for iOS
Created February 21, 2021 23:57 — forked from peteygao/Cordova for iOS
Step by Step guide to installing Cordova for iOS development
1. Install Xcode, if you haven't already.
a. Once installed, run Xcode and accept the license agreement.
b. Go into Xcode Prefs (Cmd + ,), go to Downloads, and install "Command Line Tools for Xcode" (or something named similarily)
2. Install Homebrew (copy and paste the following into your terminal):
```bash
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"