teleren/devto huggingface dataset:
Permissions Security For Deno
Tags: deno, javascript, typescript, security
Published: 2020-05-27 17:09:16

Today I released a new security module for [Deno](https://deno.land/) called [permission-guard](https://github.com/asos-craigmorten/permission-guard)!

This module is a zero-dependency, minimal permission guard for Deno to prevent overly permissive execution of your applications.

```ts
import { guard } from "https://deno.land/x/permissionGuard@2.0.1/mod.ts";

await guard();

console.log("Execute my code...!");
```

If the application is run with permissions it doesn't need, or without permissions it does need, the guard will shield your application and prevent it from running.

For example, the `guard` in the above example would prevent

```bash
deno run --unstable -A ./index.ts
```

from executing any further. This extra protection means you are safer from potential malicious 3rd party code that could otherwise take advantage of overly permission application executions.

## Installation

This is a [Deno](https://deno.land/) module available to import direct from this repo and via the [Deno Registry](https://deno.land/x).

Before importing, [download and install Deno](https://deno.land/#installation).

You can then import `permission-guard` straight into your project:

```ts
import { guard } from "https://deno.land/x/permissionGuard@2.0.1/mod.ts";
```

> **Note:** `permission-guard` makes use of the unstable Deno Permissions API which requires `--unstable` to be passed in the Deno `run` command. You can use `permission-guard` in applications and not provide the `--unstable` flag, `permission-guard` will simply return as a no-op and not provide any defenses.

## Features

- Protection against unnecessary top-level permissions.
- Protection against missing required permissions.
- Recommendations where permissions could be better scoped (if `log: true` provided).
- Useful logs detailing the missing or insecure permissions (if `log: true` provided).

## Docs

- [Docs](https://asos-craigmorten.github.io/permission-guard/) - usually the best place when getting started ✨
- [Deno Docs](https://doc.deno.land/https/deno.land/x/permissionGuard/mod.ts)

## Examples

`permission-guard` has [all the examples you need](https://github.com/asos-craigmorten/permission-guard/tree/master/examples) to get started.

To run the [examples](./examples):

1. Clone the `permission-guard` repo locally:

   ```bash
   git clone git://github.com/asos-craigmorten/permission-guard.git --depth 1
   cd permission-guard
   ```

   Then run the example you want:

   ```bash
   deno run --unstable ./examples/defaults/index.ts
   ```

All the [examples](./examples) contain example commands in their READMEs to help get you started.

## More!

Want to know more? Head over to the [permission-guard GitHub](https://github.com/asos-craigmorten/permission-guard) page for full details.

Want to help, found a bug, or have a suggestion? Please reach out by commenting below or raising issues / PR on the repo!
What's something you're currently learning?
Tags: discuss, tutorial, javascript, beginners
Published: 2020-05-27 19:39:31

I am seriously considering starting a tutorial on `Vue.js`. I've been working with `React` for half a year now, I'm by no means a pro at it but I was thinking that learning another Javascript framework would be a good idea.

What are you learning at the moment/ are you planning to explore in the near future and why would you like to do that?

*Image source: Negative Space/ @negativespace on Pexels*
Blog Intent
Published: 2020-05-27 20:59:40

As I am new to web development, I reached out for help in my journey yesterday to Sam Julien. The focus of the conversation was my [portfolio](https://thomasbarrett.dev), but in general I sought advice in my efforts to land that first tech job. During the conversation Sam suggested I start a blog. Nothing special, just a written record of my journey that I can share and reflect on. Today marks the beginning of that record.

My intent will be to write every other day, at least, about anything related to my journey. That may be about learning Pixijs, or how to improve my resume, or a new person I met and what I took from the interaction.

I imagine this will reach a rather small audience, initially, but I do ask anyone interested to help by holding me accountable. If I have not posted recently, please ask my why. Too often I convince myself that I am wasting time because I see no results. The problem is that often means I stop spending time on things that matter before the results are visible, but that does not mean they are not present.

-Thomas Barrett
PostScript Documents
Tags: anonymous
Published: 2020-05-29 20:50:13

PS documents have mostly been replaced by other web page sketch file formats, such as. PDF. Even then, they are supported by a range of printers and programs.In general, any printer utility that supports PostScript can access it.   We  can convert PS archives to PDFs with Acrobat Distiller, a tool bundled with Adobe Acrobat, and Apple Preview, a tool bundled with macOS.We can also use conversion tools on websites like smallpdf, ilovepdf, i generally use [pdfdoctor](https://pdfdoctor.com/postscript-to-pdf) due to its speed and ad-free nature
Good Morning, Next time, I won't get 1,111 reactions and 5000 views in stats.
Tags: showdev, jokes, beginners, startup
Published: 2020-06-03 03:13:20

I used to check Dev.to with my mails and BBC news every morning before I walked out of bed.

I recall when I was a student of engineering (15 years ago) and whenever I saw my digital wrist watch / mobile phone: incidentally, much of the time was the same hour and minute (10:10, 16:16, 22:22) or the same number was repeated as time (11:11, 22:22).


Today, I saw two numbers of stats ...... exact at ... 1,111 (total reactions to my posts) :

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/0ezgifwxnoata5delkgv.jpg)

and 

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/i/92etegdhny84cilqbnp2.jpg)

5000 views (to one of my posts). If logged  5 minutes later, the stats numbers would have been different.

***"Absolute popular / repeatative numbers makes you happy without any reason"***

What you say?
Poll: Tailwind or Bootstrap? 👩‍💻👨‍💻
Tags: tailwindcss, bootstrap, poll, community
Published: 2020-06-04 12:15:15

About 3 months ago I wrote an [article comparing Tailwind CSS with Bootstrap](tailwind-css-vs-bootstrap) on Themesberg. Since then Tailwind became even more popular and there is an increasing amount of front-end web developers switching from the good old Bootstrap.

In the coming months it is expected that [Bootstrap 5 will be released removing jQuery and IE 10/11 support](https://themesberg.com/blog/design/bootstrap-5-release-date-and-whats-new).

With that being said, which CSS Framework do you prefer using?

<blockquote class="twitter-tweet"><p lang="en" dir="ltr">Which do you prefer? <a href="https://twitter.com/tailwindcss?ref_src=twsrc%5Etfw">@tailwindcss</a> or <a href="https://twitter.com/getbootstrap?ref_src=twsrc%5Etfw">@getbootstrap</a>?<a href="https://t.co/KeGXQ5c6D0">https://t.co/KeGXQ5c6D0</a><a href="https://twitter.com/hashtag/tailwind?src=hash&amp;ref_src=twsrc%5Etfw">#tailwind</a> <a href="https://twitter.com/hashtag/bootstrap?src=hash&amp;ref_src=twsrc%5Etfw">#bootstrap</a> <a href="https://twitter.com/hashtag/web?src=hash&amp;ref_src=twsrc%5Etfw">#web</a> <a href="https://twitter.com/hashtag/dev?src=hash&amp;ref_src=twsrc%5Etfw">#dev</a></p>&mdash; Themesberg (@themesberg) <a href="https://twitter.com/themesberg/status/1268516333098086400?ref_src=twsrc%5Etfw">June 4, 2020</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script>

Feel free to share your thoughts and experience in the comments section!
How to add some badges in your git readme (GitHub, Gitlab etc.)
Tags: git
Published: 2020-06-04 21:34:22

While I published [this](https://github.com/Ananto30/cap-em) repo I was looking for some badges to add in my readme. And found some interesting services worth sharing.

The most amazing place to make your badges is the https://shields.io. But I will explain each category to use them in the shield.

## Build
First, the badge you will look for is the build passing badge. You have written some amazing tests and you need to show that they are passing. There are several good services for that, I used **[Travis CI](https://travis-ci.com)**. 

The integration is really easy. You need to add a `.travis.yml` file in your repo. Mine was pretty straight-forward - 
```yml
language: python
python:
  - "3.7"
install:
  - pip install -r requirements.txt
script: 
  - python -m pytest  --cov-report term --cov=app
after_success:
  - codecov
```
I will talk about the `after_success` part next. Before that, you need the badge, right? You can get it by simply clicking the `build passing` button.

## Code Coverage
You have the tests passing, and the earned the badge. Now you need some coverage for your tests. You already know it by running tests with coverage option. For Python you may run this `python -m pytest  --cov-report term --cov=app`. But how to get the badge?

You can use **[Codecov](https://codecov.io/)**. For Python you need to install the `codecov` package by `pip install codecov`. Then just add this line in your `.travis.yml` - 
```yml
after_success:
  - codecov
```
You can find the badge in the settings page.

You can also use **[Coveralls](https://coveralls.io/)** for the same purpose. In that case, you need to install `coveralls` package in Python. You can find the badge in the bottom of your repo page in coveralls.

## Dependency monitor
This is really useful, not only for the badge but you can also manage your dependencies with the coming updates. 

For Python you can use **[requires.io](https://requires.io/)**. To get PR for new package changes you need to configure it by these steps: Hooks -> New pull request -> (configure as you like) -> save changes. And you can find the badge in specific repo page.

For Node.js **[Depfu](https://depfu.com/)** is a good service. You will get PR automatically, don't need to setup any hooks. You can find the badge in the settings of the specific repo page.

## Code Quality
There's a few services for that. I used both **[lgtm](https://lgtm.com)** and **[Code Climate](https://codeclimate.com)**. I won't comapre or judge them as they both marked my code A 😅 

You can find lgtm badges in the specific repo's integration page and the codeclimate badges can be found in the repo settings page.

There are also other services specific to your needs. You can know about them from [shields](https://shields.io) actually. Making badge is really easy with them. Have a try!
Benefits of a Throwaway Environment
Tags: docker, productivity, devops
Published: 2020-06-05 13:40:47

---
title: Benefits of a Throwaway Environment
published: true
description: The state of a developer's workstation can very easily be summarized as "works on my machine". Docker can be used to try new things without creating a mess. 
tags: docker, productivity, devops
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/cx7ngkq0jo61ww0e7kic.jpg
---

The state of a developer's workstation can very easily be summarized as "works on my machine" - something different is installed or configured differently and I don't know what or how it got that way. Every machine is personal. Some try to minimize this by using Ansible or Chef to create the ability to spin up their environment cleanly. However at the end of the day, we're developers, sometimes we need to just try something and see what happens. Sometimes trying new things creates a mess that never really gets swept up.

This is where Docker comes in handy! For the same reason that it's great for immutable deployments, it's great for creating an environment to play in and then toss away once you're done - with very little overhead. A container will only leak the changes that you tell it to. Only changes to the files in a mounted volume will be preserved. 

### CI/CD
If you are using a CI/CD system like GitLab CI, Bitbucket Pipelines, or CircleCI, you may already be using a throwaway environment without realizing it. Continuous integration relies on the ability to run multiple builds simultaneously that may have differing requirements and toolchains. Containers and virtual machines are often used to isolate those build processes while allowing the development team to install any needed tools without affecting another team's workflow. We wouldn't want a build to start failing randomly just because another team decided to try the newest NodeJS beta.

### Why would you use it?
This all sounds great right, but how do you use it in practice? You use it to experiment! Whether that is trying your app in the newest NodeJS beta, testing a script in a sandbox, or updating up an outdated library. All without affecting your workstation permanently; if anything goes wrong or not as you wanted to, delete the container and start again. No need to break your already working environment.

### Reusability
While it's great to have the ability to have a fresh sandbox each time you want to try something, sometimes you want some tools pre-installed. Using the same process that is used to create immutable deployments, we are able to create images that include tools you commonly use. For example, I personally have an image that is able to build different PHP versions so I that I can test different configs across versions. This can be done by finding a pre-made image on DockerHub or creating your own via a Dockerfile. If you are interested in creating your own, I'd recommend heading over to the [official documentation](https://docs.docker.com).

*Photo by [Ferenc Horvath](https://unsplash.com/photos/4gKHjKG7ty4) on [Unsplash](https://unsplash.com/)*
The Industry Hates Me For Being Honest
Published: 2020-06-05 03:59:53

Over the past 2 months I have interviewed with several companies and 2 of them stood out at rejecting me. Let's call them Company A, and Company B!

> I know right? Developers are bad at naming!

I guess part of it is my fault too! I am old and slow. Doesn't like competitive programming and already forgot most of how to answer algorithm question. I can't even answer some of the algorithm question I've flawlessly answered back when I was fresh out of University.

## Company A

When I got chance to interview at Company A, they require me to answer HackerRank style interview. It's my first time in nearly a decade of working in the industry to feel like I'm in a classroom exam again. I hate it, and I deliberately voiced my distaste to the answers comment:

```go
// Paraphrasing
// I'm sorry, I'm dumb!
// I never faced anything like this in real world work...
// ......
```

But guess what? My answer still pass the score, have a call with their VP, which proceed to have another call with their Lead Engineer.

Talked about my experience with Event Driven System and CQRS+ES and they decided that I am:
- Arrogant
- Too RND in my tech stack
- And overkill in CQRS+ES

And decided they don't need me.
They hate me for having a headstrong personality which translates as Arrogance to the perceiving end.

## Company B

Another HackerRank style interview. Guess I passed their score this time without me typing some strong comment and proceed to have another test with their Lead Engineer.
This time they want 5 question answered in google docs within 60 minutes.
Two of them stood out to me for being impossible to work on 12 minutes (60 / 5 if you're wondering). Or maybe I'm just old and dumb?!
The others are just questions copied word for word from Geeks For Geeks.

One of the question requires me to write a password brute force attack to an imaginary API.

The other requires me to find a combination of math `+` or `-` operation from `a strings of numbers` that results in `a number`.

My `Arrogance` kicks in and I start typing a comment

```go
// Paraphrasing
// I am sorry but I feel this is impossible for me to think of in 12 minutes 
// (60 / 5 if you're wondering)
// But I know you guys got this question from Rosseta Code!
// Here's the link, but I don't know the logic behind it
```

See? I've worked on this question back when I was still a University student and remember where to look at.

Unsurprisingly, I've heard the feedback that I was rejected although I've answered one of their question `FLAWLESSLY`. I know they are being sarcastic at this point. haha.

---

I was trying to be honest about what I can and can't do in the `N` minutes timeframe and the Industry hates me.

I guess The Industry love people who can grind `GFG` or other algorithm websites, remember the solutions out of their head, and quietly answer their `genuinely original question` without pointing the flaws back at them.
Correctly ignoring .DS_Store files
Published: 2020-06-05 04:34:19

---
title: Correctly ignoring .DS_Store files
published: true
description: Ignore .DS_Store files from all folders and subfolders in git repo
tags: 
//cover_image: https://direct_url_to_image.jpg
---

This is a simple trick, but I'm posting it here as reference.

When you do `git status` and find some `.DS_Store` files scattered through your app's folders there a simple line to add to your `.gitignore` to ignore them all for good:

```
**/.DS_store
```

However, if the `.DS_Store` files are already there type:

```
find . -name .DS_Store -print0 | xargs -0 git rm -f --ignore-unmatch
```

This will remove them from folders and subfolders. Then just commit and push to your repo.

```
git commit -m "remove .DS_Store files from everywhere"
git push
```

And that's it.
Accessing sharepoint sites using rest api's
Published: 2020-06-05 18:23:56

Hi,
I am new to React development. Please help me understand if we can access sharepoint sites directly using rest api's. I have tried but getting 403 error. I read in few of the stack overflow sites where it was suggested to go with Microsoft SPFx solution. It has build-in httpclient for rest call, if so is there any link which I can refer of how to use Spfx with react js. Please advice.
Day 148 : Needed
Tags: hiphop, code, coding, lifelongdev
Published: 2020-06-05 21:32:31

_liner notes_:
- Professional : Had another great day. It's not because of the work I did, that went well, but because I got to talk with my team about all types of things. Very much needed after what is happening. Shouts to them!

- Personal : Went through a few tracks for the radio show. Did a little bit of coding. Even tested the pomodoro timer on my side project during the day.

![A steep-sided canyon with a green forest in the valley in Del Muerto, Arizona, USA like the Grand Canyon](https://dev-to-uploads.s3.amazonaws.com/i/xs04f6lf84n9i4t87vis.png)

Going to do my laundry and finish up preparing for the radio show. Want to figure out how I want to implement the task list on my side project. Hopefully get it working this weekend.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube n8woH4GxUMk %}
Finest Software program Training Institute
Published: 2020-06-06 11:15:30

So far as knowledge science is concerned, there's enormous scope on this business in India. By our Information Science Training In Hyderabad, we shape our students in direction of becoming complete Information Science trade prepared specialists by the point of their course completion. Data Science coaching online contains a lot of constituent elements, and the Intellipaat programs present the most comprehensive and in-depth learning expertise.

But information science also has some needed expertise that can make your working profession widespread. Attend one full batch of Python for Data Science coaching. The Certification Programme in Knowledge Science will empower you to scale profitable heights in your career. This 225+ hours of live instructor based mostly classroom program of Information Science Training In Hyderabad that covers complete breath of the ideas in Data Science.

Effectively laid out course content and professional faculty ensure a wonderful learning experience. The college right here for Knowledge Science is very a lot skilled & has mentioned a lot of actual-time concepts. To be a knowledge scientist one should have mathematical, programming and enterprise abilities. Non-technical or non-programmers might really feel little confused to move into Knowledge Science career.

Now I'm an expert in information science and may confidently make a career in it. This trend is additional boosted by MNCs equivalent to Wells Forgo, organising their strategy information science delivery center in the city of Hyderabad. Analytics Path is an academic, coaching and profession development organization delivering high-rated <a href="https://www.excelr.com/business-analytics-training-in-bangalore">Business Analytics course</a>.

Information Science, with its ability to generate transformative experiences with regards to the external and inner functioning of the business, has gained immense traction over the decade. As the demand for Large Data Analytics is rising beyond any leaps however in distinction there's a huge scarcity of expert Information Scientists. Make your dream job a reality and enroll today in 360DigiTMG - the perfect institute for data science in Bangalore.

We are located at : 
Location : 
ExcelR - Data Science, Data Analytics Course Training in Bangalore
49, 1st Cross, 27th Main BTM Layout stage 1 Behind Tata Motors Bengaluru, Karnataka 560068
Phone: 1800-212-2120/ 070224 51093
Hours: Sunday - Saturday 7AM - 11PM
Data passing by props Object and function in OptionsAPI
Tags: nuxt, vue, optionsapi, props
Published: 2020-06-06 19:17:34

# Definition callback function by PropOptions on Child Component

```vue
<template>
  <div>
    <h3>This is a OptionsAPI Component Callback Example</h3>
    <v-btn @click="increment">increment</v-btn>
  </div>
</template>

<script lang="ts">
import { Vue } from 'nuxt-property-decorator'
import { PropOptions } from 'vue'

export default Vue.extend({
  name: 'CallbackChild',
  props: {
    obj: {
      type: Object,
      required: true
    } as PropOptions<{ initialCount: number }>,
    onClickIncrementButtonListener: {
      type: Function,
      required: true
    } as PropOptions<(count: number) => {}>
  },
  data() {
    return { count: this.obj.initialCount }
  },
  methods: {
    increment() {
      this.count++
      this.onClickIncrementButtonListener(this.count)
    }
  }
})
</script>

<style scoped></style>
```

# Call from parent component
passing callback method
```vue
<template>
  <div>
    <CallbackChild
      :on-click-increment-button-listener="onClick"
      :obj="{ initialCount: 100 }"
    ></CallbackChild>
    <p v-if="$data.count">{{ count }}</p>
  </div>
</template>

<script lang="ts">
import { Vue } from 'nuxt-property-decorator'
import CallbackChild from '~/components/options/CallbackChild.vue'

export default Vue.extend({
  name: 'CallbackParent',
  components: {
    CallbackChild
  },
  data() {
    return { count: 0 }
  },
  methods: {
    onClick(count: number) {
      this.count = count
    }
  }
})
</script>

<style scoped></style>

```