Skip to content

Instantly share code, notes, and snippets.

@mishterk
mishterk / 0_reuse_code.js
Created July 9, 2014 01:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mishterk
mishterk / dabblet.css
Last active August 29, 2015 14:13
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@mishterk
mishterk / dabblet.css
Created January 13, 2015 03:45
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
min-height: 100%;
@mishterk
mishterk / basic-custom-module-recipe.php
Last active November 26, 2016 06:06
Divi hacks, mods, fixes, etc
<?php
add_action( 'et_builder_ready', function () {
class MyCustomModule extends ET_Builder_Module {
function init()
@mishterk
mishterk / interpolation-example.php
Last active January 30, 2017 05:25
A quick example of interpolation in PHP (for Ben)...
<?php
// Quick PHP interpolation example...
class Person {
public $name = '';
public function getName()
{
@mishterk
mishterk / class-disable-comments.php
Last active July 1, 2020 11:23
A static class that basically removes all (I think) comment related functionality in WordPress
<?php
namespace PhilKurth\WP\Tools;
@mishterk
mishterk / implementation.php
Created March 7, 2017 04:34
Simple examples of static class methods and name-spaced functions
<?php
include 'utility-class.php';
include 'utility-functions.php';
// using a static class method
$processed = UtilityClass::methodOne( 'some data' );
@mishterk
mishterk / generated-style.css
Last active September 29, 2017 02:55
BEM style example
.Post{}
.Post__title{}
.Post__content{}
.Post--is-highlighted .Post__title{} // now we are using the cascade to override styling when that block is at a particular state
@mishterk
mishterk / book-cpt-test.json
Created January 14, 2018 07:04
Some test data. Throw the CPT registration in functions.php
{
"name": "books",
"relationship": {
"type": "post",
"post_type": "book"
},
"columns": [
{
"name": "author",
"acf_field_name": "author"
@mishterk
mishterk / MagnificPopupModal.vue
Last active December 16, 2021 13:15
Magnific Popup component for VueJS. Modified version of https://gist.github.com/antixrist/11f7d78fe680eb3bc15203a940b6b4f8
<template>
<div class="Modal mfp-hide" ref="modal">
<div class="Modal__inner">
<slot></slot>
</div>
</div>
</template>