Skip to content

Instantly share code, notes, and snippets.

Benji Bilheimer benjibee

Block or report user

Report or block benjibee

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Block.php
namespace YourPlugin\Blocks;
abstract class Block{
* Block title
* @var string
tylerlwsmith / cpt-example.php
Last active Sep 30, 2019
Custom Post Rewrites for Josh
View cpt-example.php
Plugin Name: Example Custom Post Types
Plugin URI:
Description: Adds custom post types and taxonomies.
Version: 1.0.0
Author: Tyler Smith
Author URI:
License: GPL2
croxton / Generate ssl certificates with Subject Alt Names

Generate ssl certificates with Subject Alt Names on OSX

Open ssl.conf in a text editor.

Edit the domain(s) listed under the [alt_names] section so that they match the local domain name you want to use for your project, e.g.

DNS.1   =

Additional FQDNs can be added if required:

ethicka /
Last active Sep 20, 2019
WordPress Installation with the Roots/Sage Framework and VirtualHost Creation
#!/bin/bash -e
# WordPress Installation and VirtualHost Creation
# Description: Installs a WordPress website in the ~/Sites folder, creates a homepage,
# cleans up the WP install a bit, deletes the akismet and hello dolly plugins, creates the permalinks,
# clones the roots/sage theme framework to the theme folder, deletes all the other WP default themes,
# installs/runs npm and bower and runs gulp to create the initial assets, adds a custom gitignore file
# to /wp-content, installs the roots/soil plugin, creates a git repo in wp-content, saves the WordPress
nrollr /
Last active Oct 19, 2019
Enable SSL in Apache for 'localhost' (OSX, El Capitan)

Enable SSL in Apache (OSX)

The following will guide you through the process of enabling SSL on a Apache webserver

  • The instructions have been verified with OSX El Capitan (10.11.2) running Apache 2.4.16
  • The instructions assume you already have a basic Apache configuration enabled on OSX, if this is not the case feel free to consult Gist: "Enable Apache HTTP server (OSX)"

Apache SSL Configuration

Create a directory within /etc/apache2/ using sudo mkdir /etc/apache2/ssl
Next, generate two host keys:

macmladen /
Last active Apr 10, 2019
rsync exclude patterns
# /dir/ means exclude the root folder /dir
# /dir/* means get the root folder /dir but not the contents
# dir/ means exclude any folder anywhere where the name contains dir/
# Examples excluded: /dir/, /usr/share/mydir/, /var/spool/dir/
# /dir means exclude any folder anywhere where the name contains /dir
# Examples excluded: /dir/, /usr/share/directory/, /var/spool/dir/
# /var/spool/lpd//cf means skip files that start with cf within any folder within /var/spool/lpd
# include, +
# exclude, -
jjmu15 / in_viewport.js
Created Jan 27, 2014
check if element is in viewport - vanilla JS. Use by adding a “scroll” event listener to the window and then calling isInViewport().
View in_viewport.js
// Determine if an element is in the visible viewport
function isInViewport(element) {
var rect = element.getBoundingClientRect();
var html = document.documentElement;
return ( >= 0 &&
rect.left >= 0 &&
rect.bottom <= (window.innerHeight || html.clientHeight) &&
rect.right <= (window.innerWidth || html.clientWidth)
joaocunha / How To Hide The Select Arrow On
Last active Feb 25, 2019
How to hide <select> dropdown's arrow in Firefox when using "-moz-appearance: none;".
View How To Hide The Select Arrow On

This is no longer a bug. I'm keeping the gist for historical reasons, as it helped to get it fixed. Make sure to read the notes by the end of the post.

How to remove hide the select arrow in Firefox using -moz-appearance:none;

TL;DR (or, the fix)

  1. Set -moz-appearance to none. This will "reset" the styling of the element;
  2. Set text-indent to 0.01px. This will "push" the text a tiny bit[1] to the right;
charleslouis / custom-search-acf-wordpress.php
Last active Oct 17, 2019
PHP - Wordpress - Search - wordpress custom search function that encompasses ACF/advanced custom fields and taxonomies and split expression before request
View custom-search-acf-wordpress.php
* [list_searcheable_acf list all the custom fields we want to include in our search query]
* @return [array] [list of custom fields]
function list_searcheable_acf(){
$list_searcheable_acf = array("title", "sub_title", "excerpt_short", "excerpt_long", "xyz", "myACF");
return $list_searcheable_acf;
You can’t perform that action at this time.