Skip to content

Instantly share code, notes, and snippets.

@ryankuykendall
ryankuykendall / collect-node-attributes.js
Last active November 18, 2020 03:42
Helper snippets for working with Element attributes and CSSOM
// Assumes selected node in Chrome Developer tools
[...$0.getAttributeNames()].map((name) => [name, $0.getAttribute(name)]);
@ahoendgen
ahoendgen / listFontInformation.js
Last active January 5, 2020 05:27 — forked from macbookandrew/findStyles.js
JS - List unique font information of all DOM elements
/**
* List unique font information of all DOM elements
* Based on the awesome code from AndrewRMinion
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a URL of the base code}
*
* @see {@link https://gist.github.com/ahoendgen/ebcabb595cc8465e4688275311a5c009/ URL for this file}
*
* @author AndrewRMinion Design (https://andrewrminion.com)
* @author André Hoendgen (https://andre-hoendgen.de)
* @version 1.1
@jrosell
jrosell / TwitterPowerQuery.pbi
Created December 11, 2017 13:27
This Power Query script gets an bearer token and performs a tweet search from the Twitter REST API
/*
Author: https://chris.koester.io/index.php/2015/07/16/get-data-from-twitter-api-with-power-query/
Twitter REST API
https://dev.twitter.com/oauth/application-only
Requires establishing a Twitter application in order to obtain a Consumer Key & Consumer Secret
https://apps.twitter.com/
IMPORTANT - The Consumer Key and Consumer secret should be treated as passwords and not distributed
*/
let
@macbookandrew
macbookandrew / findStyles.js
Last active March 30, 2024 15:24
List unique CSS properties for all DOM elements
/**
* List unique CSS properties for all DOM elements
* Initially created to list unique font stacks on a page
* @see {@link http://stackoverflow.com/a/35022690/ Inspired by this StackOverflow answer}
*
* @see {@link https://gist.github.com/macbookandrew/f33dbbc0aa582d0515919dc5fb95c00a/ URL for this file}
*
* @author AndrewRMinion Design (https://andrewrminion.com)
* @version 1.1
*
@oaeide
oaeide / mountVHD.bat
Last active May 9, 2023 12:35
Script for mounting and unmounting VHD files in windows via send to menu
@ECHO OFF
TITLE Mount VHD
SETLOCAL
SET DiskPartScript="%TEMP%DiskpartScript.txt"
ECHO SELECT VDISK FILE="%~1" > %DiskPartScript%
ECHO ATTACH VDISK >> %DiskPartScript%
@don1138
don1138 / font-stacks.css
Last active May 14, 2024 13:16
CSS Modern Font Stacks
/* Modern Font Stacks */
/* System */
font-family: system, -apple-system, ".SFNSText-Regular", "San Francisco", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif;
/* System (Bootstrap 5.2.0) */
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;