#dev 2021-10-02
2021-10-02 UTC
hendursaga and oodani joined the channel
# plindner[m] more fun with jq and shpub:
# Loqi [Paul Lindner] Hacker News Ingested
Here's some q&d scripting to pull your comments into a bunch of shpub commands. You'll need to edit some of the quoting, but it works well!
curl https://hnrss.org/threads.jsonfeed?id=lindner |jq > hackernews-plindner-threads...
# plindner[m] curl https://hnrss.org/threads.jsonfeed?id=lindner |jq > hackernews-plindner-threads.json
# plindner[m] cat hackernews-plindner-threads.json | jq -r '.items[]| "shpub note --html --syndication=" + .url + " --published=" + .date_published + " --name=\"" + .title + "\" - <<EOF\n" + .content_html + "\nEOF\n\n"'
alex11, maxwelljoslyn[d] and Poorchop joined the channel
# Poorchop has anyone been able to successfully send mentions to micro.blog endpoints (https://micro.blog/webmention)?
# Poorchop I have sent a few and they never seem to show up or get acknowledged by the recipient
# Poorchop actually never mind, I just sent another one and it seems to have worked
# Poorchop unrelated but does anyone have an example of how one can have a back and forth conversation using a single permalink? like if I send a Webmention reply to someone and get a response, and then I want to tack on my reply from the same permalink
# Poorchop I'm thinking that I'd need to create a non-public folder of these additional replies where I mark my original permalink and the other person as my intended recipients, and then I send a mention to both myself and to the other person
# Poorchop thanks
hendursa1, Memicme, [marksuth] and KartikPrabhu joined the channel
# capjamesg[d] How do people manage multiple web projects? I have a few Flask apps I’d like to run and would love to keep them all on one server.
# capjamesg[d] I use PythonAnywhere for hosting four apps and it is more expensive then I would like.
# jeremycherfas I'm interested in the answers. People have said run things on a Pi but I get confused about how to make it accessible but keep it secure.
# capjamesg[d] Me too jeremycherfas.
# capjamesg[d] I like the idea of running an app on a Pi but security is a big concern.
# capjamesg[d] And I don’t keep computers on indoors when I go on holiday which would lead to quite odd periods of downtime.
# jeremycherfas So you want it on a remote server?
# jeremycherfas I believe that is actually eaiser, though I have not tried.
tetov-irc joined the channel
# nekr0z <capjamesg[d]> "How do people manage multiple..." <- A reverse proxy might be a solution if what you want is to run several web servers on one machine and have them available on, say, different subdomains. There are plenty of manuals on setting it up using common web server software (nginx, apache, etc)
KartikPrabhu and akevinhuang joined the channel
# capjamesg[d] nekr0z the concern is more how much memory the Elasticsearch instance on the same server would use up.
# capjamesg[d] I want to run six web apps on this server in total 😬
# capjamesg[d] Really? Wow. Well that solves that problem.
# capjamesg[d] I just knew that Elasticsearch can eat through a lot of memory.
# capjamesg[d] But using the same server is so much easier.
# nekr0z <capjamesg[d]> "Evgeny Kuznetsov the concern..." <- Yeah, that one's a hog. They don't even recommend running it on a machine with less than 8 GB RAM, and I gather it's for the case where Elasticsearch is the only thing the machine runs... https://www.elastic.co/guide/en/elasticsearch/guide/current/hardware.html#_memory
# capjamesg[d] Yeah. It’s running with the minimum recommended RAM right now.
# capjamesg[d] I suppose I could deploy my web apps on the crawler server. But when in use the crawler eats up most of the machine.
# capjamesg[d] Would a $5 / month cloud server be enough to host a few web apps?
# capjamesg[d] PythonAnywhere charges per app and soon I will have five apps to run. So their pricing isn’t scalable.
# capjamesg[d] Good to know Zegnat++
# nekr0z <capjamesg[d]> "Would a $5 / month cloud..." <- I host all I have on a $5/mo DO VPS (with the exception of indieweb-glue, that one's on Heroku). The only time I had issues was when I tried to stuff an IPFS node on the same VPS to have my site automatically mirrored to IPFS; I had to give up until the times they make IPFS behave memory-wise. Other than that, I've been running it for almost a year now, and I plan on adding more web stuff there
costledger_ and capablecable[d] joined the channel; costledger_ left the channel
# capjamesg[d] nekr0z++
# capjamesg[d] That is very helpful. I’m going to run everything on a $5 DO cloud server.
# capjamesg[d] That will be much cheaper than PythonAnywhere.
[snarfed] joined the channel
# [snarfed] looks like $5 per app if you use different accounts, https://www.pythonanywhere.com/pricing/ , but not really their intended model
# capjamesg[d] Admin tax is a factor on my mind.
# capjamesg[d] I went with PythonAnywhere for SSH access and the web interface.
# capjamesg[d] I’ll check out App Engine.
# capjamesg[d] GWG This was an issue for me.
# capjamesg[d] I think it return a JSON object with a message.
# capjamesg[d] Yeah. The code was 200.
# capjamesg[d] If anything a 200 itself would be fine.
# capjamesg[d] I just have a habit of adding response messages to my APIs.
# capjamesg[d] +1
hendursaga and [jgmac1106] joined the channel
# doosboox If I have a bunch of DOM elements sorted in a certain order, and then I fetch data and form another element that should be sorted somewhere into that sequence... Do I have to redraw the whole sequence or can I insert that element somewhere?
# capjamesg[d] GWG Are there any test cases yet? I don’t see anything on the Microsub.rocks website.
# capjamesg[d] doosboox I don’t know much about JS but I think you can insert elements before and after nodes.
# doosboox Like, say I have '<div>1</div><div>3</div><div>5</div>' and I fetch '<div>2</div><div>4</div>', can I insert those in order or do I have to rebuild the sequence?
# capjamesg[d] If every item in the list had an ID, you could find the place to insert it in.
# doosboox capjamesg[d]: I sort of think it's possible too... but in the real case I'd have to sort by timestamps
# doosboox actually... that's just an alphabetic sort since they're all the same timezone
# doosboox heh
# capjamesg[d] If div 2 had an ID, you could select it and then insert after.
# capjamesg[d] You can use document.getelementbyid() to get an individual element (the MDN examples don’t show this but it is appropriate for your use case).
# capjamesg[d] There might be a better way. I’m sure someone else can weigh in too 🙂
# capjamesg[d] GWG I’d love a test suite. I haven’t given my Microsub server as much attention as I would like but I hope to come back to it and add a few new features and test it a bit more.
shoesNsocks, akevinhuang2, chenghiz_, johs1, akevinhuang and tetov-irc joined the channel