Skip to content

Instantly share code, notes, and snippets.

View cbirdsong's full-sized avatar

Cory Birdsong cbirdsong

View GitHub Profile
@cbirdsong
cbirdsong / input.scss
Created January 31, 2023 19:19
Generated by SassMeister.com.
$font-sizes: (
"xs": [0.89em, clamp(0.89em, calc(0.87em + 0.07vw), 0.96em)],
"sm": [1.00em, clamp(1.00em, calc(0.96em + 0.20vw), 1.20em)],
"md": [1.13em, clamp(1.13em, calc(1.05em + 0.38vw), 1.50em)],
"lg": [1.27em, clamp(1.27em, calc(1.14em + 0.61vw), 1.88em)],
"h6": [1.42em, clamp(1.42em, calc(1.24em + 0.92vw), 2.34em)],
"h5": [1.60em, clamp(1.60em, calc(1.34em + 1.33vw), 2.93em)],
"h4": [1.80em, clamp(1.80em, calc(1.43em + 1.86vw), 3.66em)],
"h3": [2.03em, clamp(2.03em, calc(1.52em + 2.55vw), 4.58em)],
"h2": [2.28em, clamp(2.28em, calc(1.59em + 3.44vw), 5.72em)],
@cbirdsong
cbirdsong / _ blocks.scss
Last active August 18, 2021 11:27
Block editor styling strategy
.block-accordion {
// Generic styles
@if ($is-editor == true) {
// Styles you need for editing, like opening this accordion so you can access the content
}
@if ($is-editor == false) {
// Or maybe some other styles that disagree with the editor for whatever reason
}
}
@cbirdsong
cbirdsong / remove-gravity-forms-css.php
Created August 12, 2021 13:25
Remove some/all gravity forms CSS
<?php
function gravity_forms_remove_theme_css()
{
// remove Gravity Forms CSS
// wp_dequeue_style('gforms_reset_css');
// wp_dequeue_style('gforms_datepicker_css'); // Ugly datepicker > broken illegible datepicker
// wp_dequeue_style('gforms_formsmain_css');
wp_dequeue_style('gform_theme');
wp_dequeue_style('gform_theme_ie11');
@cbirdsong
cbirdsong / disable-comments.php
Last active December 1, 2020 19:52
Disable Wordpress comments
<?php
namespace DisableComments;
// Removes from sidebar
function remove_sidebar_link()
{
remove_menu_page('edit-comments.php');
}
add_action('admin_menu', __NAMESPACE__ . '\remove_sidebar_link', 9999);
@cbirdsong
cbirdsong / Switch to Dark Theme.xml
Last active July 12, 2020 19:24
Windows 10 automated light/dark mode switcher
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.2" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
<RegistrationInfo>
<Date>2020-07-12T08:40:51.370892</Date>
<Author>CORY-PC\cory</Author>
<URI>\Switch to Dark Theme</URI>
</RegistrationInfo>
<Triggers>
<CalendarTrigger>
<StartBoundary>2020-07-12T20:00:00</StartBoundary>
@cbirdsong
cbirdsong / bitium-export.py
Last active July 5, 2017 14:01
Bitium export to CSV/1Password
#!/usr/bin/env python3
import os, sys, stat, string
import json
import csv
import requests
# global utility variables
bitium_api_url = 'https://www.bitium.com/api/v2/organizations/'
current_directory = os.path.dirname(sys.argv[0])