Skip to content

Instantly share code, notes, and snippets.

View oneblackcrayon's full-sized avatar

Frederick Polk oneblackcrayon

View GitHub Profile
/* 見出し全体
------------------------------*/
h2,
h3,
h4,
h5,
h6 {
}
@onlurking
onlurking / Design Systems 101 Syllabus.md
Created September 8, 2020 18:06
Design Systems 101 Syllabus

Design Systems 101 Syllabus

A 10-week course about design systems from SuperFriendly

Week 1: Introduction to Design Systems

Discussion

  • Introductions
@kingkool68
kingkool68 / use-remote-media.php
Last active January 20, 2026 17:37
Check if a local file exists in the WordPress media library and if it doesn't exist, replace the URL with a different URL. Helpful when working with a local site that doesn't have all of the media downloaded as the production site. See https://localwp.com/community/t/proxying-requests-to-wp-content-uploads-to-a-production-site/15701
<?php
// Put this in wp-config.php and replace https://example.com/ with the URL of the production site.
define( 'RH_USE_REMOTE_MEDIA_URL', 'https://example.com/' );
// Put the rest of this in functions.php or a custom plugin or somewhere else.
if ( defined( 'RH_USE_REMOTE_MEDIA_URL' ) && ! empty( RH_USE_REMOTE_MEDIA_URL ) ) {
add_filter( 'wp_get_attachment_image_src', 'filter_wp_get_attachment_image_src' );
add_filter( 'wp_calculate_image_srcset', 'filter_wp_calculate_image_srcset' );
add_filter( 'wp_get_attachment_url', 'filter_wp_get_attachment_url' );
}
@joevt
joevt / pcitree.sh
Last active January 21, 2025 08:50
A bash script to produce more informative output than lspci -nntv
#!/bin/bash
# by joevt Feb 6, 2024
# Jan 22, 2023 - Updated to work in Mac OS X 10.4.
# Jan 30, 2023 - Fixed the method options.
# Apr 7, 2023 - Fixed parse of unknown prog-if and move temp files to separate tmp directory.
# Feb 6, 2024 - Fix column alignment.
#===================
if [[ $EUID -ne 0 ]]; then
@Tommy-b
Tommy-b / GRAVITY FORMS WITH SWUP - BARBA PAGE TRANSITIONS
Last active May 10, 2024 13:59
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload
This allows your gravity forms to load via ajax to ensure they work correctly with page transitions that have no window/document.onload
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active June 11, 2026 21:16
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@rdswd
rdswd / functions.php
Last active January 3, 2022 03:17
Example of functions.php
<?php
/**
* Interplay Design functions and definitions
*
* @link https://developer.wordpress.org/themes/basics/theme-functions/
*
* @package Interplay_Design
*/
if ( ! function_exists( 'int_design_31_setup' ) ) :
<?php
/**
* Search & Filter Pro
*
* Sample Results Template
*
* @package Search_Filter
* @author Ross Morsali
* @link https://searchandfilter.com
* @copyright 2018 Search & Filter
@hluker
hluker / gcsfuse.md
Last active October 13, 2022 01:40
Google Cloud Storage and WordPress

We're assuming here that both your Storage bucket and virtual machine are BOTH hosted in GCP

Make sure that your uploads directory is EMPTY

You can usually change the owner of the folder to root to prevent WordPress's pesky folder creation

create a cloud bucket

  1. Visit Google Cloud Storage
  2. Create bucket