Skip to content

Instantly share code, notes, and snippets.

@david-rahrer
david-rahrer / wp-functions-misc.php
Last active October 30, 2023 06:00
Misc WordPress Functions
/* Hide contrast checker warning in admin */
function custom_admin_styles() {
?>
<style type="text/css">
.block-editor-contrast-checker>.components-notice {
margin: 0;
display: none;
}
</style>
<?php
# Uncomment and modify any variables you need
# see https://github.com/srvrco/getssl/wiki/Config-variables for details
# see https://github.com/srvrco/getssl/wiki/Example-config-files for example configs
#
# The staging server is best for testing
#CA="https://acme-staging.api.letsencrypt.org"
# This server issues full certificates, however has rate limits
#CA="https://acme-v01.api.letsencrypt.org"
#PRIVATE_KEY_ALG="rsa"
@david-rahrer
david-rahrer / remove_route.xml
Last active October 31, 2016 17:16
Remove index.php?route=common/home vqmod extension for OpenCart 2.x. Modification of original located at https://goo.gl/U8SnMV
<?xml version="1.0" encoding="UTF-8"?>
<modification>
<id>Remover index.php?route=common/home da Página Principal da loja</id>
<version>1.0</version>
<vqmver required="false">1.0</vqmver>
<author>Guilherme de Lima Campos</author>
<file name="catalog/view/theme/*/template/common/header.tpl">
<operation>
<search position="replace"><![CDATA[href="<?php echo $home; ?>"]]></search>
<add><![CDATA[if (!empty($_SERVER['HTTPS']) &amp;&amp; $_SERVER['HTTPS'] != 'off') {
<?php
/**
* Opencart Turbo
* Developed by Atomix
* Version: 0.1
* http://www.atomix.com.au
*
* This script will apply several changes to boost the performance of OpenCart, including:
* 1) DONE: Convert MySQL DB Storage Engine from MyISAM to InnoDB
@david-rahrer
david-rahrer / apt-preference.md
Last active January 27, 2022 17:53
Apt Preference Files
@david-rahrer
david-rahrer / nginx-misc.conf
Created October 31, 2014 06:03
Nginx config snippets
# Diffie-Hellman parameter for DHE ciphersuites, recommended 2048 bits
# Generate with: cd /etc/ssl/certs && sudo openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
ssl_dhparam /etc/nginx/ssl/dhparam.pem;
# Install dependencies
#
# * checkinstall: package the .deb
# * libpcre3, libpcre3-dev: required for HTTP rewrite module
# * zlib1g zlib1g-dbg zlib1g-dev: required for HTTP gzip module
apt-get install checkinstall libpcre3 libpcre3-dev zlib1g zlib1g-dbg zlib1g-dev && \
mkdir -p ~/sources/ && \
# Compile against OpenSSL to enable NPN