Skip to content

Instantly share code, notes, and snippets.

View ohiosveryown's full-sized avatar
🏀

Matthew Pence ohiosveryown

🏀
View GitHub Profile
document.addEventListener("DOMContentLoaded", () => {
fetch("db/jsproject.json")
.then((response) => response.json())
.then((data) => {
button.addEventListener("click", () => {
const answers = data.answers
const index = answers[~~(Math.random() * answers.length)]
console.log(index)
answer.innerText = index
})

Twitter abuses all media file uploads, each type in its own way. If we want to upload a good looking animation loop from some low-color, high-detail generative art, we have to game their system's mechanisms.

  • don't upload a video file, they will re-encode it into absolute 💩

  • create a GIF, which they will auto-convert into a video file 😱

  • The frames of the GIF will be resized to an even-sized width using an extremely naive algorithm. Your GIF should be an even size (1000, 2000,

@ohiosveryown
ohiosveryown / font-stacks.css
Created November 29, 2021 15:04 — forked from don1138/font-stacks.css
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;
/* Times New Roman-based serif */
font-family: Cambria, "Hoefler Text", Utopia, "Liberation Serif", "Nimbus Roman No9 L Regular", Times, "Times New Roman", serif;
/* A modern Georgia-based serif */
font-family: Constantia, "Lucida Bright", Lucidabright, "Lucida Serif", Lucida, "DejaVu Serif", "Bitstream Vera Serif", "Liberation Serif", Georgia, serif;
@ohiosveryown
ohiosveryown / README.md
Created November 12, 2017 19:07 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@ohiosveryown
ohiosveryown / states.md
Last active January 30, 2018 14:26 — forked from alishalisha/states.md
Checking state on product design patterns

Checking the State of Your States

If applicable, make sure your design component accounts for all these states. This is basically copied from the Nine States of Design Medium article. 😛

  • Initial state: What happens before your component does anything? Maybe it’s the first time a user sees it. Maybe it’s not activated yet. Essentially, the component exists but hasn’t started.
  • Loading state: Have you accounted for when a user will be waiting for something to happen? What does that look like?
  • Empty/Zero state: Your component has initialized, but it’s empty. No data. No Items. Now may be a good time to get the user to act (“Do this thing!”), or to reward them (“Good job, everything is taken care of”).
  • One state: You have some data. On an input, this may be after the first keystroke. In a list, it might be when you have one item (or one left).
  • Some data state: This is usually what you