Patrick Weaver: Blog

フィード

記事のアイキャッチ画像
IRL HTML Is the Place For Your Most Hand-Written Websites
Patrick Weaver: Blog
Last year before HTML Energy's HTML Day in San Francisco I had the idea to iterate on some of my previous projects like Whiteboard Email, and make both an app that would do OCR on HTML, and a website to host truly “hand-written” HTML. That became IRL HTML and it was good enough to make some very simple websites!The published website and the hand written source code, we realized that some letters were more recognizable as upper case, some as lower case.The first prototype of IRL HTML used Tesseract.js which is only reliable for typewritten text. Given my success with album covers I tried the Google Vision API, which worked well enough for some (carefully) hand-written HTML, but still made a lot of errors, which might prevent the page from rendering at all.A lot of the projects I’ve done over the years have used computer vision in creative ways, and I’ve always been searching for more reliable ways to have computers read hand-written text. At a Recurse Center meetup in SF in January 2024
1年前
記事のアイキャッチ画像
Unravelling an iMessage URL Parsing Mystery
Patrick Weaver: Blog
I have long been a fan of frontend-only websites, usually single-page apps, that are able to persist state in sharable URLs despite not having a database or a backend. One of the more complex projects I used this technique for was my Crossword Puzzle Editor, which stores an entire puzzle, both clues and correct answers in the URL hash.However, when I composed a small puzzle and shared it with a friend via iMessage I was greeted with a link to the app with empty state above a long string of random characters in a blue bubble:I tried again with a smaller puzzle and got the same kind of broken link, but it couldn’t just be the length of the URL because surely all of the tracking URLs used in every marketing email wouldn’t break like this. I tried one of a similar length, it sent flawlessly and rendered as a clean link preview, not the jumble of query string params it really was. I looked closer and noticed that the tracking URL had one visible difference from my crossword URL: it had “-”
1年前
記事のアイキャッチ画像
A Blog Post With Every HTML Element
Patrick Weaver: Blog
section > ul { padding-left: 0; } section > ul > li { display: inline-block; } section > ul > li::after { content: ', '; } section > ul > li:last-child::after { content: ''; } .confetti { position: fixed; font-size: 3rem; top: 50px; } #pw-links-portal { width: 300px; height: 200px; margin: 0.5rem; } .very-long-url-wrapper { max-width: 100%; overflow: scroll; padding-bottom: 1rem; } #weird-table { border: 5px double #8f8f9f; padding: 5px; } #weird-table .low-numbers { background-color: #ff4f2f4f; } #weird-table .high-numbers { background-color: #2f4fff4f; } #weird-table th { background-color: #2fff2f1f; } #weird-table th[scope='row'] { background-color: #2fffff1f; text-align: left;} #weird-table th, #weird-table td { border: 2px solid black; padding: 5px; min-width: 40px; text-align: center; } #weird-table th:nth-child(1), #weird-table td:nth-child(1) { border: none; } #weird-table th:nth-child(2), #weird-table td:nth-child(2) { border-radius: 3px; } #weird-table th:nth-child(3), #weird
2年前
記事のアイキャッチ画像
Alphabetic Internet Time: A Time Zone for the Internet
Patrick Weaver: Blog
In the Fall of 2020 I participated in a 12 week batch at the Recurse Center. While I had a lot of previous experience working remotely, both before and during the pandemic, RC was the first time where I was communicating with people in more than 1 or 2 other time zones. I now work at a fully remote company, mostly spread over the 4(ish) U.S. time zones, but with a few people permanently or temporarily in other places.Communicating across time zonesRC when I was there (mostly I would guess because their software was designed and configured for in person retreats in NYC) operated for the most part in Eastern Time, although I see from my limited participation in the community as an alum that this may have shifted, especially thanks to Zulip’s time-zone-relative timestamp support. RC had transitioned to hosting Recursers remotely a few months before my batch, which is how they continue to operate now in Summer 2022. At my current job we often default to either Eastern Time or Pacific Time,
3年前
記事のアイキャッチ画像
How to Set Up a Raspberry Pi as a Home Web Server
Patrick Weaver: Blog
Like most of the world, I’ve been spending a lot of time at home lately. Over the winter I was experimenting with building my own web-based digital tools, like an app to track articles and books I was reading. I initially thought I would need to buy hosting space to have the app accessible, but realized I mostly needed to use it when I was at home anyway, so a URL that only existed on my local network work also work.I have done a few projects with Raspberry Pis before, most notably a computer vision “record player”, but always found myself looking up the same things like how to set up Wi-Fi and SSH access. I seemed to need to do the same handful of things every time, but they were spread across various documentation and how-tos. This time while setting up the Pi web server I took notes so I would have it all in one place.To follow along with these steps you will need a second computer to set up the SD card (though you could probably start with a preformatted SD card also), and any kind
4年前
記事のアイキャッチ画像
Participating in a Remote Batch at the Recurse Center
Patrick Weaver: Blog
Participating in a batch at the Recurse Center is something that I’ve thought on-and-off about doing since I found out about it (then called Hacker School) sometime between 2013 and 2015, but it just never seemed like the right time to leave my job and its subsidized health insurance until I was laid off (what turned out to be) early on in the pandemic. I had as recently as January 2020 been thinking, “maybe now is the right time to finally quit and do it,” and though I’m relieved I was able to get a few more months of savings and health insurance into 2020, participating in RC was the perfect change of pace and a motivating bridge between employment and the job search.Screenshot from recurse.comI had been working from home at my old job from mid March to when I left in mid July, but I didn’t realize until my first day at RC, that even though I had frequently seen friends and coworkers on video calls and in outdoor settings for the past 6 months, it was rare that I had the chance to sp
4年前
記事のアイキャッチ画像
Making a Real-Time NYC Subway Map with Real Weird NYC Subway Data
Patrick Weaver: Blog
Earlier this week the NYC MTA released a new digital-first map. The Curbed exclusive that announced its release accurately portrays it as a strange child of both the 1972 map design by Massimo Vignelli and the current “paper” map. One feature of the new map (though it’s harder than it should be to notice at first) is real-time visualizations of each train in the system.I’ve been working on a similar concept, starting in February 2020, on which progress stalled once I stopped riding the subway regularly in March. But, when I started my batch at Recurse Center I decided to pick up the project again. My inspiration for the map was the large TV screens that the MTA has installed in stations over the last few years, which frustratingly display the “paper” version of the map.Subway station TV (This is not a good photo, but it’s hard to take a picture of a screen underground)Over the past few weeks at RC the subway map has been my main focus, which is longer than I expected the project to tak
5年前
記事のアイキャッチ画像
Week 1 at Recurse Center: Two Approaches to Learning
Patrick Weaver: Blog
I just finished my first week as part of the Fall 1 '20 batch at Recurse Center. I tried to split my time between being social and building skills that I want to use for future projects. The social aspect of RC is interesting because this batch is being conducted remotely.My batch at RC started exactly 5 months after my last day in an office, and something I had been thinking about over the last few months, is that I haven’t met anyone new since early March when NYC shut down because of the pandemic. It’s been very refreshing to meet people again, even if it’s via video calls and chat. RC has created an online representation of their physical space we call "Virtual RC". Each of us have avatars we can move around the space, and there are permanent links to video call rooms that we can pop into for events or impromptu conversations. The Virtual RC experience pairs well with group chat organized into streams on different topics.My avatar hanging out in the "Shannon" room at Virtual RCOthe
5年前
記事のアイキャッチ画像
How to Download an Image from a Google Doc
Patrick Weaver: Blog
For some reason Google hasn’t built in a way for you to download images in Google docs! There are workarounds to get those image files like using Google Keep, or downloading your whole doc as a .zip file, but these have always felt like too many steps.And this is something that people really want! As Steve Krouse points out here, it is possible to get the real URL of the image in your doc (but confusingly, as soon as you click on the image to select it the URL becomes obfuscated!). I also noticed the URLs in the source, and decided to make an easy way to access it. The one trick ended up being, because clicking on the image made it disappear, finding a way to tell the code which image you wanted!I looked through some JavaScript documentation and realized I could use the mouseover event to detect when someone was hovering over the image. Unfortunately this means that it won’t work on a touchscreen device, but I’m guessing that most people who want to download an image are on a tradition
5年前
記事のアイキャッチ画像
I Could Never Remember How to Make a Simple S3 Upload Feature So I Wrote It Down
Patrick Weaver: Blog
Whenever I start a new web project there is an ominous, literal, figurative, "cloud" lurking on the horizon: Will this project get complicated enough to need to be connected to S3 for file upload?More often than I’d like the answer is yes, and at this point I’ve re-learned how to connect a Node.js app to S3 more times than I’d like. Rather than keep learning just enough S3 to get a project working, and then instantly forgetting it, I decided to write the process down so I can follow my own instructions.I’m sure this will also find its way to people who know more than I do and might be able to alert me to anything I’m doing wrong. If this is you, please reach out!Setting Up AWS AuthenticationConnecting an app isn’t usually the most difficult part of setting up S3. Where I always have to go back to documentation is setting up user and bucket permissions correctly. When I first started using S3 around 2013 a common recommendation was to just set buckets to public and link to objects direc
5年前