Skip to content

Instantly share code, notes, and snippets.

View skydogtech's full-sized avatar

skydogtech skydogtech

  • Boston, MA
View GitHub Profile
/**
* A bookmarklet for viewing the largest contentful paint in a page.
* Will show each LCP after the bookmarklet is clicked.
*
* To install:
* 1. Copy the code starting from the line beginning `javascript:`
* 2. Add a new bookmark in Chrome, and paste the code in as the URL.
**/
javascript:(function(){
try {
@stereokai
stereokai / index.css
Created June 18, 2017 11:03
Trigonometry in CSS
//----------------------------------*\
// TRIGONOMETRY FUNCTIONS
//----------------------------------*/
// # Trigonometry in CSS
//
// - Through Taylor/Maclaurin polynomial representation: http://people.math.sc.edu/girardi/m142/handouts/10sTaylorPolySeries.pdf
// - Useful if you don't want to use JS.
// - With CSS Variables.
// - `calc()` can't do power (x ^ y) so I used multiplication instead.
@iksi
iksi / fluid-typography.css
Created January 14, 2016 11:45
Fluid typography between a min & max font-size and molten leading
/**
* Fluid typography between a min & max font-size and molten leading
* calc(minSize + (maxSize - minSize) * ((100vw - minPort) / (maxPort - minPort)));
*/
:root {
font-size: 100%;
}
body {
font-size: 1em;
@sunriseweb
sunriseweb / Genesis-page_archive.php-Menu-based-Site-Map
Last active February 26, 2018 17:53
Genesis page_archive.php template for creating Site Map that contains all Menus instead of Page (i.e. get all menus using wp_get_nav_menus and steps through to display each using wp_nav_menu).
<?php
/**
* Template Name: Menu-based Site Map
* This file creates a site map based on existing menus instead of using wp_list_pages.
*
* This file is based on the core Genesis file of the same name.
*
* @category Page Template
* @package Templates
* @author Brad Trivers
@rozmiarek
rozmiarek / css: overflow hidden alternative
Created July 10, 2010 21:38
css: overflow hidden alternative
.elementWithFloatedChilds { height: 1%; }
.elementWithFloatedChilds:after {
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}