Skip to content

Instantly share code, notes, and snippets.

View kellymears's full-sized avatar

Kelly Mears kellymears

View GitHub Profile
@jdolitsky
jdolitsky / octant-plugin-dev.sh
Last active November 16, 2019 23:31
Script to help with Octant plugin development. Watches .go files, rebuilds plugin, and automatically restarts Octant server. Requires fswatch.
#!/usr/bin/env bash
set -euo pipefail
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "${DIR}"
REQUIRED_SYSTEM_COMMANDS=(
"go"
"octant"
"fswatch"
@kellenmace
kellenmace / gutenberg-graphql-schema.txt
Created September 20, 2019 17:37
WordPress Gutenberg GraphQL Schema Definitions
type CoreArchivesBlock implements Block {
attributes: CoreArchivesBlockAttributes
name: String!
innerBlocks: [Block]!
isValid: Boolean!
originalContent: String!
parentId: Int
parent: PostObjectTypesUnion
renderedContent: String!
}
@joshuafredrickson
joshuafredrickson / no-nags.php
Created January 29, 2019 14:46
WordPress: Move all admin notices and plugin nags to console
add_action('plugins_loaded', function() {
$action = is_user_admin() ? 'user_admin_notices' : 'admin_notices';
add_action($action, function () {
ob_start();
});
add_action('all_admin_notices', function () {
$log = strip_tags(trim(ob_get_clean()));
@davewarfel
davewarfel / default-wordpress-blocks-sass.scss
Last active November 8, 2023 11:31
WordPress Blocks Styles - Cleaned Up, Commented & Sassified
/**
* WordPress Blocks
*
* Default block styling included with WordPress core.
* Provides a better starting point for WordPress theme developers,
* especially when using Sass.
*
* @link https://github.com/WordPress/WordPress/blob/master/wp-includes/css/dist/block-library/style.css
*
* Most styles from the above file are included.
@runofthemill
runofthemill / NoVNC_Paste.js
Created November 13, 2018 02:04 — forked from byjg/NoVNC_Paste.js
How to Paste code to NoVNC.
// This will open up a prompt for text to send to a console session on digital ocean
// Useful for long passwords
(function () {
window.sendString = function (str) {
f(str.split(""));
function f(t) {
var character = t.shift();
var i=[];
var code = character.charCodeAt();
var needs_shift = character.match(/[a-z!@#$%^&*()_+{}:\"<>?~|]/);
@webmandesign
webmandesign / gutenberg-wide-alignement-wrapper.php
Last active September 9, 2020 17:14
Wrapping aligned Gutenberg blocks with additional div on a WordPress website front-end.
<?php
// IMPORTANT UPDATE 20190307:
// Since WordPress 5.0.0 we can actually use much simpler solution:
/**
* Applies wrapper div around aligned blocks.
*
* Copy this function into your WordPress theme's `functions.php` file
* and change the `themeprefix` accordingly.
h scroll left
j scroll down
k scroll up
l scroll right
gg scroll to top of the page
G scroll to bottom of the page
f activate link hints mode to open in current tab
F activate link hints mode to open in new tab
r reload
@smutek
smutek / Bootstrap4Nav-Sage9.md
Last active July 30, 2022 06:50
Bootstrap 4 Walker for Sage 9

Credit

This is a frankensteind version of the current Soil nav walker, by the Roots team, and Michael Remoero's Sagextras walker. All credit goes to those good folks. :)

Use

  • Replace the contents of header.blade.php with the attached header.
  • Copy the walker.php file to the /app directory.
  • Add walker.php to the Sage required files array in resources/functions.php - eg. on a stock Sage install the entry would look like:
/**
@ryanleesipes
ryanleesipes / ryan76sig.html
Created April 19, 2017 22:15
Email Signature
<table style="font-size: 14px; text-align: left; margin: 3em 0; color: black; border: none;" border="0" cellpadding="0" cellspacing="0"><tr><td rowspan="3" valign="middle" style="vertical-align: middle;"><a href="https://system76.com" style="text-decoration: none; margin-right: 1em;"><img src="https://system76.com/images/icon-64.png" height="64" width="64" alt="System76 |" /></a></td><td style="font-family: 'Roboto Slab', serif; font-size: 24px; font-weight: 300;">Ryan Sipes</td></tr><tr><td style="font-family: 'Fira Sans', sans-serif;"><strong>COMMUNITY MANAGER</strong></td></tr><tr><td style="font-family: 'Fira Sans', sans-serif; font-weight: 300;"><a href="mailto:ryan@system76.com" style="color: black; text-decoration: none;">RYAN@SYSTEM76.COM</a></td></tr>
</table>