1
0
mirror of https://github.com/danbee/danbarber.me synced 2025-03-04 08:59:10 +00:00

Add microblog content

This commit is contained in:
Daniel Barber 2019-08-01 20:28:31 -04:00
parent eb837f8200
commit 02d81c2143
Signed by: danbarber
GPG Key ID: 931D8112E0103DD8
44 changed files with 398 additions and 0 deletions

View File

@ -37,6 +37,12 @@ exclude:
include:
- _redirects
defaults:
- scope:
path: "_posts"
values:
title: ""
pagination:
collection: "posts"
enabled: true

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 934 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 277 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 389 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 559 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 390 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 659 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 385 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 511 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 976 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 642 KiB

View File

@ -1,3 +1,5 @@
require "mini_magick"
module Jekyll
module MiniMagick
def magick(image_path, options)

View File

@ -0,0 +1,15 @@
---
title: Walk/Dont Walk
date: 2018-03-07T15:42:00-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/869b833df5.jpg"
---
<img src="uploads/2018/869b833df5.jpg" width="600" height="600" style="height: auto;" class="sunlit_image" />
So do I walk or dont I?

View File

@ -0,0 +1,16 @@
---
title: Generations
date: 2018-03-19T00:14:00-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/2e444e3e03.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/2e444e3e03.jpg alt="" %}
</figure>
The first Mario Kart and the most recent Mario Kart. The SNES cartridge on the left is 512KB and the Switch cartridge is most likely 8GB, based on the download size of the game (6.7GB).

View File

@ -0,0 +1,8 @@
---
date: 2018-04-16T15:55:07-04:00
layout: micropost
categories: ["microblog", "blog"]
---
Trying VimR again after MacVim crashes for the umpteenth time.

View File

@ -0,0 +1,8 @@
---
date: 2018-04-17T23:03:39-04:00
layout: micropost
categories: ["microblog", "blog"]
---
I wish my body could decide what temperature it wanted to be 🤒

View File

@ -0,0 +1,8 @@
---
date: 2018-05-05T16:22:28-04:00
layout: micropost
categories: ["microblog", "blog"]
---
I want to start a band and call it “The Flying Buttresses”.

16
_posts/2018-05-15-desk.md Normal file
View File

@ -0,0 +1,16 @@
---
title: Desk
date: 2018-05-15T10:31:12-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/be5436a210.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/be5436a210.jpg alt="" %}
</figure>
My custom built mechanical keyboard with WASD wrist rest and custom cable from Clark Kable.

View File

@ -0,0 +1,16 @@
---
title: Multime!
date: 2018-08-25T19:26:46-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/ce4e2bd2f8.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/ce4e2bd2f8.jpg alt="" %}
</figure>
The hall of mirrors at the EscherNYC exhibit in Brooklyn

View File

@ -0,0 +1,16 @@
---
title: Pennsy Reflection
date: 2018-08-25T11:32:38-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/4c8cabfd8e.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/4c8cabfd8e.jpg alt="" %}
</figure>
Sculpture outside of Pennsy, the food court at Penn Station, NY

View File

@ -0,0 +1,8 @@
---
date: 2018-09-11T18:42:30-04:00
layout: micropost
categories: ["microblog", "blog"]
---
Im sad that the Apple In-Ear Headphones have been discontinued. They were an overlooked gem. Amazing sound quality for the price.

View File

@ -0,0 +1,15 @@
---
date: 2018-09-18T23:05:31-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/e2465ca115.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/e2465ca115.jpg alt="" %}
</figure>
The sky looked amazing after the thunderstorms today

View File

@ -0,0 +1,15 @@
---
date: 2018-10-31T18:00:54-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/a4cb18e877.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/a4cb18e877.jpg alt="" %}
</figure>
T-shirt weather today in New York City

View File

@ -0,0 +1,8 @@
---
date: 2019-05-21T12:30:52-04:00
layout: micropost
categories: ["microblog", "blog"]
---
Wonderful post by [@Cheri](https://micro.blog/Cheri) on making the Internet fun again [www.cheribaker.com/can-we-ma...](https://www.cheribaker.com/can-we-make-the-internet-fun-again/)

View File

@ -0,0 +1,14 @@
---
title: The little known 0.5x display mode
date: 2019-05-24T13:12:00-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/8e1a2817b8.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/8e1a2817b8.jpg alt="" %}
</figure>

View File

@ -0,0 +1,16 @@
---
title: Bike Dragonfly
date: 2019-05-24T20:16:00-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/5f50dfc4a0.jpg"
---
This fella was a very willing subject. He flew away a couple of times but kept coming back and sitting right here on this bike handle.
<figure class="photo">
{% picture photo-square blog/microblog/5f50dfc4a0.jpg alt="" %}
</figure>

View File

