How to Implement and Use
- Initialize your project: If you haven't already, make sure you have a package.json and install Luxon:
npm init -y
npm install luxon
- Create the file: Save the code above as
explain-date.js. - Run the script:
How to Implement and Use
npm init -y
npm install luxon
explain-date.js.
| 'use strict'; | |
| const { faker } = require('@faker-js/faker'); | |
| const { DateTime, Settings } = require('luxon'); | |
| Settings.defaultZone = "utc"; | |
| console.info(`defaultZone zoneName ${DateTime.local().zoneName}`); | |
| const dt = DateTime.local(); |
| #!/bin/bash | |
| # Get latest from releases https://github.com/ungoogled-software/ungoogled-chromium-portablelinux/releases/latest | |
| api_endpoint="https://api.github.com/repos/ungoogled-software/ungoogled-chromium-portablelinux/releases/latest" | |
| # Go to the temp folder | |
| cd /tmp | |
| # Send a GET request to the API endpoint and extract the download URL of the tar.xz archive | |
| archive_url=$(curl -s $api_endpoint | jq -r ".assets[] | select(.content_type | test(\"application/x-xz\")) | .browser_download_url") |
| #!/bin/bash | |
| # Go to the | |
| cd /tmp | |
| # Download the latest Postman source archive | |
| wget 'https://dl.pstmn.io/download/latest/linux_64' -O postman.tar.gz | |
| # Extract the Postman source archive | |
| tar -xzf postman.tar.gz -C /tmp/ |
| #!/bin/bash | |
| # Go to the | |
| cd /tmp | |
| # Download the latest Discord source archive | |
| wget 'https://discord.com/api/download?platform=linux&format=tar.gz' -O discord.tar.gz | |
| # Extract the Discord source archive | |
| tar -xzf discord.tar.gz -C /tmp/ |
| #!/usr/bin/env bash | |
| # 'Wi-Fi' or 'Ethernet' or 'Display Ethernet' | |
| INTERFACE=Wi-Fi | |
| # Ask for the administrator password upfront | |
| sudo -v | |
| # Keep-alive: update existing `sudo` time stamp until finished | |
| while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & |
A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).