DDDeepak Dindpkd.hashnode.dev·Jan 27, 2025 · 4 min readJava ZonedDateTime SnippetsInstantiation methods now() and now(ZoneId zone) // Current datetime from system clock with system's default timezone ZonedDateTime nowDefault = ZonedDateTime.now(); // Current datetime from system clock in UTC ZonedDateTime nowUTC = ZonedDateTime.n...00
DDDeepak Dindpkd.hashnode.dev·Jan 27, 2025 · 2 min readDatetime Time-saving FactsQuick pointers on the formats and standards to be aware when working with date and time data. Epoch Time (Unix Time/Posix Time) The number of seconds elapsed since 01 Jan 1970 midnight Integer value without timezone. i.e., it represents UTC timesta...00
DDDeepak Dindpkd.hashnode.dev·Dec 24, 2023 · 4 min readBash Scripting IdiosyncrasiesShell scripting in bash isn't walk-in-the-park, even for those experienced in C, Java or Python. It's largely due to the quirks we need to accommodate for Bash's "simple" approach to interpreting the context. Assignments (=) mustn't have space The sp...00
DDDeepak Dindpkd.hashnode.dev·Dec 20, 2023 · 1 min readDownloading YouTube Playlist in CLI using yt-dlpyt-dlp is a handy CLI tool for downloading videos from YouTube, especially the playlists. We can download an entire playlist like so: 1. Get the playlist identifier from the URL For example, the playlist identifier of Babbar's DSA course is the value...00
DDDeepak Dindpkd.hashnode.dev·Nov 19, 2023 · 1 min readProvisioning MongoDB Container using Docker-ComposeWhat follows are the steps to get MongoDB container up and running, with the emphasis on docker-compose.yml file and configuration options. 1. ".env" - File with environment variables MONGO_ROOT_USER=mongo MONGO_ROOT_PASSWORD=mongo TZ=Asia/Kolkata PO...00