Today I Learned
- 8Apr20218Apr2021
You can use an emoji as a favicon by turning it into an svg. This is supported by all modern browsers.
<svg xmlns="http://w3.org/2000/svg" viewBox="0 0 100 100"> <text y=".9em" font-size="90">đ</text> </svg>
- 2Mar20212Mar2021
You can display a GitHub code in VS Code using the open source library github1s. You only need to add
1s
aftergithub
and press Enter in the browser address bar for any repository you want to read.Example:
//github repository https://github.com/mdtarhini/cheat-sheet-maker //online vs code viewer https://github1s.com/mdtarhini/cheat-sheet-maker
- 8Jan20218Jan2021
In Bash, commands which begin with a space character are not saved in the history list. This can be useful if you want to avoid re-executing dangerous commands while accessing the history.
- 26Dec202026Dec2020
In HTML, you can use the
loading=lazy
attribute to defer the loading of images until the user scrolls to them.<img src="path/to/img" alt="alt text" loading="lazy" />
- 12Oct202012Oct2020
In HTML, you can use the attribute
autofocus
if you want an element to be focused by default. This attribute can be used for<button>
,<select>
,<input>
and<textarea>
<input type="text" name="input-name" autofocus />
- 21Sep202021Sep2020
The name of the python programming language was inspired by the BBC comedy series âMonty Pythonâs Flying Circusâ.
- 13Sep202013Sep2020
- 9Aug20209Aug2020
You don't need Javascript to accomplish smooth scrolling for web pages, there is a native css solution for this:
html { scroll-behavior: smooth; }