From 58321a3844d747b7836ef52fc03a1904ffd399ad Mon Sep 17 00:00:00 2001 From: Jake Jarvis Date: Sun, 9 Jan 2022 23:35:16 -0500 Subject: [PATCH] priority flag on above-the-fold images --- components/embeds/Image.tsx | 5 +++-- notes/bernie-sanders-bern-app-data.mdx | 1 + notes/cloudflare-dns-archive-is-blocked.mdx | 1 + notes/cool-bash-tricks-for-your-terminal-dotfiles.mdx | 1 + notes/dropping-dropbox.mdx | 1 + notes/finding-candidates-subdomain-takeovers.mdx | 1 + notes/github-actions.mdx | 1 + notes/github-rename-master.mdx | 1 + notes/how-to-backup-linux-server.mdx | 1 + notes/how-to-shrink-linux-virtual-disk-vmware.mdx | 1 + notes/millenial-with-hillary-clinton.mdx | 1 + notes/my-first-code.mdx | 1 + notes/netlify-analytics-review.mdx | 1 + notes/no-homo-still-raps-motto.mdx | 2 +- notes/presidential-candidates-404-pages.mdx | 1 + notes/security-headers-cloudflare-workers.mdx | 1 + notes/shodan-search-queries.mdx | 1 + notes/y2k-sandbox.mdx | 1 + 18 files changed, 20 insertions(+), 3 deletions(-) diff --git a/components/embeds/Image.tsx b/components/embeds/Image.tsx index 7a88c2e5..5267f4fd 100644 --- a/components/embeds/Image.tsx +++ b/components/embeds/Image.tsx @@ -15,8 +15,9 @@ const CustomImg = (props: ImageProps) => { width={props.width} height={props.height} alt={props.alt} - quality={85} - loading="lazy" + quality={65} + loading={props.priority ? "eager" : "lazy"} + priority={!!props.priority} /> ); diff --git a/notes/bernie-sanders-bern-app-data.mdx b/notes/bernie-sanders-bern-app-data.mdx index 7e626cf3..337da0fe 100644 --- a/notes/bernie-sanders-bern-app-data.mdx +++ b/notes/bernie-sanders-bern-app-data.mdx @@ -21,6 +21,7 @@ The team behind Bernie Sanders' 2020 campaign [released a new web app](https://w width="865" height="433" alt="Sad Bernie" + priority /> BERN has two features: one called "Friend-to-Friend" (described as "add everyone in your network") and another called "Community Canvassing" (described as "talk to people around you every day, e.g. on the bus, outside the grocery store, at a park"). Both of these involve phoning home to Sanders HQ with the following information on anybody you know or meet: diff --git a/notes/cloudflare-dns-archive-is-blocked.mdx b/notes/cloudflare-dns-archive-is-blocked.mdx index 39b474e1..25d2bb36 100644 --- a/notes/cloudflare-dns-archive-is-blocked.mdx +++ b/notes/cloudflare-dns-archive-is-blocked.mdx @@ -21,6 +21,7 @@ import Tweet from "./components/embeds/Tweet"; width="865" height="180" alt="Archive.today screenshot" + priority /> A [recent post on Hacker News](https://news.ycombinator.com/item?id=19828317) pointed out something I've noticed myself over the past year — the [Archive.is](https://archive.is/) website archiving tool (aka [Archive.today](https://archive.today/) and a few other TLDs) appears unresponsive when I'm on my home network, where I use Cloudflare's fantastic public DNS service, [1.1.1.1](https://1.1.1.1/). I didn't connect the two variables until I read this post, where somebody noticed that the Archive.is domain resolves for [Google's 8.8.8.8](https://developers.google.com/speed/public-dns/) DNS, but not 1.1.1.1. An interesting and timeless debate on [privacy versus convenience](https://www.adweek.com/digital/why-consumers-are-increasingly-willing-to-trade-privacy-for-convenience/) ensued. diff --git a/notes/cool-bash-tricks-for-your-terminal-dotfiles.mdx b/notes/cool-bash-tricks-for-your-terminal-dotfiles.mdx index c425f9ad..803db530 100644 --- a/notes/cool-bash-tricks-for-your-terminal-dotfiles.mdx +++ b/notes/cool-bash-tricks-for-your-terminal-dotfiles.mdx @@ -19,6 +19,7 @@ import Image from "./components/embeds/Image"; width="320" height="284" alt="Terminal.app on macOS" + priority /> You may have noticed the recent trend of techies [posting their "dotfiles" on GitHub](https://github.com/topics/dotfiles) for the world to see. These usually contain shortcuts compatible with Bash terminals to automate convoluted commands that, I'll admit, I needed to Google every single time. diff --git a/notes/dropping-dropbox.mdx b/notes/dropping-dropbox.mdx index 3a92fca5..3463764f 100644 --- a/notes/dropping-dropbox.mdx +++ b/notes/dropping-dropbox.mdx @@ -23,6 +23,7 @@ I've been a loyal Dropbox user since its inception as a [Y Combinator startup](h width="504" height="223" alt="Deleting 401,907 files from Dropbox... 😬" + priority />
Deleting 401,907 files from Dropbox... 😬
diff --git a/notes/finding-candidates-subdomain-takeovers.mdx b/notes/finding-candidates-subdomain-takeovers.mdx index 93aac9a2..250aa3fb 100644 --- a/notes/finding-candidates-subdomain-takeovers.mdx +++ b/notes/finding-candidates-subdomain-takeovers.mdx @@ -23,6 +23,7 @@ Not only are takeovers a fun way to dip your toes into [penetration testing](htt width="620" height="347" alt="Huge rewards for subdomain takeovers on HackerOne." + priority />
Since being accepted into the beta for [GitHub Actions](https://github.com/features/actions) a few months ago, I've found a new side hobby of whipping up new (and ideally creative) actions for anybody to add to their CI pipeline. Actions are modular steps that interact with a GitHub repository and can be coded with [Docker](https://github.com/actions/hello-world-docker-action) or [JavaScript/Node](https://github.com/actions/hello-world-javascript-action) — and either way, they can be as [simple](https://github.com/jakejarvis/wait-action) or as [complex](https://github.com/jakejarvis/lighthouse-action) as you want. But in both cases, they're incredibly fun to make and the results always scratch my itch for instant gratification. diff --git a/notes/github-rename-master.mdx b/notes/github-rename-master.mdx index 9fa811a4..74ee0a5b 100644 --- a/notes/github-rename-master.mdx +++ b/notes/github-rename-master.mdx @@ -20,6 +20,7 @@ import Tweet from "./components/embeds/Tweet"; width="865" height="162" alt="Black lives matter." + priority /> In the midst of this year's long-overdue support of the [**Black Lives Matter**](https://blacklivesmatters.carrd.co/) movement and calls to action in the US and around the world, a [new spotlight](https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00066.html) has been placed on unchecked invocations of racially charged language in the computer science world, no matter how big or small — like the long-standing and, until recently, widely accepted terms ["master" and "slave"](https://tools.ietf.org/id/draft-knodel-terminology-00.html#master-slave) as an oppressive metaphor for ownership/importance. diff --git a/notes/how-to-backup-linux-server.mdx b/notes/how-to-backup-linux-server.mdx index 66533d2f..18624d85 100644 --- a/notes/how-to-backup-linux-server.mdx +++ b/notes/how-to-backup-linux-server.mdx @@ -21,6 +21,7 @@ import Tweet from "./components/embeds/Tweet"; width="865" height="303" alt="The Cloud-pocalypse: Coming soon(er than you think) to a server near you." + priority />
The Cloud-pocalypse: Coming soon(er than you think) to a server near you. diff --git a/notes/how-to-shrink-linux-virtual-disk-vmware.mdx b/notes/how-to-shrink-linux-virtual-disk-vmware.mdx index e7314a85..43273d12 100644 --- a/notes/how-to-shrink-linux-virtual-disk-vmware.mdx +++ b/notes/how-to-shrink-linux-virtual-disk-vmware.mdx @@ -19,6 +19,7 @@ import Image from "./components/embeds/Image"; width="620" height="456" alt="df -dh = WTF" + priority />
df -dh = WTF diff --git a/notes/millenial-with-hillary-clinton.mdx b/notes/millenial-with-hillary-clinton.mdx index 920d66ba..a14e6e54 100644 --- a/notes/millenial-with-hillary-clinton.mdx +++ b/notes/millenial-with-hillary-clinton.mdx @@ -21,6 +21,7 @@ import Video from "./components/embeds/Video"; width="865" height="411" alt="Hillary for New Hampshire Winter Fellows with Hillary Clinton in Derry, NH (February 3, 2016)" + priority />
Hillary for New Hampshire Winter Fellows with Hillary Clinton in Derry, NH (February 3, 2016) diff --git a/notes/my-first-code.mdx b/notes/my-first-code.mdx index 666deb8b..6d1a221a 100644 --- a/notes/my-first-code.mdx +++ b/notes/my-first-code.mdx @@ -18,6 +18,7 @@ import Image from "./components/embeds/Image"; width="865" height="155" alt="Awesome First Code on GitHub" + priority /> Code Quality: A for effort diff --git a/notes/netlify-analytics-review.mdx b/notes/netlify-analytics-review.mdx index 6c7e8a77..c955129b 100644 --- a/notes/netlify-analytics-review.mdx +++ b/notes/netlify-analytics-review.mdx @@ -21,6 +21,7 @@ I've been trying out [Netlify Analytics](https://www.netlify.com/products/analyt width="865" height="361" alt="Pageview charts on Netlify Analytics" + priority /> ## 👍  Pros diff --git a/notes/no-homo-still-raps-motto.mdx b/notes/no-homo-still-raps-motto.mdx index 562ca2cb..4737f3ec 100644 --- a/notes/no-homo-still-raps-motto.mdx +++ b/notes/no-homo-still-raps-motto.mdx @@ -16,7 +16,7 @@ import Image from "./components/embeds/Image"; {/* prettier-ignore */}
- +
This essay was written for Professor David Valdes-Greenwood's "Love & Sexuality" class at Tufts University in April 2012.
diff --git a/notes/presidential-candidates-404-pages.mdx b/notes/presidential-candidates-404-pages.mdx index 120047bb..951f5b1d 100644 --- a/notes/presidential-candidates-404-pages.mdx +++ b/notes/presidential-candidates-404-pages.mdx @@ -19,6 +19,7 @@ import Video from "./components/embeds/Video"; width="865" height="460" alt="President Barack H. Obama, probably ranking 404 pages." + priority />
President Barack H. Obama, probably ranking 404 pages.
diff --git a/notes/security-headers-cloudflare-workers.mdx b/notes/security-headers-cloudflare-workers.mdx index 1df7dea0..041a3930 100644 --- a/notes/security-headers-cloudflare-workers.mdx +++ b/notes/security-headers-cloudflare-workers.mdx @@ -20,6 +20,7 @@ import Image from "./components/embeds/Image"; width="700" height="275" alt="An A+ security grade for this website!" + priority />
An A+ security grade for this website! diff --git a/notes/shodan-search-queries.mdx b/notes/shodan-search-queries.mdx index 85282d45..e3d4cb4b 100644 --- a/notes/shodan-search-queries.mdx +++ b/notes/shodan-search-queries.mdx @@ -22,6 +22,7 @@ Over time, I've collected an assortment of interesting, funny, and depressing se width="865" height="248" alt="Most search filters require a Shodan account." + priority />
diff --git a/notes/y2k-sandbox.mdx b/notes/y2k-sandbox.mdx index 4888e96f..71af9eac 100644 --- a/notes/y2k-sandbox.mdx +++ b/notes/y2k-sandbox.mdx @@ -23,6 +23,7 @@ Introducing the [**Y2K Sandbox**](https://y2k.app/) — with fully-featured, ful width="865" height="649" alt="Play in the Y2K Sandbox, at your own risk." + priority />