The purpose of this repo is to create some useful scripts using Deno runtime.
Deno is a simple, modern and secure runtime for JavaScript and TypeScript that uses V8 and is built in Rust.
Small script for compressing each file to a zip file, please modify the sourceFolder
, targetFolder
and FILE_EXTENSION
. All the original files will be compressed in the targetFolder
.
This won't run in other operating systems besides MacOS since it's using Deno.run
.
$ deno run --allow-read --allow-run compress_files.ts
...
adding: Bonk's Revenge (U).pce (deflated 33%)
adding: Blazing Lazers (USA).pce (deflated 47%)
...
- Source File - compress_files.ts
Retrieves a random quote from https://api.chucknorris.io/.
$ deno run --allow-net chuck_norris.ts
Chuck Norris' avatar is actually shorter than him.
- Source File - chuck_norris.ts
Generates a time based one-time password for a given secret at the current time.
For this to work, make sure you define an environment variable TOTP
with the secret or use a .env
and define
a TOTP
property.
$ deno run --allow-read --allow-env otp.ts
219323
- Source File - otp.ts
Web-Scrapper for Worten.pt web site products.
Make sure you have a file with the product links (one per line), check products.txt as an example.
$ deno run --allow-net --allow-read worten_check_products.ts products.txt
- Source File - worten_check_products.ts
- Products - products.txt