Hacker Newsnew | past | comments | ask | show | jobs | submit | phpdave11's commentslogin

It shouldn't be too difficult to add support for this. I authored a Go library which adds support for importing PDFs into a new PDF generator (either gofpdf or gopdf). It is around 2,500 lines of code: https://github.com/phpdave11/gofpdi


I am using an alternative which doesn't require any additional browser extensions, but it does require that each client installs a custom root certificate.

I have a split-DNS setup where I override the DNS entries for certain sites like reddit, twitter, and youtube so that they point to a local server. The local server returns privacy-friendly versions of those sites (e.g. spikecodes/libreddit).

I use the root certificate to sign SSL certificates for those domains which will be trusted by each client on the network as long as they've installed the custom root certificate.

That way, when I visit a reddit link from a google search, it automatically returns the privacy friendly version of the site, as long as the root certificate is installed.

This is especially nice using when using iDevices, because those don't support native browser extensions.


> I have a split-DNS setup where I override the DNS entries for certain sites like reddit, twitter, and youtube so that they point to a local server.

Neat setup but exercise caution with the root-cert (I guess cert pinning isn't a thing on Browsers, yet?).

> I am using an alternative which doesn't require any additional browser extensions... This is especially nice using when using iDevices, because those don't support native browser extensions.

I use ghostarchive.org to view YouTube videos (that fit its limits), nitter.net for twitter threads, and archive.is for reddit threads.


> I guess cert pinning isn't a thing on Browsers, yet?

Locally installed root certificates override HSTS. Some regulated industries like banking are legally obligated to unwrap all TLS traffic, so locally installed roots allow for that.


This is a very interesting approach. I've been wanting a way to filter YouTube videos on my Apple TV so that only certain channels are whitelisted (my kids like to yell "butt" and "poop" at Siri which is... problematic). Seems like a custom root certificate would make this possible.


iOS does support browser extensions since iOS 15


Only on Safari.


Orion browser support Firefox and chrome extensions


This was really educational! I love the design of the webpage, and I especially like how you can rotate the 3d diagrams and see each component from every angle.


If anyone is looking for a hands on educational model, my 6 year old and I put together a model V8 engine [1] (made by Haynes of technical manual fame I think) that does a pretty reasonable job of capturing the essence of the main parts of an internal combustion engine. It kept him (and me) thoroughly engrossed for a few hours.

[1] https://www.themotorbookstore.com/build-your-own-v8-engine-m...


I had no idea until I read your comment that you could click and drag the engine models! Insane!


The text immediately before the first image says “You can drag it around to see it from other angles”. Our attention spans are deteriorating quickly…


Ditto. Thanks.


I wish I could still compile XMMS from ports on FreeBSD. It seems to have been removed because glib12 is obsolete.

Thanks for letting me know about QMMP. Looks like it can be built from ports: https://www.freshports.org/multimedia/qmmp-qt5


It's really not that difficult if you read and understand the PDF specification. As a learning exercise, I created a simple PDF generator library that creates ASCII PDF documents (you can open them in Notepad) and includes comments about what each drawing instruction does.

https://github.com/phpdave11/davepdf


I'm sure generating PDFs is much easier than reading them, such that "it just works" with any kind of PDF.


Reading them is also easy. I wrote a library that reads PDFs and imports page(s) from an existing PDF into a new PDF as a Form XObject.

https://github.com/phpdave11/gofpdi


I like how the title of the article has a hidden scroll bar (reading on iPhone).


the whole page too; it starts with:

  <body style="overflow: scroll;">
    <div style="overflow: scroll;">
      <div style="overflow: scroll;">
        <div style="overflow: scroll;">


Indeed. I just set scrollbars to always show on my Macbook per the author's suggestion and there are 4 scrollbars on their page!

Makes me wonder if I'm missing the point of the fairly simple post?


That's clearly intentional to make the point. Made me appreciate the article more.


Ah! It's only on that post, not the rest of the site. Clever.


PHPStan is a great tool. In addition to PHPStan, I also use phpnsc (name space checker) to check for missing use statements, php-cs-fixer (code style fixer) to ensure the code adheres to my code style, phpcpd (copy paste detector) to detect duplicate code, and phpmd (mess detector) to find potential problems in the code. These are all set up in my CI pipeline so that my app will fail to build if any of these 5 tools detect a problem. It has saved me from deploying buggy code several times.


Here’s a GitHub repo and Docker image with lots more static analysis tools to play with:

https://github.com/jakzal/phpqa


Great advice and thank you for sharing! Do you have a Dockerfile or CI config/recipe that you could share?


Here's the bash script I use to do the code validation. It's called from within my Dockerfile.

https://gist.github.com/phpdave11/412893f8366cab0afa85e81a7a...


Makes sense, thanks for sharing!


You can use Mercurial with GitHub by using the hg-git plugin, which lets you push to and pull from a Git server repository from Mercurial.

It’s a really nice tool that I’ve been using for several years to push to git repositories.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: