Skip to content

Instantly share code, notes, and snippets.

View thesandybridge's full-sized avatar
🇺🇸
The things you think about determine the quality of your mind.

Matt thesandybridge

🇺🇸
The things you think about determine the quality of your mind.
View GitHub Profile
<?php
/**
* @package GrafikBasePlugin
*/
namespace Lib\Services\Components;
use Lib\Services\ServicesBase;
use Lib\Services\Service;
@thesandybridge
thesandybridge / accordion.js
Last active December 9, 2022 21:45
Code Examples
import { useBlockProps, InnerBlocks, RichText, useInnerBlocksProps } from '@wordpress/block-editor'
import { useState, useEffect } from 'react'
import { select, useDispatch, useSelect } from '@wordpress/data'
import { usePrevious } from '@wordpress/compose'
import {
createBlock,
} from '@wordpress/blocks';
import { Tooltip, Icon } from '@wordpress/components'
import { __ } from '@wordpress/i18n'
import './editor.scss'
/*****************************************
* Hamburger Menu with Drawer
*****************************************
/
/**
* Initiates the header hamburger menu.
*/
const hamburgerMenu = () => {
const menu = document.querySelector('#hamburger-menu')
@thesandybridge
thesandybridge / scroll-pos.js
Last active April 7, 2022 16:29
vertical scroll position
/**
* Returns a number between 0 and 100 relative to scroll position.
*
* If target scroll container has top and bottom margins, results may be different
* than expected.
* @param {*} scrollContainer target scroll container, default is document.body.
* @returns number between 0 & 100.
*/
function getVerticalScrollPercentage( scrollContainer = document.body ){
const p = scrollContainer.parentNode;
@thesandybridge
thesandybridge / defaults.md
Last active November 11, 2021 04:14
linux-defaults

Common Problems/Fixes

Common CLI Tools

timeshift: take snapshots of system and can perform system recovery.

ncdu: drive capacity analysis, easily identify which directories are using the most space.

htop: CLI system monitor highly configurable.