dpkd.hashnode.devJava 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...Jan 27, 2025·4 min read
dpkd.hashnode.devDatetime 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...Jan 27, 2025·2 min read
dpkd.hashnode.devBash 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...Dec 24, 2023·4 min read
dpkd.hashnode.devDownloading 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...Dec 20, 2023·1 min read
dpkd.hashnode.devProvisioning 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...Nov 19, 2023·1 min read