diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index f4cecd99..e4de1a24 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -31,6 +31,16 @@ jobs: cp -r $GITHUB_WORKSPACE/public $HOME/gh-pages echo "jarv.is" > $HOME/gh-pages/CNAME + # Put a bow on top of Hugo's automatic image processing by using + # pngquant and jpegoptim to optimize/compress images in posts, + # just a little lossily (is that a word?) + - name: Optimize processed images + run: | + sudo apt-get install -y --no-install-recommends pngquant jpegoptim + cd $HOME/gh-pages/notes + find . -iname "*.jp*" -print0 | xargs -0 jpegoptim --max=90 --strip-all + find . -iname "*.png" -print0 | xargs -0 pngquant --quality=60-75 --speed 1 --ext=.png --force --verbose + # Initialize a sub-repository in the new gh-pages directory and # add jakejarvis/jakejarvis.github.io as a remote. # Using native git commands for speed and simplicity, and because diff --git a/assets/sass/pages/_notes.scss b/assets/sass/pages/_notes.scss index 9a8c3cd4..b4962b64 100644 --- a/assets/sass/pages/_notes.scss +++ b/assets/sass/pages/_notes.scss @@ -97,7 +97,6 @@ body#notes { } div { - &#copyright, &#poweredby { width: 40%; @@ -184,12 +183,18 @@ body#notes { line-height: 1.5; } - img { + img, + figure { max-width: 100%; - margin: 0 auto; + margin: 1em auto; display: block; } + // reduce margin between image and caption + figure img { + margin-bottom: 0.4em; + } + // image captions -- two different markdown hacks img + em, figure figcaption { @@ -198,7 +203,6 @@ body#notes { font-style: normal; color: $color-light; text-align: center; - margin-top: 0.4em; } blockquote { @@ -250,7 +254,7 @@ body#notes { margin: 0 auto; display: block; } - + code { // https://markdotto.com/2018/02/07/github-system-fonts/ font-family: "SFMono-Regular", "Consolas", "Liberation Mono", "Menlo", "Courier", monospace; @@ -263,6 +267,7 @@ body#notes { pre code { display: block; padding: 1em 1.5em; + margin: 1.4em 0; line-height: 1.6; border-left: 3px solid $color-links; max-width: 100%; @@ -309,7 +314,6 @@ body#notes { h2 { font-size: 1.8em; } - } } } diff --git a/assets/sass/pages/responsive/_notes.scss b/assets/sass/pages/responsive/_notes.scss index b7eb650f..e8557a4a 100644 --- a/assets/sass/pages/responsive/_notes.scss +++ b/assets/sass/pages/responsive/_notes.scss @@ -29,11 +29,6 @@ body#notes { li { width: 55px; - - // hide home emoji on mobile -- logo probably suffices? - // &:first-child { - // display: none; - // } } } } diff --git a/config.toml b/config.toml index c5e485d6..fb1224e6 100644 --- a/config.toml +++ b/config.toml @@ -13,7 +13,8 @@ pygmentsCodeFences = true enableRobotsTXT = true -# enableGitInfo = true # messed up sitemap.xml timestamps +# increase timeout for image processing +timeout = 60000 [outputs] home = ["HTML", "RSS"] @@ -22,6 +23,12 @@ enableRobotsTXT = true [sitemap] filename = "sitemap.xml" +[imaging] + # options for resampling filters: + # https://github.com/disintegration/imaging#image-resizing + resampleFilter = "Linear" + quality = 100 + [blackfriday] hrefTargetBlank = true nofollowLinks = true diff --git a/content/_index.md b/content/_index.md index 9472217f..727deb3b 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,6 +1,6 @@ -+++ -title = "Jake Jarvis – Front-End Web Developer in Boston, MA" -description = "Hello! I'm a frontend web developer based in Boston, Massachusetts specializing in modern JavaScript frameworks and progressive web apps." -type = "home" -date = "2019-10-25" -+++ +--- +title: "Jake Jarvis – Front-End Web Developer in Boston, MA" +date: 2019-10-26 18:04:05-0400 +description: "Hello! I'm a frontend web developer based in Boston, Massachusetts specializing in modern JavaScript frameworks and progressive web apps." +type: home +--- diff --git a/content/notes/cloudflare-dns-archive-is-blocked/index.md b/content/notes/cloudflare-dns-archive-is-blocked/index.md index 7fff1a9c..46756589 100644 --- a/content/notes/cloudflare-dns-archive-is-blocked/index.md +++ b/content/notes/cloudflare-dns-archive-is-blocked/index.md @@ -14,7 +14,7 @@ draft: false **tl;dr:** No. Quite the opposite, actually -- [Archive.is](https://archive.is/)'s owner is intentionally blocking 1.1.1.1 users. -![](images/archive-is.png) +{{< image src="images/archive-is.png" alt="Sad Bernie" >}} 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/content/notes/github-actions/index.md b/content/notes/github-actions/index.md index 6af0499f..2cb59a00 100644 --- a/content/notes/github-actions/index.md +++ b/content/notes/github-actions/index.md @@ -1,6 +1,6 @@ --- title: "I ❤️ GitHub Actions" -date: 2019-10-25 1:58:39-0400 +date: 2019-10-25 13:58:39-0400 description: "I've found a new hobby of making cool GitHub Actions, the latest tool in the CI world. Here's why." tags: - DevOps diff --git a/content/notes/how-to-backup-linux-server/index.md b/content/notes/how-to-backup-linux-server/index.md index 53305244..b2c8f5c4 100644 --- a/content/notes/how-to-backup-linux-server/index.md +++ b/content/notes/how-to-backup-linux-server/index.md @@ -14,9 +14,7 @@ draft: false --- - -![The Cloud-pocalypse: Coming sooner than you think to a server near you.](images/apocalypse.png) -*The Cloud-pocalypse: Coming soon(er than you think) to a server near you.* +{{< image src="images/apocalypse.png" alt="The Cloud-pocalypse: Coming soon(er than you think) to a server near you." caption="The Cloud-pocalypse: Coming soon(er than you think) to a server near you." >}} Last month, the founder of [a small startup](https://raisup.com/) got quite a bit of [attention on Twitter](https://twitter.com/w3Nicolas/status/1134529316904153089) (and [Hacker News](https://news.ycombinator.com/item?id=20064169)) when he called out [DigitalOcean](https://www.digitalocean.com/) who, in his words, "killed" his company. Long story short: DigitalOcean's automated abuse system flagged the startup's account after they spun up about ten powerful droplets for some CPU-intensive jobs and deleted them shortly after --- which is literally **the biggest selling point** of a "servers by the hour" company like DigitalOcean, by the way --- and, after replying to the support ticket, an unsympathetic customer support agent [declined to reactivate](https://twitter.com/w3Nicolas/status/1134529372172509184) the account without explanation. [Nicolas](https://twitter.com/w3Nicolas) had no way of even accessing his data, turning the inconvenient but trivial task of migrating servers into a potentially fatal situation for his company. diff --git a/content/notes/millenial-with-hillary-clinton/index.md b/content/notes/millenial-with-hillary-clinton/index.md index bc42195a..d0d9396b 100644 --- a/content/notes/millenial-with-hillary-clinton/index.md +++ b/content/notes/millenial-with-hillary-clinton/index.md @@ -14,8 +14,7 @@ draft: false --- -![](images/24707394571_0818d4ab83_o-1-copy.jpg) -*[Hillary for New Hampshire](https://twitter.com/hillaryfornh) Winter Fellows with [Hillary Clinton](https://www.hillaryclinton.com/) in Derry, NH ([February 3, 2016](https://www.flickr.com/photos/hillaryclinton/24707394571/))* +{{< image src="images/24707394571_0818d4ab83_o-1-copy.jpg" alt="Hillary for New Hampshire Winter Fellows with Hillary Clinton in Derry, NH (February 3, 2016)" caption="Hillary for New Hampshire Winter Fellows with Hillary Clinton in Derry, NH (February 3, 2016)" >}} ## Keeping in mind the big picture… @@ -29,7 +28,7 @@ My goal here isn’t to convince every Bernie believer to jump ship and support After working for months as a fellow on Hillary’s campaign in New Hampshire leading up to the first primary in the country, I could feed you all the standard campaign talking points in my sleep: After graduating from Yale Law she went to work at the [Children’s Defense Fund](http://www.childrensdefense.org/), not a high-paying New York law firm. She [went undercover](http://www.nytimes.com/2015/12/28/us/politics/how-hillary-clinton-went-undercover-to-examine-race-in-education.html?_r=0) in Alabama to investigate discrimination in public schools. She [got juveniles out of adult prisons](http://www.huffingtonpost.com/entry/huffpost-criminal-justice-survey-democratics_us_56bb85eae4b0b40245c5038b). She [gave 8 million children healthcare](https://www.hillaryclinton.com/briefing/factsheets/2015/12/23/hillary-clintons-lifelong-fight-for-quality-affordable-health-care-for-all-americans/). But there’s just one thing that, for some reason, is hard for people to believe: at her core she is a good, caring, and loving person who has had only selfless intentions her entire life. I promise you. -![](images/9e58a-1bvweqv_ve2_c1tw5-ihrhw.jpg) +{{< image src="images/9e58a-1bvweqv_ve2_c1tw5-ihrhw.jpg" width="400" >}} I had the incredible chance to meet Hillary the weekend before the New Hampshire primary. Her motorcade plowed through a quiet suburb in Manchester around noon and she hopped out to go knock on the doors of some lucky families. As neighbors started coming out of their houses to shake her hand, I couldn’t restrain myself from at least trying to get close and wave hello. (By the way, it’s amazing how casual the people in New Hampshire are about meeting presidential candidates.) diff --git a/content/notes/no-homo-still-raps-motto/index.md b/content/notes/no-homo-still-raps-motto/index.md index c6f16ad1..4d80ae23 100644 --- a/content/notes/no-homo-still-raps-motto/index.md +++ b/content/notes/no-homo-still-raps-motto/index.md @@ -15,8 +15,7 @@ draft: false --- -![](images/1_b41ztscbaxqi60snwsswfw.jpg) -*This essay was written for Professor [David Valdes-Greenwood](https://www.davidvaldesgreenwood.com/)’s "Love & Sexuality" class at [Tufts University](https://www.tufts.edu/) in April 2012.* +{{< image src="images/1_b41ztscbaxqi60snwsswfw.jpg" caption="This essay was written for Professor David Valdes-Greenwood’s “Love & Sexuality” class at Tufts University in April 2012." >}} * * * @@ -38,8 +37,7 @@ My next inquiry was about whether there’s room for a gay person in the mainstr It became apparent to me that there is still an ethical divide between the rap industry and the rest of America. In 2012, there are few areas where undisguised and unapologetic homophobia is not only accepted, but rewarded with money and power. (Rap and the Republican presidential nomination race come to mind.) Every few years, we see the issue of rap and homophobia as front-page news, but the time between these climaxes of public outrage is filled with self-encouraging homophobic songs that get no backlash at all. -![](images/66574-132xjztnwqcm40hmdrec08q.jpg) -*Frank Micelotta/Getty Images* +{{< image src="images/66574-132xjztnwqcm40hmdrec08q.jpg" caption="Frank Micelotta/Getty Images" >}} Eminem is a prime example of this. After rapping about “homos” and “fags” for years, his third studio album, _The Marshall Mathers LP_, finally saw mainstream recognition and acclaim, including the nomination for Best Rap Album and Album of the Year at the 2001 Grammy Awards. After both the National Academy of Recording Arts & Sciences and CBS “endured a storm of protest over the rapper’s best album nomination” due to his use of homophobic slurs, Eminem announced a duet with Elton John to be performed at the Grammy ceremony. “I’d rather tear down walls between people than build them up. If I thought for one minute that he was hateful, I wouldn’t do it,” John said in defense of the performance. @@ -69,8 +67,7 @@ A year earlier, in 2009, Queens rapper N.O.R.E. also revealed to DJ Vlad: Several other rappers have recently been vocal against homophobia. Nicki Minaj, protégé of Lil Wayne, said in an interview last year with _Out Magazine_, “Normally, Wayne probably wouldn’t have gay guys coming to see his shows much, but they’re definitely a big part of my movement, and I hope they’d still come out and see me. I think that will be really, really interesting, just to start bridging that gap.” Up-and-coming 23-year-old rapper A$AP Rocky, admitted last year to Pitchfork.com, “I used to be homophobic, but that’s fucked up. I had to look in the mirror and say, ‘All the designers I’m wearing are gay.’” -![](images/f9d7a-1gad6zdgng2-mjsedg5igwa.jpg) -*Sarah Taylor/Fashion Magazine* +{{< image src="images/f9d7a-1gad6zdgng2-mjsedg5igwa.jpg" caption="Sarah Taylor/Fashion Magazine" >}} Unfortunately, not all rappers—including and especially the most popular and celebrated—are not as enlightened as today’s up-and-comers such as Nicki Minaj and A$AP Rocky. Kanye West, one of the rappers quoted before for shouting “no homo” on Jay-Z’s number-one single _Run This Town_ and (in)famous for speaking what’s on his mind, was the target of countless questions about his sexuality after his sudden attendance at Paris fashion shows and interest in women’s designer clothing. When asked by DJ Sway for MTV News to respond to accusations from fans that he “dresses gay,” West responded, “Your dress don’t give away whether or not you like a man. Think about actors that straight dress up like a woman or something like that. People wanna label me and throw that on me all the time, but I’m so secure with my manhood.” @@ -80,8 +77,7 @@ West, disagreeing with Fat Joe’s claim of being surrounded by gay members of t While the sentiment from mainstream rappers is becoming increasingly supportive of all sexualities, West’s automatic instinct to defend himself so passionately against rumors about his own sexuality reflects no such sentiment from the community of rap fans and critics. In other words, maybe the record executives are justified to think that a gay rapper would jeopardize the one thing they are hired to protect: a profitable return on investments in recording contracts, marketing, and concert venues. -![](images/a5c2a-1fkblnzkye3g04gdvsbbtpa.jpg) -*Amy Odell/New York Magazine Fashion* +{{< image src="images/a5c2a-1fkblnzkye3g04gdvsbbtpa.jpg" caption="Amy Odell/New York Magazine Fashion" >}} Lil Wayne’s performance at MTV’s Video Music Awards last year showed the community’s lack of progress in the area of homophobia. The performance generated tons of instantaneous buzz on the Internet, but not for the reasons Wayne had hoped. Instead of his musical performance being discussed, the topic instead turned to his wardrobe. Viewers of the live award show started wondering and asking online, _“Is Lil Wayne wearing women’s pants right now?”_ @@ -89,8 +85,7 @@ Lil Wayne’s performance at MTV’s Video Music Awards last year showed the com Sure enough, _Rolling Stone_ confirmed with the fashion store Tripp NYC that Wayne was sporting their ladies’ leopard-print jeggings that retail online for $44. _Out Magazine_’s assistant editor Max Berlinger spoke in support of Wayne, attributing his choice of clothes to Dandyism, or “extreme visual paradigms that are manifested in a completely overt way and also heavily rooted in consumerism.” Berlinger, when asked to elaborate on artists like Kanye wearing women’s blouses and calling it individualism, simply responded with, “Fuck all that theoretical bullshit. At the end of the day, I just want someone to look confidently like themselves, which Lil Wayne did perfectly”. However, Wayne’s fans vocally disagreed. A Twitter account, @Waynes_Jeggings, was created almost immediately after the performance, and spent the rest of the night questioning Wayne’s sexuality (the messages have since been deleted). -![](images/a805a-1ghqzd91ei4fdntwmzwxw6g.jpg) -*Martin Rose/Getty Images* +{{< image src="images/a805a-1ghqzd91ei4fdntwmzwxw6g.jpg" caption="Martin Rose/Getty Images" >}} In the most revealing and straightforward social experiment yet, 21-year-old rapper Lil B, famous for his intentionally offbeat rhythm, extremely loose rhymes, and, according to him, over 3,000 songs, some with ridiculous titles such as “I’m Miley Cyrus,” “I’m God,” “I’m Orange Juice,” and “Wonton Soup,” decided to test the rap community’s homophobia once and for all. In April of last year, Lil B announced during his Coachella performance that his next independently released album would be titled _I’m Gay_. Lil B elaborated on the title, claiming “that he does not partake in that lifestyle but, but he wants to make a statement about the power of words, or lack thereof,” but little of his reasoning made it past the headlines and onto the radar of rap fans other than the title, _I’m Gay_. diff --git a/content/notes/security-headers-cloudflare-workers/index.md b/content/notes/security-headers-cloudflare-workers/index.md index dbdb6f7a..dd2579d1 100644 --- a/content/notes/security-headers-cloudflare-workers/index.md +++ b/content/notes/security-headers-cloudflare-workers/index.md @@ -13,7 +13,7 @@ draft: false --- -{{< image src="images/security-headers.png" width="700" alt="A+ security grade for this website" >}} +{{< image src="images/security-headers.png" width="700" alt="A+ security grade for this website!" caption="A+ security grade for this website!" >}} In 2019, it's becoming more and more important to harden websites via HTTP response headers, which all modern browsers parse and enforce. Multiple standards have been introduced over the past few years to protect users from various attack vectors, including `Content-Security-Policy` for injection protection, `Strict-Transport-Security` for HTTPS enforcement, `X-XSS-Protection` for cross-site scripting prevention, `X-Content-Type-Options` to enforce correct MIME types, `Referrer-Policy` to limit information sent with external links, [and many, many more](https://www.netsparker.com/whitepaper-http-security-headers/). diff --git a/content/notes/shodan-search-queries/index.md b/content/notes/shodan-search-queries/index.md index f054745a..4646533e 100644 --- a/content/notes/shodan-search-queries/index.md +++ b/content/notes/shodan-search-queries/index.md @@ -18,8 +18,7 @@ draft: false Over time, I've collected an assortment of interesting, funny, and depressing search queries to plug into [Shodan](https://www.shodan.io/), the ([literal](https://www.vice.com/en_uk/article/9bvxmd/shodan-exposes-the-dark-side-of-the-net)) internet search engine. Some return facepalm-inducing results, while others return serious and/or ancient vulnerabilities in the wild. -![Shodan.io](images/shodan.png) -*[Most search filters require a Shodan account.](https://account.shodan.io/register)* +{{< image src="images/shodan.png" alt="Some search filters require a Shodan account." caption="Some search filters require a Shodan account." >}} You can assume these queries only return unsecured/open instances when possible. For your own legal benefit, do not attempt to login (even with default passwords) if they aren't! Narrow down results by adding filters like `country:US` or `org:"Harvard University"` or `hostname:"nasa.gov"` to the end. diff --git a/layouts/_default/list.html b/layouts/_default/list.html index b4c4ae50..5028a253 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,19 +1,19 @@ {{ partial "header.html" . }} {{ partial "blog-header.html" . }}
- {{ range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }} + {{- range (where .Site.RegularPages "Type" "notes").GroupByDate "2006" }}

