Skip to main content
The 2024 Developer Survey results are live! See the results
59 votes

correctly sizing PNG images in markdown with pandoc for html/pdf/docx

Dimensions are converted to pixels for output in HTML-like formats. Use the --dpi option to specify the number of pixels per inch. The default is 96dpi. Find the most common element in your pictures ...
BloodyEl's user avatar
  • 1,058
53 votes

Why does my browser attempt to download pages from http://clhs.lisp.se instead of viewing them normally?

There is something wrong with the way that website and/or web sever is delivering web pages. This is not a problem on your end but rather something odd on the server side; with either the website ...
Giacomo1968's user avatar
  • 56.2k
29 votes
Accepted

How long until an old website visitor sees new web design?

How long before a website visitor sees a new website design without force refresh? Assumption: There are no cache settings in the HTML page It depends on the browser cache settings. Note: The ...
DavidPostill's user avatar
  • 159k
25 votes

Is it possible to take a screenshot of a web page as an SVG image?

I wrote an open source browser extension that does exactly this. It works by traversing the DOM and converting elements to SVG elements, using the styles and coordinates computed by the browser. The ...
felixfbecker's user avatar
20 votes

How to configure the default app to open tel: links in MacOS X?

You can change this without an extra app via the preferences in FaceTime. On the Setting tab change the last entry "Default for calls" to Skype. At least this way works for Skype for Business.
Michael Koegel's user avatar
16 votes

Downloading blob image

You just need to create your own element using the image source of the image you want to download, so as a basic example: var image = document.querySelector('img'); // Image you want to save ...
miknik's user avatar
  • 261
14 votes
Accepted

How to show the whole file name while using .htaccess to list files in a directory?

Easy! Just use the Apache IndexOptions directive in addition to Options +Indexes in the .htaccess file. In your case this would be simple enough to show the full names of files: Options +Indexes <...
Giacomo1968's user avatar
  • 56.2k
14 votes
Accepted

Emptying HTML tags with sed

* is greedy, so <.*> matches everything from the first < to the last > in the line. Some tools understand *? as non-greedy analogue of *, but not sed. In your case one can still go with ...
Kamil Maciorowski's user avatar
13 votes

Transform linked images to embedded images

In Word 2010: Click File > Info > Edit Links To Files (Edit Links is in the Related Documents section on the bottom right). This opens the Links dialog. Select all the links in Links dialog, and ...
Ags1's user avatar
  • 231
13 votes

How to take a screenshot of an entire scroll element?

From Chrome dev tools > Device Toolbar, you can focus the required element and click on Capture full size screenshot.
Naga Kiran's user avatar
13 votes
Accepted

Link to a specific part of a webpage, if the author didn't create #named anchors within it?

You can link to any text on any page using the general form: https://domian.com/page.html#:~:text=some%20phrase
Peter Kionga-Kamau's user avatar
12 votes
Accepted

How to configure the default app to open tel: links in MacOS X?

You can change it using a utility called RCDefaultApp - freeware - which installs as a Control Panel. It's old but still works right up to El Capitan [I've not tested on Sierra but see no real reason ...
Tetsujin's user avatar
  • 50k
12 votes
Accepted

How to get Sublime Text 3 to automatically highlight CSHTML as HTML

You can install the HTML (C#) via Package Control, that extends HTML highlighting for C#-specific tags and logic blocks. Historic Answer Open any .cshtml file In the main-menu, choose View > ...
idleberg's user avatar
  • 1,352
12 votes
Accepted

How to take a screenshot of an entire scroll element?

OK. I had an insight and could solve the problem, hehe. I went to div properties and changed the 'height' in CSS to 500%. Voilà! Then I could use "Screenshot Node" feature on Firefox. It was not ...
Eduardo M's user avatar
  • 490
11 votes
Accepted

Make pandoc ignore css style class

If you use pandoc -f html -t markdown_github-raw_html reduced.html -o res.md it solves the problem. markdown_github reduces the set of outputs to ignore the CSS -raw_html removes the raw_html ...
Seanny123's user avatar
  • 391
11 votes

Windows deletes HTML files when I delete a folder

How do I delete the folder without deleting the HTML file? Explorer Rename the folder before deleting it. This includes: Removing the _files portion of the name at the end of the folder. Renaming ...
Anaksunaman's user avatar
  • 17.5k
10 votes

How to get code block with syntax highlighting into LibreOffice Writer

Libreoffice extensions There are several extensions that allow to highlight a code snippet. You can search for them in extensions.libreoffice.org. Among the others code highlighter code ...
Hastur's user avatar
  • 19.1k
9 votes

How to download a file from a URL?

For Powershell, this example works great: invoke-webrequest -uri http://files.animatedsuperheroes.com/themes/spiderman94.mp3 -outfile "c:\Spiderman94.mp3" This was confirmed with Win10 x64 1607.
semtex41's user avatar
  • 1,025
9 votes

UTF-8 Angle brackets up and down?

You could use: &#xfe3f; / &#65087; : ︿ aka «Vertical Left Angle Bracket», ref &#xfe40; / &#65088; : ﹀ aka «Vertical Right Angle Bracket» ref Logical and and logical or ...
user3342816's user avatar
9 votes

Emptying HTML tags with sed

Just rename all nodes to empty strings and delete all attributes using xmlstarlet: xml ed -r '//*' '' -d '//@*' This will add an XML header (<?xml version="1.0"?>) and leave a slash ...
Dmitry Grigoryev's user avatar
9 votes
Accepted

How to save a Hugo site as HTML files?

I have run hugo server -D. For clarity, hugo server -D will not create .html files. It only serves files on the fly (as you suggest in your original question). To generate .html files in the public ...
Anaksunaman's user avatar
  • 17.5k
8 votes

Command-line CSS selector tool

https://github.com/ericchiang/pup (https://github.com/htmlparser/htmlparser) has a CSS-based query language that conforms closely to your example. In fact, with your input, the following command: pup &...
peak's user avatar
  • 181
8 votes

Why does my browser attempt to download pages from http://clhs.lisp.se instead of viewing them normally?

You can try ModHeader. After install you visit the root of the site, click on the extension icon, then on the plus sign, response header and type Content-Type. Happy browsing of that site. You can ...
Eduardo Trápani's user avatar
7 votes

Using bash to export a comma separated list to html

Your quoting is wrong, specifically the double double-quotes. Let's break down what you have, the bits concatenated together echo ""<tr onmouseover="this.style.backgroundColor='#ffff66';""; the ...
glenn jackman's user avatar
7 votes
Accepted

Visual Studio Code shortcut to wrap HTML element into container tag

I don't know if there's an extension that does your exact 2 steps, but here's a very way to do it in 3: Select a HTML tag, collapsed or not - doesn't matter. Press hotkey for editor.emmet.action....
Destroy666's user avatar
  • 7,370
6 votes

Why does my browser not display the index.html file when I type a directory in the URL?

Because you are accessing it with a file:// reference and it is not being served by a webserver. The fact that you can go to a directory and get a default file is part of the webserver config - ...
ivanivan's user avatar
  • 2,962
5 votes

How to configure the default app to open tel: links in MacOS X?

That FaceTime setting is still available on Mojave. FaceTime/ Preferences/ Settings/ 'Default for calls' popup list
Anonymous coward's user avatar
5 votes

Get links from an html page

Install lynx, then: lynx -listonly -nonumbers -dump input.html > links.txt Make sure that your input file has a .html extension. For example: $ cat test.html <a href="http://superuser.com"&...
slhck's user avatar
  • 230k

Only top scored, non community-wiki answers of a minimum length are eligible