Skip to content

Instantly share code, notes, and snippets.

View 4briang's full-sized avatar

Brian Gerry 4briang

View GitHub Profile
@DavidKuennen
DavidKuennen / minimal-analytics-snippet.js
Last active March 22, 2026 15:24
Minimal Analytics Snippet
(function (context, trackingId, options) {
const history = context.history;
const doc = document;
const nav = navigator || {};
const storage = localStorage;
const encode = encodeURIComponent;
const pushState = history.pushState;
const typeException = 'exception';
const generateId = () => Math.random().toString(36);
const getId = () => {
@quinnnorton
quinnnorton / Marriage.md
Last active September 15, 2020 04:29
Marriage

Marriage Agreement

English

In this marriage we seek to mingle the project of our lives.

Our relationship is one of companionship, shared resources, comfort, encouragement, and pleasure. We laugh with, and look after, each other. We share our courage, and our grief. We protect each other, but we push each other as well. We choose this because we believe we can go further together and grow more as humans than we can alone.

What keeps us together is language. We talk to each other, we never let stuff disappear, never sweep difficult topics under the carpet. Our commitment is to talk about the things we feel like we can't talk about, to push through fearful times and be present for one another. We will always still be getting to know each other, and sharing our respective evolving views of the world. We will seek to listen and learn from each other.

@mattclements
mattclements / function.php
Last active February 16, 2026 07:12
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@mkrdip
mkrdip / remove-gf-divi.php
Last active January 13, 2021 13:32
Remove Google Fonts from Divi
<?php
function wpse_dequeue_google_fonts() {
wp_dequeue_style( 'divi-fonts' );
}
add_action( 'wp_enqueue_scripts', 'wpse_dequeue_google_fonts', 20 );
@renventura
renventura / remove-divi-project-post-type.php
Last active January 30, 2025 20:28
Remove the Projects Post Type from Divi by Elegant Themes
<?php //* Mind this opening php tag
/**
* This will hide the Divi "Project" post type.
* Thanks to georgiee (https://gist.github.com/EngageWP/062edef103469b1177bc#gistcomment-1801080) for his improved solution.
*/
add_filter( 'et_project_posttype_args', 'mytheme_et_project_posttype_args', 10, 1 );
function mytheme_et_project_posttype_args( $args ) {
return array_merge( $args, array(
'public' => false,