Skip to content

Instantly share code, notes, and snippets.


Alex Mustin alexmustin

View GitHub Profile
View background-video.css
/* ---------- 6.1 Hero Video ---------- */
.home .page-header {
padding: 24rem 0 7rem;
height: 75vh;
overflow: hidden;
#bgvid {
position: absolute;
top: 0;
left: 0;
nickcernis / add-editor-layout-classes.js
Last active Feb 20, 2020
Add Genesis layout class to Gutenberg editor pages (admin)
View add-editor-layout-classes.js
// Add genesis layout classes to the Block Editor.
// File lives in the theme's /js/ folder.
wp.domReady(function () {
var layouts = document.querySelector(".genesis-layout-selector");
if( layouts ) {
layouts.addEventListener("input", function (e) {
zgordon / registerblock-custom-icon-gutenberg.js
Last active Jan 2, 2022
Example for how to create use a custom SVG icon for a block in Gutenberg
View registerblock-custom-icon-gutenberg.js
// Import __ from i18n internationalization library
const { __ } = wp.i18n;
// Import registerBlockType() from block building libary
const { registerBlockType } = wp.blocks;
// Import the element creator function (React abstraction layer)
const el = wp.element.createElement;
* Example of a custom SVG path taken from fontastic
lukechilds /
Created Aug 9, 2016
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
TangRufus / settings-api-tabs-demo.php
Created Jul 26, 2014
Adding Tabs with Settings API
View settings-api-tabs-demo.php
* Plugin Name: Settings API Tabs Demo
* Plugin URI:
* Description: This is a demo showing off usage of tabs with the WordPress Settings API
* Version: 1.0
* Author: kovshenin
* Author URI:
* License: GPL2
hlashbrooke / class.php
Created Feb 28, 2014
A complete, versatile options page class for any WordPress plugin
View class.php
if ( ! defined( 'ABSPATH' ) ) exit;
class WordPress_Plugin_Template_Settings {
private $dir;
private $file;
private $assets_dir;
private $assets_url;
private $settings_base;
malarkey / Contract Killer
Last active Jun 23, 2022
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008