Skip to content

Instantly share code, notes, and snippets.

// modified from code of "JQuerify" bookmarklet
// http://www.learningjquery.com/2009/04/better-stronger-safer-jquerify-bookmarklet
(function() {
function z(a, b) {
var c = document.createElement("script");
c.src = a;
var d = document.getElementsByTagName("head")[0], e = !1;
c.onload = c.onreadystatechange = function() {
!e && (!this.readyState || this.readyState === "loaded" || this.readyState === "complete") && (e = !0, b(), c.onload = c.onreadystatechange = null, d.removeChild(c));
};
@06b
06b / MinimalAPIs.md
Created April 7, 2023 14:23 — forked from davidfowl/MinimalAPIs.md
Minimal APIs at a glance
@06b
06b / SoftHyphenHelperExtensions.cs
Created February 21, 2022 18:53
Extension method for adding soft hyphens.
using System;
using System.Text;
namespace Typography.Extensions
{
/// <summary>
/// Contains extension methods for adding soft hyphens.
/// </summary>
public class SoftHyphenHelperExtensions
@06b
06b / decreased-line-height-calculation.css
Created December 10, 2020 19:12
How to calculate a decreased line-height for wrapped headlines when using a typographic scale.
:root {
--phi: 1.618033988749895;
--perfect-fourth: calc(4/3);
}
html {
line-height: 1.5;
line-height: var(--phi);
}
@06b
06b / high-dpi-media.css
Created August 6, 2019 17:45 — forked from marcedwards/high-dpi-media.css
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */
@06b
06b / example.md
Created January 13, 2019 18:17 — forked from ericclemmons/example.md
HTML5 <details> in GitHub

Using <details> in GitHub

Suppose you're opening an issue and there's a lot noisey logs that may be useful.

Rather than wrecking readability, wrap it in a <details> tag!

<details>
 <summary>Summary Goes Here</summary>
@06b
06b / links.md
Created January 13, 2019 01:27 — forked from una/links.md
a-css-carol--links
@06b
06b / gdpr_template.md
Created November 29, 2018 05:26 — forked from vanjacosic/gdpr_template.md
GDPR email template

Email template for requesting data deletion

To:

Their Data Protection Officer, usually [email protected]

Subject:

Request for erasure (GDPR)

@06b
06b / font-exist.js
Created November 25, 2018 03:46
Call this function and pass in the name of the font you want to check for availability. - https://www.kirupa.com/html5/detect_whether_font_is_installed.htm
//
// Call this function and pass in the name of the font you want to check for availability. - https://www.kirupa.com/html5/detect_whether_font_is_installed.htm
//
function doesFontExist(fontName) {
// creating our in-memory Canvas element where the magic happens
var canvas = document.createElement("canvas");
var context = canvas.getContext("2d");
// the text whose final pixel size I want to measure
var text = "abcdefghijklmnopqrstuvwxyz0123456789";
//---------------------------------------------------------------------------
/**
* ReinventTheWheel
*/
//---------------------------------------------------------------------------
// private ReinventTheWheel(): void
// {
// const html = document.documentElement;