teleren/devto huggingface dataset:
A better way to launch Deno with many command options
Tags: deno, options
Published: 2020-05-30 00:36:24

Deno, like many other compiler or script runners, can require a complex list of options to type in at the command line.  I wanted an easier to way run Deno.

I created [Zap](https://deno.land/x/gh:deno-nonstd:zap) as a way to solve that problem (currently MacOS but I'm currently updating it to run on Windows -- stay tuned). Zap uses a configuration file to store all the options and launches Deno using them.

It also loads .env files to load environment variables.

To install, type:

```sh
$ deno install -Af -n zap https://deno.land/x/gh:deno-nonstd:zap/app.ts
```

>NOTE: If you haven't previously added /.deno/bin to your $PATH variable, then you will need to or Deno won't run the utility.  It seems to be different for everyone (even on OSX) but this worked for me:

> `$ echo '/User/<name>/.deno/bin' | sudo tee /etc/paths.d/deno`

> Then any NEW command window or app started will see the path.


To use, Instead of typing:

```sh 
$ deno run --allow-env --allow-net=google.com,deno.land --allow-read unstable app.ts
```

You can provide a config file like this (default name is `launch.yaml`):

```yaml
deno:
  run:
    main: app.ts
    dotenv: main.env
    security:
      allow-env: true
      allow-read: true
      allow-net:
        - google.com
        - deno.land

  install:
    main: app.ts
    security:
      allow-env: true

    options:
      force: true
      name: sampleApp
```

Notice there is a `run` and `install`.  Each is called a _profile_. You can configure each of them separately.

You can launch your app now like any of the below:

```sh
$ zap run
```

Or 

```sh
$ zap install
```

And Zap will do the rest.

To initialize with a default profile, type:

```sh
$ zap init launch.yaml
``` 

And it'll put a default file there named `launch.yaml`.  `launch` is the default name that Zap looks for, so you won't need to provide it when running.

If you want to initialize a .dotenv file, just type:

```sh
$ zap init dev.env
```

And it'll create a file with that name.  You can tell zap to load from the .dotenv file with an option named `dotenv` like this:

```yaml
deno:
  run:
    main: app.ts
    dotenv: main.env
    ...
```

You can configure and use any of the valid Deno subcommands.  The format for a launch file looks like this:

`File Name: launch.yaml`
```yaml
deno:
  <command> # run, install, cache, test, fmt, etc
  main: <starting file name>
  dotenv: <file name> # if desired
  security:
    allow-all: true # true for on, empty for false
    allow-net: true # true for blanket enable OR...
    allow-net:
      - google.com
      - deno.land.  # to whitelist 
    ...             # any valid security option (--allow-...)
  options:
    ... any valid option, using same rules as above

```

There's a ton of more features currently in the works such as:

* Embed zap into your own app
* Add new features via extensibility
* Daisy chaining and conditions pre/post launch

You can find the github repo [here](https://github.com/deno-nonstd/zap).  This is an early release.  Contributions are welcome if you're interested to help out.
Day 143 : All Love
Tags: hiphop, code, coding, lifelongdev
Published: 2020-05-29 22:32:26

liner notes_:
- Professional : Pretty chill day. Had a team meeting. Turned in an outline for a workshop that I'll be doing. Spent the rest of the day, researching for feature parity between the different platforms.

- Personal : Last night, went through a bunch of tracks for the radio show tomorrow. Did a little coding. Went to sleep.

![View from the river looking up at the gray mountains in Yosemite Valley, California](https://dev-to-uploads.s3.amazonaws.com/i/8o9praijuh9sdxmu9nfq.png)

Tonight, I'll finish up the preshow work for tomorrow. Do some laundry and some coding. Wow, what a week. It's all love though, the weekend is here!

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube y0w1JWtzMVE %}
Get Certified - Pass the Azure Fundamentals Exam (AZ-900)
Tags: cloud, azure, certification
Published: 2020-05-30 00:23:44

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/oytysgcm0dvv6qzy4gmu.png)

A certification provides competency, shows commitment, professionalism and most importantly: it motivates you to keep learning and gather knowledge. It's also a great way to get a better job.

Currently Microsoft Azure is the number 2 cloud provider behind AWS, and is still growing. Microsoft constantly improves, changes and adds new services and resources to it's cloud platform. 

Every cloud provider has its pros and cons, but let's focus on the positive side of Azure:
1.	Azure provides very strong and fast PaaS capabilities, which in today’s world is a very important part of any cloud infrastructure.
2.	Azure brings to the array an integrated environment for deploying cloud apps, development and testing.
3.	The new design of Azure is intuitive, easy to digest and with a solid security development life-cycle included.
4.	The developer’s tools are amazing, and with a lot of flavors and colors. From an IoT suite to machine learning.

So with all these cool features, sounds like Azure is a very competitive cloud provider, and it's worth it to get certified.

The Azure Fundamentals Exam, or AZ-900 is a multi-choice, theoretical exam, and covers the foundations upon Microsoft designed its cloud platform, from standards to cases of use for the services and/or products available on Azure.

If you're interested in getting the certification, download my "AZ-900 Practice and Answers" document. This exam covers topics like security, privacy, compliance, general cloud concepts, and basic understanding of pricing and support for several Azure services and resources. Does not matter if you're unfamiliar with Azure, my document will help you out!

>>> DOWNLOAD
https://mega.nz/file/RQdF1aYT#hVt2dX4e715qV71fdbEmPwT-k8Raqd8u0HXy23eSUx8
Indie Game update: Engine Failure
Tags: gamedev
Published: 2020-05-29 23:50:05

Sometimes, you realize the path you are on is a dead end. This happened to me today - and the failure is in the very core, at the engine layer. Fortunately, it happened in the prototyping stage, which is exactly why I made a prototype. I have a new engine selected, which I now have to learn how to use. Thankfully, I've got no shortage of tutorials and samples to get me started.

As for the game itself, it's conceptually unchanged, and the assets need only minor changes to use in the new engine. Thank the stars this happened early enough that it's not a tremendous burden to get right!
Before you use JavaScript ES6 Arrow Functions... WATCH THIS!
Tags: javascript, tutorial, webdev, youtube
Published: 2020-05-29 23:49:40

Are you using JavaScript and maybe even JavaScript arrow functions but you are not quite sure what they are or how they work or what is the difference between arrow and normal functions.

Well I just uploaded a video to my [YouTube channel](https://www.youtube.com/channel/UC34UXFLKqdW3cpk5CBu2Siw) where I teach how you can use arrow functions, how they work, how JavaScript “this” works with them and what is the difference between them and normal functions.

You can watch the video below or from [this link](https://www.youtube.com/watch?v=jEGfUc2SHqY).

_If you need to brush up your skills with JavaScript functions first, check out [this blog post](https://codepulse.blog/learn-javascript-functions-in-3-easy-steps/)._

{% youtube jEGfUc2SHqY %}

-----------
_Originally published at [codepulse.blog](https://codepulse.blog/before-you-use-javascript-es6-arrow-functions-watch-this/?utm_source=devto) on May 30, 2020._
Fixing Tech Debt is Like Organizing Your Tupperware Drawer
Tags: devops, codequality, testing
Published: 2020-05-29 23:33:54

The trouble is not convincing anyone that it needs to be done. The trouble is deciding that any one lid is the lid that you can't tolerate being precariously balanced on the pile any longer. The trouble is deciding when to fix it.

What many people understand intuitively at home is that the secret is, every lid is the one you shouldn't tolerate being out of place. And the time is now. In practice, it's okay to let a lid stay out of place while you rescue your toddler or corgi from running out into the street. Be sane. But don't go buying more tupperware if your drawer looks like mine did. Fix what you've got first.

Likewise, don't tolerate bugs. Don't tolerate slowness. Fix what you've got before you add more, because it won't be easier later. It only gets tougher the longer you wait.

One of the challenges of this approach is that you'll find a fact about all the things you want to do: you can't afford to do them all well. There just isn't enough time. You need to be ruthless about scope. Let go of some treasured ideas that you aren't going to be able to get working in a reasonable timeframe. Cut it down.

You don't need those mismatched lids. How often do you really need to freeze that much stuff, anyway? Marie Kondo that trash. It does not spark joy.
Laravel version 7 (add-on vue & bootstrap).
Tags: laravel
Published: 2020-05-29 23:18:53

After we have been created any project in a directory. If we would like to add a bootstrap, and include a vue, we should do something like this,

composer require laravel/ui

php artisan ui vue --auth

After that we will use,

npm install && npm run dev


Note:: Use @extends('layouts.app') on the top of ....blade.php   

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/gez3likqug52gl6xm187.png)
Day 9: Job applications and Javascript
Published: 2020-05-29 23:18:16

Today was my first day back from visiting my sister in Rochester, so I had some personal responsibilities to take care of. However, I of course spent most of my day practicing and working on my skills. The entire morning session of the day I spent applying to jobs at all levels. It is said that job searching is a job in itself and I believe this to be very true. I don't take the current situation in the business world lightly, so I try to spend a large amount of time dedicated to reaching out to people via LinkedIn and searching Indeed for jobs that am a good fit for. This is something that all developers should be doing regardless of experience or knowledge. It never hurts to start early.

Nevertheless, I am spending the evening session of the day studying Javascript. I am continuing to practice Javascript until I have a very high-level understanding of the language. Javascript is the core to which React works and it is something that can always be improved upon. I intend on doing just that by continuing to grow in my knowledge and hopefully be able to apply this to a high-level project shortly.
testing Apple Pay on the web with Stripe (Rails)
Tags: rails, stripe, apple, tutorial
Published: 2020-05-29 23:15:52


![Proof](https://i.imgur.com/CZv5lQF.png)

[Following this guide to render an Apply Pay button with Stripe.](https://stripe.com/docs/stripe-js/elements/payment-request-button#html-js-prerequisites)

Stripe provided a fantastic tutorial to integrate Apple Pay with Stripe. It took me half a day to render a button on the page. Here are the fine details of the guide I overlooked to eventually succeed in rendering Apple Pay.

1)  **Ensure a credit card exists in your Chrome browser wallet**. I had Google Pay in my wallet. It was oddly frustrating, and understandable, Apple Pay didn't recognize Google Pay. Anyways, use a CC

![Credit card](https://i.imgur.com/NMvT4NH.png)

2)  **Enable HTTPS with ngrok**. I'm on `ngrok version 2.2.4`. Adjust your domain port accordingly

```shell
> ngrok http -host-header=rewrite localhost:3000
``` 

3)  **Render text from the controller, explicitly**

```ruby
# In `config/routes.rb` point the weirdly dotted namespaced controller endpoint to `ApplePayController` 
get ".well-known/apple-developer-merchantid-domain-association" => "apple_pay#show"
```

```ruby
# `app/controllers/apple_pay_controller.rb` render text
class ApplePayController < ApplicationController
  def show
    respond_to do |format|
      format.html do
        render text: DomainAssociationFile.()
      end
    end
  end
end
```

I initially served html from the controller. I saw text rendered in the web browser.

When registering my domain with Apple, I got 500 errors.

Apple pinged my controller to retrieve the domain association file. It didn't know how to respond to the HTML I gave back. Stripe expected a text format in the return response. Format it like the above.

```ruby
# I threw this in a presenter
class DomainAssociationFile
  def self.call
    <<-FILE
      # download and paste your domain association file, here
    FILE
  end
end
```
What’s your alternative solution? Challenge #53
Tags: challenge, javascript, codenewbie, learntocode
Published: 2020-05-29 20:39:06

# About this series

This is series of daily JavaScript coding challenges... for both beginners and advanced users.

Each day I’m gone present you a very simple coding challenge, together with the solution. The solution is intentionally written in a didactic way using classic JavaScript syntax in order to be accessible to coders of all levels.

Solutions are designed with increase level of complexity.

## Today’s coding challenge

```
Deep copy a jagged array with numbers or other arrays in a new array

```

(scroll down for solution)

## Code newbies

If you are a code newbie, try to work on the solution on your own. After you finish it, or if you need help, please consult the provided solution.

## Advanced developers

Please provide alternative solutions in the comments below. 

You can solve it using functional concepts or solve it using a different algorithm... or just solve it using the latest ES innovations.

By providing a new solution you can show code newbies different ways to solve the same problem.

## Solution

```javascript
// Solution for challenge47

var ar1 = [2, 4, 10, [12, 4, [100, 99], 4], [3, 2, 99], 0];
var ar2 = copyArray(ar1);

println(ar2);

function copyArray(ar)
{
    var ar2 = [];
    
    for(var el of ar)
    {
        if (Array.isArray(el))
        {
            el = copyArray(el);
        }
        
        ar2.push(el);
    }
    
    return ar2;
}

```


To quickly verify this solution, copy the code above in this coding [editor](https://codeguppy.com/code.html) and press "Run".

> Note: The solution was originally designed for [codeguppy.com](https://codeguppy.com) environment, and therefore is making use of `println`. This is the almost equivalent of `console.log` in other environments. Please feel free to use your preferred coding playground / environment when implementing your solution.
82/100 100daysofcode Flutter
Tags: 100daysofcode
Published: 2020-05-29 23:03:45

day 82/100 of #100daysofcode #Flutter
Learning Flutter , courses Udemy from
@maxedapps

Today learn about setup firebase, and start new projek , flutterchat
https://github.com/triyono777/100-days-of-code/blob/master/log.md
French Amortization Method (PRICE) with T-SQL.
Tags: sql, tsql, price
Published: 2020-05-29 22:42:28

##What is FRENCH AMORTIZATION METHOD? (Also known as PRICE)
The amortization by the **French method, progressive or classic**, is characterized by the payment of overdue interest, that is to say, at the end of each payment, and payment of constant instalments in each period.
Interest decreases as loan periods pass and amortized capital increases in evey new period.
The follow image contains the formula to calculate a banking loan. 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/b0nn36mz5hm21fpzgyl8.png)

Mês = Month;
Prestação = Payment;
Juros = Interest;
Amortização = Amount amortized;
SD (Saldo Devedor) = Fixed Amount. 

##Translate to Transact SQL
You can download the script **SQL_CALCULAR_PRICE.sql** on my [Github](https://github.com/sousallan/Projetos), to analyze how to calculate PRICE using T-SQL. Follow the link:
The "any" type in Typescript - simple and short explanation
Tags: typescript, javascript, tutorial, beginners
Published: 2020-05-29 22:37:39

Probably one of the most debated types in Typescript is the `any` type. Some abuse it, some tell you to use it as little as possible. How does this work?

Imagine that we need to specify the type of a variable but we don't know exactly what that variable will hold when writing our code. These values may be dynamic (they might come from a 3rd party library, for example). In this case, the best approach would be not to check the type of the variable (half true, since we'are actually using a type to specify that we expect whatever and we're fine with it). We can do so by using the `any` type and let the variables to be dealt with at compile time. The `any` type doesn't look any different from the others and we write it like this:

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/wv62vmb5zozrlqcxqel3.PNG)

This is also very useful when we work with arrays and we don't know the types of all its elements. To avoid issues we can do something like this: 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/63lu2stxxe2f9zxygwq3.PNG)

Notice that in the first example, I specified I want an array of type `number` so when trying to push a `string` to it, I got an error. The second example passes successfully.

*Image source: Christina Morillo/ @divinetechygirl on Pexels*
We made a tool that generates 2D colliders based on 3D models
Tags: indiedev, gamedev, dev, game
Published: 2020-05-29 22:05:09

This tool will help you create 2D colliders in the level editor.

https://dev-to-uploads.s3.amazonaws.com/i/tcwu254sma4wxw2c0bq2.gif

https://store.steampowered.com/app/1213020/PAPER_TANKS/
https://twitter.com/PAPERTANKS2
How much Python do you need to know to write an Airflow DAG? Part 1 - ANSWERS
Tags: airflow, python
Published: 2020-05-29 21:56:04

Answers:
1. `airflow.operators.dummy_operator` 

2. Nope, confusingly enough the module `datetime` contains the class `datetime`, so `datetime.datetime`.  

To have the follwing DAG working:
```python
my_dag = DAG("sample_dag",
             schedule_interval="0 0 * * *"
             start_date=datetime.datetime(2020, 4, 29)
             )
```

We would need to import the whole module, `import datetime`. 

In the original code you can thinks that `from datetime import datetime` creates a shortcut to `datetime.datetime`.

3. Nope, Airflow will pick up the Tasks in our DAG following the dependency tree we defined. If we remove `start >> end` they will be executed together. With `start << end` we can reverse time and save the dinosaurs. Everything is possible with Python

4. Yes, because it is after the DAG's `start_date`.

5.1 Nope, the first argument should be the `task_id`, which is a string of text, not a DAG.

5.2 Nope, the unnamed argument should be before the named arguments. 

Back to the original [post](https://dev.to/mucio/how-much-python-do-you-need-to-know-to-write-an-airflow-dag-part-1-20jp).
What I learned today 5/29/20
Tags: kotlin, android, databinding
Published: 2020-05-29 21:54:28

Today I learned data binding. I learned it via the Android Udacity course. The way I learned it is that instead using "findbyID" which creates a tougher job during runtime, you can use databinding to call views and assign them things. Instead of newName = findbyId<Textview>(R.id.tv_Name), newName.text , I learned to use binding.tv_Name.text.
Grant for the Web Hackathon deadline is one week away!
Tags: gftwhackathon, meta, opensource, webmonitization
Published: 2020-05-29 21:39:38

---
title: Grant for the Web Hackathon deadline is one week away!
published: true
description: Get your submissions in by June 5th!
tags: gftwhackathon, meta, opensource, webmonitization
---

#### Update: The submission deadline has been extended to Sunday, June 14.

{% link https://dev.to/devteam/announcing-the-grant-for-the-web-hackathon-on-dev-3kd1 %}

A quick reminder that the Grant for the Web Hackathon submission deadline is just **one week away**.

You have plenty of time to get started or to wrap things up as we roll into the weekend. We don’t favor early entries, but it's always best for you to get them in before the last minute 😉

**Need help?** [This thread](https://dev.to/thepracticaldev/grant-for-the-web-hackathon-help-thread-19pb) to the rescue!

**Participation rules and prizes** detailed in our announcement post up top.

---

### A few awesome projects/submissions we've seen so far:


Emma is creating an app that makes it more appealing for content creators to create monetized content **and** for readers to sign up for these services 🎨

{% link https://dev.to/emma/building-a-web-monetized-rss-reader-using-blitz-js-5gb3 %}


Robert built a browser extension that lets you track and manage your micropayments to web-monetized websites in a way that remains secure and private 🔥

{% link https://dev.to/wobsoriano/introducing-paytrackr-an-easy-way-to-keep-track-of-all-your-micropayments-4m31 %}


Jasmin is in the process of building a web component that allows users to pay for the granular content they are interested in v.s. buying an entire course_💰 

{% link https://dev.to/jasmin/video-web-component-using-web-monetization-api-29hf %}

Happy Coding!

---

_P.S. Don't miss this awesome offer from the first and only web monetization provider, Coil:_ {% link https://dev.to/devteam/free-coil-trial-for-all-gftwhackathon-participants-3n7m %}
You're the worst developer I know
Published: 2020-05-29 21:32:39

You're the worst developer I know because you don't listen. You trash the juniors and don't accept feedback. You don't trust women in your team. You think you're a 10x engineer and make no effort to help grow your peers. You don't teach what you know, always gatekeeping everything to yourself.

You're the worst developer I know because you criticize every open source project but you have never made anything yourself - your ego won't allow you. You think you're superior because I do frontend and you do backend. You don't take anyone seriously when you find out they don't have a CS degree.

You're the worst developer I know because you never say thanks, never say please, never say hi, never say bye. You're proficient and excellent technically, but it's a nightmare to work with you. You do not reply to my questions when you don't know the answer; you'd rather google them and then come back to me as if you knew it all.

You're the worst developer I know because you think you deserve better just for working ridiculously long hours. You don't have an opinion but you mainsplain every other woman on Twitter. You hold on to your past success to call everyone on their mistakes. You never accept help even when you need it.

You're the worst developer I know because you trash my solutions for being too simple but you never finish your overkill proposals. You overengineer everything and call my code as not so clean. You can't say I'm right, you can't say you're wrong. You trash managers on their back, always have done so.

You're the worst developer I know because you don't inspire, you're just too negative, every single time. You force-push updates to my PRs with no feedback whatsoever. You're so perfectionist we barely release anything, even when the project needs it. You're too negative, you're so defensive, you're intimidating more than welcoming.

---

Carlos, this is for your future self. Save this, come back every now and then, and make sure you don't turn into the worst developer you know.