Readit News logoReadit News
midgetjones commented on Vimium – The Hacker's Browser   github.com/philc/vimium... · Posted by u/stefankuehnel
ilioscio · 10 months ago
I personally use neovim and something I love doing is :tabedit to create a new tab and then I slap a :term in there and baby you've got a fullscreen terminal in a separate tab right inside vim and get this, you can yank text from this buffer and easily move this between your terminal tab and the files you have open.

I think regular vim will do all this as well but I think maybe the commands are different?

midgetjones · 10 months ago
If you're in a terminal and want to edit just that command (and Vim is your $EDITOR), you can type `ctrl-x ctrl-e` and it will open your command in a buffer. Once you're satisfied, you can `:wq` and the edited command will be ready to execute in your terminal.

Not exactly your usecase, but a useful one nevertheless.

midgetjones commented on Julia Child's Kitchens   placesjournal.org/article... · Posted by u/tintinnabula
datpiff · a year ago
> Jamie Oliver started promoting first themselves and then others on Youtube

He had multiple TV cooking shows before Youtube even launched

midgetjones · a year ago
> The genius of this was that Jamie Oliver was of course famous
midgetjones commented on Show HN: Graphiti – LLM-Powered Temporal Knowledge Graphs   github.com/getzep/graphit... · Posted by u/roseway4
midgetjones · a year ago
Hi :) Cool project! Just FYI, there is already a fairly well-established project with that name.

https://www.graphiti.dev

midgetjones commented on The vagus nerve orchestrates the mind-body connection   quantamagazine.org/how-ou... · Posted by u/jandrewrogers
howmayiannoyyou · a year ago
After almost everything else failed I tried VNS for Restless Leg Syndrome. Didn't work either. Really had high hopes for it.
midgetjones · a year ago
Have you tried magnesium? I've found the oil spray applied to the soles of the feet effective.
midgetjones commented on Ask HN: What apps have you created for your own use?    · Posted by u/fuzztester
kej · 2 years ago
Kind of similar, in the early days of COVID, I accidentally discovered that my state's website would have test results available several hours before they sent out the "view your results" email. So I made a script that would check the site every five or ten minutes and then ping me as soon as the result changed to something besides PENDING.

In the course of that I stumbled on https://ntfy.sh/ which solved the notification problem without needing Twitter, and I've used it since then to let me know when long-running scripts complete.

midgetjones · 2 years ago
That looks great! I'm not sure it was available in 2018 when I looked. I tried a few options, but posting to twitter & subbing to the account was the quickest hack that worked reliably.
midgetjones commented on Ask HN: What apps have you created for your own use?    · Posted by u/fuzztester
fortydegrees · 2 years ago
I have a similar story of accessing an internal JSON API for my own benefit.

I left my airpods in a car I rented using zipcar. I spoke to support etc but nothing had been handed in. I checked to see if the car was still where I left it so that I could re-hire and claim them, but it had been moved.

The app tells you the 'name' of the car you rented which is used as an identifier. It also shows a map of where all available cars are. I sniffed the requests the app made to display this map, and was able to filter it by the car name. From this I was able to locate where the car I left my airpods in was. Was able to head there, unlock the car, and to my amazement the airpods were still there!

midgetjones · 2 years ago
That's amazing!
midgetjones commented on Ask HN: What apps have you created for your own use?    · Posted by u/fuzztester
teleforce · 2 years ago
This a great example on the usefulness of data availability via JSON API.

If the data is read only it's a GOOD thing especially for non-confidential data that are meant to be public, every government agency should open their public data like this.

midgetjones · 2 years ago
Absolutely! My original plan had been to scrape their website using Selenium or similar.

I quickly noticed that they had employed lazy loading, which would have made that all but impossible. It took me a good few minutes to realise that if they had lazy loading, there had to be a backend, and I was overjoyed when I found out it was serving JSON.

All in all, it was probably much cheaper for them to have me hitting the API endpoint every minute than scraping the website even once a day

midgetjones commented on Ask HN: What apps have you created for your own use?    · Posted by u/fuzztester
stevage · 2 years ago
How would you keep state of which pets have already been posted?
midgetjones · 2 years ago
Hi! I answered this in the other post, but the Postgres UPSERT was the key. By using a combination of attributes (It may have just been name & D.O.B), In a single operation I could figure out if the cat has been posted (and update the existing row), or create a new row.

This worked as there were only ever 30-50 cats online at one time. If it was a thousand, I'm not sure what I would have done.

Edit: I realise now this was a rhetorical question. Oops!

midgetjones commented on Ask HN: What apps have you created for your own use?    · Posted by u/fuzztester
bomewish · 2 years ago
Why not go straight from the json to Twitter?
midgetjones · 2 years ago
Good question!

The primary reason was to learn Elixir, so this was just a well-timed excuse to explore the language (and Phoenix, the web framework).

The secondary reason was that my wife was the main client, and she doesn't respond well to raw JSON. Each tweet would be just the cat's name, photo, and a link to the website. I also did some filtering as certain cats have safety requirements we couldn't meet, e.g. no neighbouring cats, no children)

One of the main issues I had to figure out early on, was "how do I distinguish which cats are new, compared to the previous response?". This was made harder because I couldn't rely on the ordering; occasionally previously-posted cats would have details updated and they would move position. Postgres UPSERT was new (to me, at least) at the time, and it seemed like a very handy way to offload the responsibility. There were never more than 50 cats listed at any one time, so it was reasonable enough to request all the animals at once, and let the database figure out which cats were new, based on a combination of identifiers that would make them unique. I could also filter the updated records to see _what_ had been updated, e.g. the cat had now been rehomed.

Another thing Elixir did really well was the polling mechanism. It's absolutely trivial to spawn a worker that can repeatedly perform a task and asynchronously hand it off to be processed.

Hope that answers your question!

midgetjones commented on Ask HN: What apps have you created for your own use?    · Posted by u/fuzztester
stitch4143 · 2 years ago
Great example of a pet project :)
midgetjones · 2 years ago
Well played!

u/midgetjones

KarmaCake day1268July 30, 2013View Original