The heroku cli for some commands displays a nice looking "loading" animation and colours: ⣟, ⣯, ⣷, ...
In some logging systems, this is not well supported and pollutes them with:
[1A[13C⣟[1B[G[2K[1A[13C⣯[1B[G[2K[1A[13C⣷[1B[G[2K[1A[13C⣾[1B[G[2K[1A[13C⣽
Is there a way to disable these animations and potentially even colours?
It looks like if the TERM env var is set to dumb e.g. TERM=dumb then download progress is disabled, see:
https://github.com/heroku/cli/blob/master/packages/pg-v5/lib/download.js#L9
Perhaps it would be helpful if it was documented.
Related
I use Warp Terminal (and sometimes iterm2). Is there any way to show images in them while using neovim? I tried searching for some plugins online but the only one i found was Hologram, which seems to be only for kitty.
here's what the output looks like
You can use feh to view image in terminal.
If you want to do this inside Neovim, just use :!feh {file name}.png
I would like to run this D3 visualization
https://beta.observablehq.com/#mbostock/d3-zoomable-sunburst
as a standalone webpage, like this one here
https://bl.ocks.org/maybelinot/5552606564ef37b5de7e47ed2b7dc099
Does Observable have a function to export to a .html file? Or what would I need to change to make it standalone?
Sadly, it's not that easy any more.
They have "archived" bl.ocks.org and are pushing the adoption of ObservableHQ notebooks. You can actually embed notebooks with a little effort, but they are served from https://api.observablehq.com. There are other options, but nothing that lets you easily pull out the html, javascript and css and host it yourself, as bl.ocks.org did. At best, you'll have to cobble a bunch more stuff together now. One method is to click the top-right context menu on some notebooks and select Export > Download code. Another possible option is this tool.
< relevant-humble-opinion > I don't know if d3 bl.ock.org examples just got so good that the suits moved in... or if Mike Bostock (our story's hero) really believed we needed "dataflow"... but things look bad from here... nothing good seems to last... < /relevant-humble-opinion >
On an Observable example page, I clicked the triple three dots next to the fork option. Then chose export and then "download code".
I extracted the tar file to a folder on my machine. In the Readme it suggests that you run
$ npx http-server in a terminal, to run a local server on your machine.
Open up the location in your browser and it should show nearly the same thing as a web page. It should be close enough to what you are looking for.
Observable page used Reusable Choropleth Map
I'm trying to use emojione-apple.ttf from https://github.com/emojione/emojione/tree/master/extras/fonts on Heroku because the default font on Heroku (dejavu) doesn't have all the emoji.
I added the fonts on the ~/.fonts folder with this buildpack : https://github.com/GautierT/puppeteer-heroku-buildpack
When i render an HTML page to PDF with https://github.com/GoogleChrome/puppeteer it's seems that it's still dejavu fonts and not the emojione.
(Very low quality, weird "glasses" and "gear" emoji)
Thank you for your help. 🙂
I've used the android variant of emojione's font with degrees of success for browserless. I'm not sure what linux distro Heroku uses for their service, but you might have to consider an alternative provider if it's limited (Firebase functions and AWS Lambdas have similar constraints).
I created a buildpack to add native emoji support for a Heroku-18 stack (you can grab it here https://github.com/SimonBriche/heroku-buildpack-emoji-support) with the limitation of the emojis supported by the DejaVu font.
Long story short, the DejaVu font takes precedence over NotoColorEmoji for the emojis that it knows.
There is no clean workaround for that, besides replacing DejaVu by an other font that doesn't know any emojis (the best candidate would be Bitstream Vera) but it could lead to other (worst ?) side effects...
More details can be found in the readme of the repo.
HTH
I want to change the font in Squib.
How do I do this.
There is a font folder and also I can see where I set the font in the layout, do I need to set it anywhere else.
I'm wanting to use FiraSans-Regular.otf and FiraSans-Heavy.otf
At this point in time, Squib doesn't support loading fonts locally. You'll have to install the font on your system, and then do something like text font: 'FiraSans'. I generally keep my font files in my git repo just for portability.
Loading local fonts has been discussed by the Pango team (what Squib uses for text), and they are making the process less painful as I understand it. http://mces.blogspot.com/2015/05/how-to-use-custom-application-fonts.html. It will be a while until that translates to Ruby, as well, since cross-platform compatibility is hard when it comes to fonts.
I've created a GitHub issue to track on this if you want to follow it:
https://github.com/andymeneely/squib/issues/105
What command-line utility renders HTML as Firefox would, creating a
static image, without actually running Firefox and xwd (or ScreenGrab,
etc)?
Since all of Firefox's rendering libraries are open source, I'm
assuming someone's written something like this? It would be very
useful.
I realize static images can't have Flash animation (animated GIF/PNG
notwithstanding), JavaScript, etc, so I'm just looking for something
that renders plain HTML.
html2ps is worth a try, although it does not seem to use the css style sheets. This is a serious limitation.
On Debian/Ubuntu, it is provided as a package, so the classical sudo apt-get install html2ps will be fine.
(I know this has been given in the comments, but for the future reader, I thought it might be easier to find as an answer.)
You could write a small script which simply runs firefox using the command line options does a screen-shot, then closes firefox. Should only be about 3 lines of code to get started.
firefox -url http://mysite.com/homepage.php
https://developer.mozilla.org/en/Command_Line_Options