© 2022 Hashnode
#snippets
This jQuery snippet makes a div clickable. HTML mocup <div class="tile tile-clickable"> <h2>Tile Title HERE</h2> <p>Duis Lorem mollit voluptate cillum velit est veniam mollit ex nulla et sunt.</p…
Snippet use Drupal\Core\Datetime\DrupalDateTime; use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface; // ... // Use the DrupalDateTime object to modify (or parse) datetimes. $datetime = new DrupalDateTime('now'); // Set the t…
Binary ? Binary is how a computer stores information, with 1s and 0s, called bits. an example of this is with a light switch. 0 = light off 1 = light on via GIPHY Multiple bits As you get more and m…
Vs Code is a famous code editor developed by Microsoft, if you never used it before, the time is now, and who stoped to use, make sure about it after you read the tips!! hahaha Here you’r going to get…
Sharing code is the most common activity of developers. We share code in several places online. We share it in public or private spaces. We share it to showcase, to explain, to debug, to collaborate,…
Snippet if (\Drupal::service('router.admin_context')->isAdminRoute()) { // ... } The router.admin_context service maps to the AdminContext helper class. isAdminRoute() simply checks the Route for the _admin_route option. Pitfalls When wo…
Bookmarklet 📜 Although the title is not exactly what I intend, it is what it is. So, what exactly is a bookmarklet? You can learn more about it here. In a nutshell, it is the javascript snippet that …
Code Snippets help developers share knowledge. However, searching and using code snippets is difficult because they lack context and information about how to use them. In this article, we explain the …
The <iframe> tag can be used to embed videos on a web page from external sources like Youtube/Vimeo. But it requires the width and height attributes to be explicitly mentioned, which can be an issue i…
Hi everyone... If you are a web developer or front-end developer, you have certainly heard about Codepen, which is one of the most famous websites that specialized in editing and testing HTML, CSS, an…