Coder Social home page Coder Social logo

deno-scripts's Introduction

Deno Scripts

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.

Compress Files

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.

Run:

$ deno run --allow-read --allow-run compress_files.ts

Output

  ...
  adding: Bonk's Revenge (U).pce (deflated 33%)

  adding: Blazing Lazers (USA).pce (deflated 47%)
  ...

Resources:

Chuck Norris

Retrieves a random quote from https://api.chucknorris.io/.

Run:

$ deno run --allow-net chuck_norris.ts

Output

Chuck Norris' avatar is actually shorter than him.

Resources:

OTP

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.

Run:

$ deno run --allow-read --allow-env otp.ts

Output

219323

Resources

Worten Check Products

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.

Run:

$ deno run --allow-net --allow-read worten_check_products.ts products.txt

Output

products output

Resources

deno-scripts's People

Contributors

mguilherme avatar

Stargazers

José Carvalho avatar

Watchers

 avatar James Cloos avatar José Carvalho avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.