A portrait of Mohamad

Hello, I'm Mohamad Tarhini

I am a web developer, physicist and data analyst based in France. That’s my photo on the top . The two little icons in the top left of the screen are my social media links if you want to contact me. The rest of the website can be accessed via the next large buttons. Scroll down to see what I have learned today, or yesterday, or a month ago..

Today I Learned

  • 8Apr2021

    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>
  • 2Mar2021

    You can display a GitHub code in VS Code using the open source library github1s. You only need to add 1s after github 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
  • 8Jan2021

    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.

  • 26Dec2020

    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" />
  • 12Oct2020

    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 />
  • See all TIL posts