Skip to content

Instantly share code, notes, and snippets.

View erunyon's full-sized avatar

Erik Runyon erunyon

View GitHub Profile
@tkadlec
tkadlec / perf-diagnostics.css
Last active June 8, 2023 17:47
CSS used to highlight potential performance issues
:root {
--violation-color: red; /* used for clear issues */
--warning-color: orange; /* used for potential issues we should look into */
}
/* IMAGES */
/*
* Lazy-Loaded Images Check
* ====
@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
// Vanilla version of FitVids
// Still licencened under WTFPL
//
// Not as robust and fault tolerant as the jQuery version.
// It's BYOCSS.
// And also, I don't support this at all whatsoever.
;(function(window, document, undefined) {
'use strict';
@ethicka
ethicka / localhost-ssl.md
Last active April 12, 2024 12:26 — forked from jonathantneal/README.md
Local virtualhost SSL websites on Mac OS Sierra

Local virtualhost SSL websites on Mac OS Sierra

These instructions will guide you through the process of setting up a wildcard SSL for your local virtualhosts for offline development. Most importantly, this configuration will give you the happy, green lock in Chrome.

These instructions have only been tested on Mac OS Sierra using the pre-installed Apache and PHP versions. These instructions also assume you have virtualhosts set up locally already.


Configuring SSL

@paulirish
paulirish / what-forces-layout.md
Last active April 24, 2024 12:47
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@orderedlist
orderedlist / .gitconfig
Created June 23, 2015 17:54
Alases for .gitconfig
[alias]
unstage = reset HEAD --
undo = reset --soft HEAD~1
drop-old-stashes = reflog expire --expire=30.days refs/stash
up = pull --rebase --prune
@jklein
jklein / Vagrantfile
Last active September 19, 2018 10:18
Vagrant file for a private WebPagetest instance
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
# please see the online documentation at vagrantup.com.
@elefontpress
elefontpress / gist:6159651
Last active April 16, 2023 02:58
This is the contract Bearded uses for client work on a time and materials basis. It's worked for us, but I am not a lawyer, so please run it by yours before you use it! Regardless, do whatever you like with it. Use it, share it, change it ... go nuts. Our original contract from 2008 was for fixed-price projects and was based on Andy Clark'e Cont…

Bearded's Hourly Contract

Date: [[Date of Document]] Between [Our Company] and [Your Company]

Summary

We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.

@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

@luetkemj
luetkemj / wp-query-ref.php
Last active April 25, 2024 09:37
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/