Skip to content

Instantly share code, notes, and snippets.

View tinacious's full-sized avatar
👩‍💻

Tina Holly tinacious

👩‍💻
View GitHub Profile
@tinacious
tinacious / get_public_github_repos.sh
Last active September 2, 2022 00:35
Get all of the public repositories by name for a Github user
# 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
{
"env": {
"node": true,
"es2020": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
@tinacious
tinacious / plugin-styles.css
Created July 6, 2019 19:22
plugin-styles.css
/*! 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%; }
@tinacious
tinacious / well.ca-price-per-unit-bookmarklet.js
Created June 9, 2019 21:35
Bookmarklet for Well.ca to display price per unit of measurement
/**
* 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:`
*/
(() => {
@tinacious
tinacious / version_bump.js
Created January 9, 2019 03:26
Version bump Node.js projects
/**
* 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)
@tinacious
tinacious / ig-download.js
Last active July 8, 2018 20:37
📸 IG Download bookmarklet
/**
* 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');
@tinacious
tinacious / tota11y bookmarklet.js
Created March 16, 2017 00:18
Add tota11y accessibility tool to the page
/**
* 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);
})();
@tinacious
tinacious / Too Big bookmarklet.js
Last active March 8, 2017 18:56
Prompts the user for a width value in pixels and then finds all DOM elements greater than the provided width
/**
* 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;
/**
* 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;
/**
* Show bootstrap grid
*/
(function () {
const Grid = {
id: 'td-bootstrap-grid-toggle',
show: () => {
const containerWrapperElement = document.createElement('div');