I have a program that creates a html file as standard output. To view it in vim I just need to:
$ foo2html foo | vim -
vim will be launched with stdin read-in for viewing. Once I close vim the command will return.
Is there some combination of command-line switches that will make google-chrome do this?
Highlight the icon for a file with the extension you want to re-associate and press "Command-I" on your keyboard. In the "Get Info" window, expand the "Open With" section and select a new application to use as the default for launching these types of files.
Watch a video across Chrome tabsYou can play a video from one tab in a smaller window on top of other tabs you browse. In a tab, play a video.
Just use data URIs:
# google-chrome
echo '<h1>hello</h1>' | google-chrome "data:text/html;base64,$(base64 -w 0)"
# firefox (it will not automatic open since version 89, you must go to url and press enter)
echo '<h1>hello</h1>' | firefox "data:text/html;base64,$(base64 -w 0)"
# chromium
echo '<h1>hello</h1>' | chromium "data:text/html;base64,$(base64 -w 0)"
# opera
echo '<h1>hello</h1>' | opera "data:text/html;base64,$(base64 -w 0)"
# Default browser (in debian systems)
echo '<h1>hello</h1>' | x-www-browser "data:text/html;base64,$(base64 -w 0)"
The command base64 is available from coreutils on debian like systems
sudo apt-get install coreutils
If you not have coreutils installed or you cannot install new packages, you could use the python module base64 (virtually any distro has python)
echo '<h1>hello</h1>' | google-chrome "data:text/html;base64,$(python -mbase64)"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With