@ -0,0 +1,14 @@
---
title: Epcot
date: 2019-05-26T11:02:10-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/60c0973cd5.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/60c0973cd5.jpg alt="" %}
</figure>

View File

@ -0,0 +1,14 @@
---
title: Walt & Mickey
date: 2019-05-26T17:44:15-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/b02258dd49.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/b02258dd49.jpg alt="" %}
</figure>

View File

@ -0,0 +1,14 @@
---
title: Big Finale
date: 2019-05-30T18:40:42-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/2392282ca4.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/2392282ca4.jpg alt="" %}
</figure>

View File

@ -0,0 +1,14 @@
---
title: Happily Ever After
date: 2019-05-30T18:41:13-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/fe0062e4fd.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/fe0062e4fd.jpg alt="" %}
</figure>

View File

@ -0,0 +1,16 @@
---
title: Calm before the storm
date: 2019-06-02T23:04:03-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/c756a2987f.jpg"
---
As I cycled back after taking this photo, the heavens opened and I got drenched!
<figure class="photo">
{% picture photo-square blog/microblog/c756a2987f.jpg alt="" %}
</figure>

View File

@ -0,0 +1,14 @@
---
title: Who ya gonna call?
date: 2019-06-15T21:33:49-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/e6d8ccd0d8.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/e6d8ccd0d8.jpg alt="" %}
</figure>

View File

@ -0,0 +1,14 @@
---
title: Brompton World Championship USA
date: 2019-06-17T13:27:36-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/40132ffef6.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/40132ffef6.jpg alt="" %}
</figure>

View File

@ -0,0 +1,15 @@
---
title: The loudness of American airports
date: 2019-06-25T09:57:45-04:00
layout: micropost
categories: ["microblog", "blog"]
---
[Duncan Davidson](https://duncan.dev/posts/2019/05/europe-airports/)
> As soon as you arrive in the United States from overseas, people are yelling
> at you. First, theyre telling you which queues to use depending on which
> passport you have. Somehow, the printed signage doesnt suffice, though I have
> a hard time believing that uniformed officers quickly barking orders at people
> is of much use to a foreign-language speaker.

View File

@ -0,0 +1,14 @@
---
title: Take better selfies
date: 2019-06-29T14:34:17-04:00
layout: micropost
categories: ["microblog", "blog"]
---
[Aanand Prasad](https://medium.com/@aanand/take-better-selfies-26089b2b3e4e)
> We ignore the effects of unchecked masculinity on us at huge cost. Its
> poisoning us quietly, from youth through adulthood, stifling us, making us
> both harmed and harmful. Its on us to end this, and it starts with radical
> self-love. Lets be beautiful and vulnerable together.

View File

@ -0,0 +1,14 @@
---
title: Brommie on the beach
date: 2019-07-05T16:24:15-04:00
layout: micropost
categories: ["microblog", "photos"]
image: "blog/microblog/2d443b5316.jpg"
---
<figure class="photo">
{% picture photo-square blog/microblog/2d443b5316.jpg alt="" %}
</figure>

68
scripts/microblog_import Executable file
View File

@ -0,0 +1,68 @@
#!/usr/bin/env ruby
require "date"
require "fileutils"
require "json"
require "pathname"
require "nokogiri"
MICROBLOG_JSON_FILE = "_import/microblog/feed.json"
json = File.read(MICROBLOG_JSON_FILE)
data = JSON.parse(json)
data["items"].each do |item|
images = []
categories = ["microblog"]
published_at = DateTime.parse(item["date_published"])
body = item["content_text"]
title = item["title"] || body.split(/(\n|\.)/).first
parsed = Nokogiri::HTML.parse(body)
parsed.css("img").each do |tag|
images << tag[:src]
photo_filename = tag[:src].split("/").last
FileUtils.cp(
"_import/microblog/#{tag[:src]}",
"_pictures/blog/microblog/#{photo_filename}",
)
body = body.gsub(/<a.+img.+src="#{tag[:src]}".+\/a>/, <<~PICTURE)
<figure class="photo">
{% picture photo-square blog/microblog/#{photo_filename} alt="" %}
</figure>
PICTURE
categories << "photos" unless categories.include?("photos")
end
categories << "blog" unless categories.include?("photos")
contents = <<~MD
---
title: #{title}
date: #{published_at}
layout: micropost
categories: #{categories}
#{images.first ? "image: \"blog/microblog/#{images.first&.split("/")&.last}\"\n" : ""}---
#{body}
MD
if title.nil?
slug = "untitled"
else
slug = title.downcase.gsub(/[^a-z0-9]+/, " ").strip.gsub(" ", "-")
end
post_filename = "_posts/#{published_at.strftime('%Y-%m-%d')}-#{slug}.md"
File.open(post_filename, 'w') do |file|
file.write(contents)
end
end