{{ .Key }}

- {{ end }} + {{- end }}
{{ partial "blog-footer.html" . }} {{ partial "footer.html" . }} \ No newline at end of file diff --git a/layouts/_default/single.html b/layouts/_default/single.html index bae27c10..406d04a3 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -5,24 +5,19 @@

- by · - - - - - {{ with .File }}· Improve Post{{ end }} + by + · + · Improve Post
- {{ with .Params.tags }}{{ if ge (len .) 1 }} - {{ range . }}{{ . }} - {{ end }} - {{ end }}{{ end }} + {{- range .Params.tags }} + {{ . }} + {{- end }}
{{ .Content }}
- {{ partial "blog-footer.html" . }} diff --git a/layouts/partials/blog-footer.html b/layouts/partials/blog-footer.html index 49c52550..73e850ea 100644 --- a/layouts/partials/blog-footer.html +++ b/layouts/partials/blog-footer.html @@ -2,5 +2,4 @@
🐼
Powered by Hugo. View source.
- - {{ if .IsPage }}{{ end }} \ No newline at end of file + \ No newline at end of file diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 0dd05521..15f8b764 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,5 +1,5 @@ {{ if eq hugo.Environment "production" }}{{ partial "stats.html" . }}{{ end }} - + {{"" | safeHTML}} diff --git a/layouts/partials/stats.html b/layouts/partials/stats.html index 5de12048..625e1983 100644 --- a/layouts/partials/stats.html +++ b/layouts/partials/stats.html @@ -1,12 +1,12 @@