Skip to content

Instantly share code, notes, and snippets.

View minott's full-sized avatar

Leo Minott minott

  • LMNTT™
View GitHub Profile
@DATABASE@__%Y-%m-%d_%H-%M-%S
@minott
minott / MailinatorAliases
Created April 23, 2020 00:57 — forked from nocturnalgeek/MailinatorAliases
A list of alternate domains that point to @mailinator.com
@binkmail.com
@bobmail.info
@chammy.info
@devnullmail.com
@letthemeatspam.com
@mailinater.com
@mailinator.net
@mailinator2.com
@notmailinator.com
@reallymymail.com
@minott
minott / SQLite-PHP-quickstart.php
Created October 18, 2019 10:30 — forked from bladeSk/SQLite-PHP-quickstart.php
SQLite3 PHP Quickstart Tutorial
<?php
// This file walks you through the most common features of PHP's SQLite3 API.
// The code is runnable in its entirety and results in an `analytics.sqlite` file.
// Create a new database, if the file doesn't exist and open it for reading/writing.
// The extension of the file is arbitrary.
$db = new SQLite3('analytics.sqlite', SQLITE3_OPEN_CREATE | SQLITE3_OPEN_READWRITE);
@minott
minott / namecheap SSL.md
Created November 14, 2018 08:43 — forked from Shourai/namecheap SSL.md
Letsencrypt SSL certificate with namecheap hosting

source: https://savedlog.com/uncategorized/letsencrypt-ssl-certificate-namecheap-hosting/

The “Positive SSL” certificate I bought along with my domain is invalid with any of my subdomains and cannot be used with wildcards. One annoying thing is that namecheap doesn’t offer auto installation of free let’s encrypt certificates, even though, they are saying “Namecheap is dedicated to data security and privacy for all internet users. We believe the movement to encrypt nearly all web traffic is a positive direction. As more sites embrace HTTPS and use of security products, providers of free SSL are beginning to come online.”

Let me show you what it needs to be done in order to “encrypt nearly all web traffic”.

First, not required but it’s helpful to enable ssh access, it is not enabled by default on the base hosting plans, just go an start a live chat and request ssh access.

@minott
minott / function.php
Created July 16, 2018 10:57 — forked from mattclements/function.php
Wordpress Disable Comments (add to function.php)
<?php
// Add to existing function.php file
// Disable support for comments and trackbacks in post types
function df_disable_comments_post_types_support() {
$post_types = get_post_types();
foreach ($post_types as $post_type) {
if(post_type_supports($post_type, 'comments')) {
remove_post_type_support($post_type, 'comments');
@minott
minott / Remove admin metaboxes
Created July 15, 2018 04:01 — forked from sambody/Remove admin metaboxes
WP: Remove metaboxes from posts and pages editor.
<?php
/* Remove metaboxes for POSTS - uncomment to activate
*/
function remove_my_post_metaboxes() {
// under the editor
//remove_meta_box( 'authordiv','post','normal' ); // Author Metabox
//remove_meta_box( 'commentstatusdiv','post','normal' ); // Comments Status Metabox
//remove_meta_box( 'commentsdiv','post','normal' ); // Comments Metabox
remove_meta_box( 'postcustom','post','normal' ); // Custom Fields Metabox
//remove_meta_box( 'postexcerpt','post','normal' ); // Excerpt Metabox
@minott
minott / wp-db-reset-users-metabox-locations.sql
Created July 13, 2018 21:57 — forked from nathanieltubb/wp-db-reset-users-metabox-locations.sql
WordPress Database Reset All Users' Metabox Locations
-- Reset all users' metabox placement. This is useful when changing location of existing ACF field groups.
-- Run these separately, and replace the table prefix and meta_keys with your own.
-- Search for current metabox values:
SELECT *
FROM wp_usermeta
WHERE meta_key
LIKE 'meta%'
-- Look for the meta-box-order_[post_type_slug] and metaboxhidden_[post_type_slug] keys.
-- Run the reset on the necessary rows based on the post type you are targeting.
@minott
minott / meta-tags.md
Last active February 15, 2017 05:59 — forked from kevinSuttle/meta-tags.md
List of Usable HTML Meta and Link Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset="UTF-8">
<meta name="keywords" content="your, tags">
<meta name="description" content="150 words">
<meta name="subject" content="your website's subject">
<meta name="copyright" content="company name">
@minott
minott / boiler
Last active August 29, 2015 14:22
JavaScript boilerplate
(function () {
'use strict';
}());