Skip to content

Instantly share code, notes, and snippets.

View jdsteinbach's full-sized avatar
💭
💻

James Steinbach jdsteinbach

💭
💻
View GitHub Profile
@jdsteinbach
jdsteinbach / Subsetting.md
Created May 8, 2020 19:32
Case Studies in Font Subsetting

Case Studies in Font Subsetting

Initial Files Provided

iA Writer provided variable fonts as 2 ttfs (Upright and Italic), each ~150kb.

Note: iA Writer provided static fonts as woff2 (Regular, Italic, Bold, Bold Italic) around 45kb each. Unfortunately this can skew people's initial performance reaction away from variable fonts.

@jdsteinbach
jdsteinbach / machine.js
Last active May 1, 2020 17:05
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@jdsteinbach
jdsteinbach / .htaccess
Last active November 7, 2019 03:45
Decent htaccess (WP)
# BEGIN WordPress Security + Performance
# ############################################################
# # SECURITY #
# ############################################################
# ----------------------------------------------------------------------
# | File access |
# ----------------------------------------------------------------------
# Block access to directories without a default document.
@jdsteinbach
jdsteinbach / SimplifiedTwitter.css
Last active September 24, 2018 18:34
Simplified Twitter Styles
.ProfileSidebar,
.timeline-tweet-box,
.topbar h1,
#global-actions .text,
.moments.js-moments-tab,
.dashboard.dashboard-right,
.dashboard.dashboard-left {
display: none !important;
}
.content-main {
@jdsteinbach
jdsteinbach / init.coffee
Created April 24, 2018 15:22 — forked from bfillmer/init.coffee
Forked Atom Settings from @bfillmer
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@jdsteinbach
jdsteinbach / Readme.md
Last active April 17, 2017 16:54
Fix WooCommerce database update error related to missing `mysql_*` functions

Fix WooCommerce's updater

Quick Intro

If you've just updated to WooCommerce 3.0.* and the database updater fails (the whole page threw a 500 error for me), drop the mysql-escape-string-fix.php file into your /wp-content/mu-plugins/ directory and give it a try.

More Info

I got the following error in my debug.log when this update failed:

@jdsteinbach
jdsteinbach / Talks.md
Last active June 21, 2016 22:18
ScotlandJS & ScotlandCSS Talks
@jdsteinbach
jdsteinbach / itermProfile.json
Last active August 31, 2021 20:17
My .oh-my-zsh theme
{
"Ansi 6 Color" : {
"Red Component" : 0.30980393290519714,
"Color Space" : "Calibrated",
"Blue Component" : 0.9686274528503418,
"Alpha Component" : 1,
"Green Component" : 0.76470589637756348
},
"Ansi 12 Color" : {
"Red Component" : 0.26666668057441711,
@jdsteinbach
jdsteinbach / SassMeister-input-HTML.html
Last active February 24, 2016 15:58
Generated by SassMeister.com.
<h1>Top Tier Title</h1>
<h2>2nd Tier Title</h2>
<h3>3rd Tier Title</h3>
<h3>3rd Tier Title</h3>
<h3>3rd Tier Title</h3>
<h2>2nd Tier Title</h2>
<h3>3rd Tier Title</h3>
<h3>3rd Tier Title</h3>
<h3>3rd Tier Title</h3>
<h2>2nd Tier Title</h2>
@jdsteinbach
jdsteinbach / SassMeister-input-HTML.html
Created February 15, 2016 23:02
Generated by SassMeister.com.
<div class="parent">
<h4 class="title">Title</h4>
<div class="child">Child</div>
<div class="child">Child</div>
<div class="child">Child</div>
<div class="child">Child</div>
<div class="child">Child</div>
<div class="child">Child</div>
</div>