This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Replace "octocat" with you, or the user you're creeping. | |
export GIST_GITHUB_USERNAME="octocat"; | |
export GIST_GITHUB_PAGE="1"; | |
curl https://api.github.com/users/$GIST_GITHUB_USERNAME/repos\?sort\=created\&direction\=desc\&page\=$GIST_GITHUB_PAGE | jq '.[].html_url' | |
# Other properties of relevance: | |
# html_url description license.url | |
# Given username = tinacious | |
# curl https://api.github.com/users/tinacious/repos | jq .[].full_name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"env": { | |
"node": true, | |
"es2020": true | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"plugin:@typescript-eslint/recommended" | |
], | |
"parser": "@typescript-eslint/parser", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*! normalize.css v2.1.3 | MIT License | git.io/normalize */ | |
article, aside, details, figcaption, figure, footer, header, hgroup, main, nav, section, summary { display: block; } | |
audio, canvas, video { display: inline-block; } | |
audio:not([controls]) { display: none; height: 0; } | |
[hidden], template { display: none; } | |
html { font-family: sans-serif; -ms-text-size-adjust: 100%; -webkit-text-size-adjust: 100%; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show price per quantity | |
* If the price per unit is greater than the average, it displays in red. | |
* Example: https://i.imgur.com/dvu0o4c.png | |
* Usage: | |
* 1. Copy the code | |
* 2. In an existing bookmark in Chrome, type `javascript:` (omit the surrounding ticks) | |
* 3. Paste the contents of this code after `javascript:` | |
*/ | |
(() => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 1. Download file and put somewhere | |
* | |
* 2. In your ~/.bash_profile: | |
* | |
* alias version="node /path/to/version_bump.js" | |
* | |
* 3. From a JS project: | |
* | |
* version <type> major (M) | minor (m) | patch (p) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* When on Instagram web, after clicking the image, a modal pops up. | |
* Running this when the modal is open will work to grab the photo, | |
* which will be the last photo in the DOM. | |
* If you get to an IG photo page and the modal is not open, this won't work. | |
* To use as a bookmarklet, copy this code, create a new bookmark, & paste it after: | |
* javascript: | |
*/ | |
(function () { | |
const images = document.querySelectorAll('img'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adds accessibility tool tota11y to the page | |
*/ | |
(function () { | |
var totally = document.createElement('script'); | |
totally.src = 'https://cdn.rawgit.com/Khan/tota11y/0.1.3/build/tota11y.min.js'; | |
document.head.appendChild(totally); | |
})(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prompts the user for a width value in pixels and then | |
* finds all DOM elements greater than the provided width | |
*/ | |
(function () { | |
const desiredWidth = Number(prompt('Wider than what? (px)')); | |
document.body.querySelectorAll('*') | |
.forEach((item) => { | |
var width = item.offsetWidth; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show background colours and borders for all elements | |
*/ | |
(function () { | |
const Outline = { | |
id: 'td-outline-toggle', | |
getStyleElement: () => { | |
const styleElement = document.createElement('style'); | |
styleElement.id = Outline.id; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Show bootstrap grid | |
*/ | |
(function () { | |
const Grid = { | |
id: 'td-bootstrap-grid-toggle', | |
show: () => { | |
const containerWrapperElement = document.createElement('div'); |