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

Does anyone know how to reliably use Firefox from command line to take screenshots? It used to work well a few years ago but now it does not. For one, it asks that Firefox is already running and I need to kill it. This is surprising -- why can't two Firefox processes run at the same time?


It is whining about the shared use of your main profile directory. You can give it a temporary profile directory to more clearly express your intentions via "--profile=/tmp/$(uuidgen)" or similar. I'd guess you could even just straight up point <<env HOME=$(tmpdir) firefox --screenshot...>> for even stronger isolation


The CLI has long had `-noremote` for a long time to tell it you want a second Firefox. It's useful with `-ProfileManager` or `-P $profileName` for multi-profile workflows, which are out of fashion this decade, especially with Multi-Account Containers being able to do most of those workflows in the same browser window now with different tags. But some of us still have ancient profiles for ancient reasons and ingrained habits regarding them.

Ancient documentation: https://www-archive.mozilla.org/docs/command-line-args.html


  PROFILEDIR="$(mktemp -d)"
  firefox --no-remote  --profile "$PROFILEDIR" --screenshot $PWD/output.png https://xkcd.com
  rm -r "$PROFILEDIR"
(You don't have to create and destroy a profile directory every time, but it's cleaner to do that way and you need one per instance you're going to run anyways)


Script with Playwright?


Use playwright?


Is this true for the trained pilots as well?


It's next to impossible to know at night.

The only thing you have visually is direction / angular velocity.


And if you're on a collision course the other vehicle will appear motionless, with no change in direction.

If the airliners was approaching faster than the helicopter it could have been approaching from behind. How large is the field of view of a UH-60?


"How large is the field of view of a UH-60?"

Massive, you're practically against the glass. Visibility below is more obstructed than visibility above or to the sides.


From the radar tracking, they appear to have been at least somewhat head-on.

(Also at a low altitude in a large city ... lots of lights.)


I wonder if there's a support element that would have obstructed the field of view over a narrow angle. This has been the cause of automobile accidents when cars approach at just the correct speeds to keep the other vehicle behind the pillar at the side of the windshield.


Yes.



I have no skin in the game and rarely code in C++. My answer is: no.


Somewhat relevant, I use this little script to open front page of NYTimes daily morning on my macbook:

d=$(date +%d)

m=$(date +%m)

y=$(date +%Y)

wget -q https://static01.nyt.com/images/$y/$m/$d/nytfrontpage/scan.p... && open ./scan.pdf


I made an RSS feed of these front-page images a while ago if anyone wants to use them:

https://nytonline.net/rss



That's neat! I turned it into a one liner `rm todays_nyt.pdf; wget -q "https://static01.nyt.com/images/$(date +%Y/%m/%d)/nytfrontpage/scan.pdf" -O todays_nyt.pdf && open todays_nyt.pdf `


dmy=$(date +%d/%m/%Y)


"Very few things are an immediate success". Wise words.


This may be a good starting point: https://linuxupskillchallenge.org/


Thank you for your thoughtful suggestions. They are actionable and practical. Much appreciated.


More towards ML-powered products and services.


You might want to learn to find your way around

https://scikit-learn.org/stable/

the algorithms it uses are not the most fashionable but the stuff in

https://scikit-learn.org/stable/model_selection.html

and

https://scikit-learn.org/stable/modules/preprocessing.html

make the difference between successful and unsuccessful projects. Huggingface has nice (in a certain sense) tools for training and doing inference on small LLMs but is a train wreck when it comes to model selection and preprocessing. (To be fair a few years back I tried developing a general purpose trainer that worked for bigger models that scikit-learn would handle but did the model selection and preprocessing well and didn't like the answer I got)


I personally think planting more trees and coloring more surfaces white may be easier and cheaper.


Nope, Bill Gates believes we should bury trees instead.

https://www.technologyreview.com/2022/12/15/1065016/a-stealt...

Trees are naturally efficient at sucking down vast amounts of carbon dioxide from the air, but they release the carbon again when they die and rot on the ground. Sequestering trees underground could prevent this. If biomass burial works as well as hoped, it may provide a relatively cheap and easy way to pull down some share of the billions of tons of greenhouse gas that studies find may need to be removed to keep global temperatures in check in the coming decades.


This is a truly great idea. Putting great gobs of biomass and safely sequestering it underground is revolutionary. We'll need to put it deep enough that it won't decompose and we'll also meed to find a way to pressurize it to maximize the volume and prevent moisture intrusion. We probably want to put it near desserts where the naturally arid conditions will hasten the process of compaction. Perhaps we can get the Arab Countries on board?


You have to plant them first in order to have any to bury unless you are proposing further accelerating deforestation.


Planting more trees is not compatible with installing solar panels.


Both are totally fine, you'll be hard-pressed to find areas with canopy cover percentages that inhibit solar installations.


What? Why not? Is there a shortage of space where we can't reasonably grow trees but can install solar panels?


Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: