teleren/devto huggingface dataset:
Reconmap release notes (0.8.5)
Tags: pentesting, releasenotes, opensource, security
Published: 2021-01-24 23:37:49

_Photo by SpaceX on Unsplash_

This release is by far one of our biggest releases to date, so I won't spend any time on the introduction. Let's just talk about the shiny new things!

## New task statuses

Before this release tasks could be in two states: Open or closed. This was very limiting as there was no way to tell when the tasks were in progress. Reconmap 0.8.5 introduces a tri-state on tasks that represent when a task is pending (Todo), in progress (Doing) and finished (Done).

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

## Commands views

Previous versions of Reconmap would present the user with a hardcoded list of security commands to execute. This new version allows the security professional to add any command into the platform, to be used independently or as part of a project task.

Commands can accept arbitrary arguments and the Reconmap Web client would dynamically create a form where the argument values can be changed at will.

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

## Short bios and full names

Another little addition is to the user profiles that can now set full names and short bios. This seems unimportant but it matters if you want to include personal information about the team in the generated pentest report.

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

## Markdown formatter

It is now possible to enter markdown in places such as task descriptions, command descriptions, project descriptions and so on. This is great in cases where you need to explain something in a very structured way making emphasis on different parts of your descriptions.

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

## Other changes

That's not all of course, we worked hard to include on the release lots of aesthetics and UX improvements, bugfixes, and optimisations.

In other news, we also decided to leave medium behind because we don't think is ethical to ask readers to pay to read what we are publishing. Our values are much closer to this community and that's why we decided to start posting here.

Do you want to know more about our #pentesting platform? [Check out our Github org here](https://github.com/Reconmap) or [follow us on Twitter](https://twitter.com/Reconmap).
Rails Home Flip Project
Published: 2021-01-24 23:19:56

This Rails project was going to be more complex than my previous Sinatra project since I would be using 5 models and the various relationships between them.

I decided on building an app that would track home renovations.  On paper, it looked great.  A User would sign up or log in.  Next, they could add a new Home or select from previous ones.  Projects would be added to Homes.  The Projects were then assigned to Contractors and lastly, the Contractor could add the Tasks needed to complete the project.

Rails generators made some easy work of creating the Models, Controllers, and Tables and provided an early confidence boost.  Now it was time to start writing some code.  It did not take long at all for me to realize that the level of complexity involved in getting all these models working together was much greater than I had anticipated.  Creating the New and Edit forms for each model was streamlined by using Rails form_for . 
    ![form_for](https://dev-to-uploads.s3.amazonaws.com/i/mjcoar5zxp7r7nff5ku6.PNG)
 
 One form could be displayed for both New and Edit and Rails would handle each of the forms appropriately.  Other form helpers such as collection_select simplified the index view process.

  ![collection_select](https://dev-to-uploads.s3.amazonaws.com/i/uy44aqz6hgpkfm72udeo.PNG)
 

Nested forms and nested routes were essential tools for setting up the additional views and being able to display the correct data from multiple models.  For example, nested forms allowed me to combine adding a new project and assigning a contractor on the same form.  If I needed to display all of the projects for a specific home I could use the nested route homes/14/projects?
Another requirement of the project was to add third-party login.  I selected Facebook.  I had a small amount of prior experience with this so I assumed it would not be too difficult.  I used the Omniauth and Omniauth-facebook gems to accomplish this.  This also took much longer than I had anticipated but with a lot of patience it was eventually up and running.
I found the transition from Sinatra to Rails to be more difficult than I thought it would be.  I must confess that there were many very frustrating moments while working on this project.  If you happen to be experiencing the same level of frustration, all I can say is hang in there and keep addressing those error messages one at a time.
LeetCode 51. N-Queens

Tags: algorithms, javascript, dynamicprogramming
Published: 2021-01-24 23:17:32

###Description:
The n-queens puzzle is the problem of placing n queens on an n x n chessboard such that no two queens attack each other.

Given an integer n, return all distinct solutions to the n-queens puzzle.

Each solution contains a distinct board configuration of the n-queens' placement, where 'Q' and '.' both indicate a queen and an empty space, respectively.

###Example 1:
```
Input: n = 4
Output: [[".Q..","...Q","Q...","..Q."],["..Q.","Q...","...Q",".Q.."]]
Explanation: There exist two distinct solutions to the 4-queens puzzle as shown above
```

###Example 2:
```
Input: n = 1
Output: [["Q"]]
```
###Solution:
Time complexity : 
Space complexity : 

```javascript
var solveNQueens = function(n) {
    const output = [];
    backtrack(output, n);
    return output;
};

function backtrack(output, n, board = [], r = 0) {
    // If we have placed n queens on the board, create board as a string
    // and push it into our output
    if (r === n) {
        output.push(board.map(c => '.'.repeat(c) + 'Q' + '.'.repeat(n - c - 1)));
        return;
    }
    // Find the column to saftely place a queen in the current row (r)
    for (let c = 0; c < n; c++) {
        // Check if the current column is safe from a vertical, horizontal, or diagonal attack
        // from previously placed queens on the board
        if (!board.some((bc, br) => bc === c || bc === c + r - br || bc === c - r + br)) {
            // place a queen in the current column (c)
            board.push(c);
            // move to the next row
            backtrack(output, n, board, r + 1);
            // remove column from the board
            board.pop();
        }
    }
}
```
Tipton Technologies
Published: 2021-01-24 22:46:11

Hello everyone! I'm Matt, I'm currently a Senior at Penn State University studying Security and Risk Analysis. My future goals are to find a niche field within information security to peruse my career after university. I still am unsure of what exactly I want to do after I graduate, I'm not sure what particular field of information security I want to enter. Lately I've been going through a lot of self reflection to try and discover what my real passion is that I can do for my career.

I have always had a passion for computers. My love first started with online flash games in the early 2000s. Since then I've been addicted to playing games on the computer. My interested in computer and online security also stemmed from these games. I was pretty young when I was exposed to hackers, they would ruin these games by hacking to give them advantages. I was eventually exposed to these hackers trying to steal my own information. This experience really stemmed my love for protecting others and myself from others that want to cause harm. I hope that I can find myself a career field that speaks to me and gives me that feeling of accomplishment. I don't want to be stuck at a desk looking back wondering what I could have done differently. 

I began my formal education in the field my second semester of my first year. I started university as a Biology major and quickly realized that my true passion was with technology. I soon switched to the Security and Risk Analysis major and have loved it ever since. This major did give me many problems and challenges. But have learned so much over the past three and a half years. I have yet to decide on what exact field I'd be interested in joining. I've had two internships that have allowed me to get some knowledge of how the professional sector works. In these internships I managed and implemented information security policy and processes for a small business, this also included policy for managing PHI/HIPPA information. Some of my other tasks included managing security audits for 175 hospital and healthcare systems, distributing IT resources, providing software and security updates. These internships gave me a heads up on some of the responsibilities that I would have in the future and gave me great experience on what to look for while searching for a job. 

I've learned many things while studying SRA but one of the things that has helped me with this degree is software and technical tools that assist in getting tasks done. One tools that I have used throughout college is called LightShot. LightShot is a screenshotting tool that allows you to crop and edit your a portion of your screen you want highlighted. This is probably one of my favorites when doing labs and makes it so much easier to annotate your work. I created this short tutorial to help you install and use LightShot for yourselves. Thanks!

Link --- https://www.youtube.com/watch?v=tFoDiEsSLpI&feature=youtu.be
Customer Screen UI
Tags: codepen
Published: 2021-01-24 22:44:39

<p>Inspired by uidesigndaily.com <a href="https://www.uidesigndaily.com/posts/figma-customers-projects-project-management-card-invoice-day-518" target="_blank">https://www.uidesigndaily.com/posts/figma-customers-projects-project-management-card-invoice-day-518</a></p>

{% codepen https://codepen.io/osmancandulger/pen/RwGzoaK %}
Best Practices and Patterns to Write Modules in Node - Part 1
Tags: node, modules, design, patterns
Published: 2021-01-24 22:42:56

I'm excited to publish my first post here. I'd love to hear your thoughts about it. Let's get started :)

In this post, I’d like to show you ideas that will help you write modules that are more readable, maintainable, and are easier to test.


Modules In a nutshell

In node, every JavaScript file we create is a module. Each module has its own components (variables, functions, classes), by default, everything remains private to the module and it's your decision which components you want to expose to other modules. This is done using module.exports.


First Rule - Keeping the Interface Simple:

The interface of a module is the components we expose to the outside world, good interface is one that describes what the module does by just reading it. Modules should have only one purpose they want to achieve, one single responsibility. We also want to make sure we keep the module's internal implementation private, this focuses the interface of the module on its purpose and reduce its complexity. 

All the above makes your module simple to understand by other developers and encourages them to reuse your module since they have a better understanding of what your module does. They are comfortable with it.



Second Rule - Keeping the module Small:

Maintainability is the ability to modify, add, or test existing code with ease - one change should not cause changes in other places in the system. Small modules tend to be more focused and have fewer dependencies. This makes testing an easier process, which in turn makes the whole system more robust.

In addition, looking at small segments of code is much less intimidating and overwhelming, it is also more straightforward and easier to understand. This gives other developers the confidence to modify or add existing code.


That's it for part 1, hope this helps will benefit you in writing your next module. I would love to hear anything you think

In part 2, I will show you common patterns for creating modules and will present their pros and cons. Stay tuned!
Introduction
Published: 2021-01-24 22:34:56

Hello Yall
TechWithJoe here with my introduction post. 

## Introduction

So I am currently a student at Penn State University Park. I am currently studying International Politics, while also completing a minor in IST. After graduating from my undergrad, I then plan on attending Law school. 

Outside of school, I am just an average 21 year old male. I enjoy hanging with friends, hitting the bars, or just playing video games. However, I have always been deeply interested in technology and how it works. I do not plan on going into the technology field as I am also very interested in law, but with technology becoming such a big part of our lives, its just smart to stay up to date. 

As I mentioned earlier, I am very much into PC gaming. I recently built my own computer to do so within the last 2 years, and the hobby has been a lifesaver during the pandemic. If anyone else is big in to PC gaming, I think they would agree that building your own PC from the ground up is the best way to go. However, in doing that, you can sometimes run into problems with your software and hardware. One of the problems actually stems from each individual game's anti-cheating software.  

## Anti-Cheat Explained

So if you are unaware with how Anti-Cheat works, I can give everyone a quick rundown. When the PC boots up, one of the first applications that the processor of the PC opens is the Anti-Cheat software itself. This gives the software a lot of power, as it scans through a bunch of files, looking for cheating software. 

However, sometimes this Anti-Cheat software can fail. In one way, it could fail to identify cheating software all together. And a second (and more frustrating) error that you could encounter is when the Anti-Cheat selects a non-cheating file or software, and labels this as a cheating software. When this error takes place, you can either be kicked from the current game you are on, or the game may refuse to boot up. 

In the video below, I explain a couple easy ways to make sure these errors can possibly be avoided. I have also linked another article, if anyone would like to read up more on how the Anti-Cheat software works. 


Video: https://www.youtube.com/watch?v=iPZlqeCrAgI

Resources: https://technology.riotgames.com/news/riots-approach-anti-cheat
Ne(u)xt.JS SSR with dynamic metadata
Tags: question
Published: 2021-01-24 22:21:57

Hi,
In my recent project we decided to use server side rendering to increase SEO.

Our goal is to store metadata like title and etc in CMS like contentful.
So we have to make for every request for page request to contentful.

This slowing down response even if it is very fast.
This cost just 1 request, but what if I want data for my client side application?
Sometimes query could be very slow.

Is there possibility to render meta tags server side and rest of content with SPA?
I thing this will have negative impact for SEO.

Is there any other and better way, than static site generator?

Have you ever struggled with this?
I’ll be very happy if you share your experience.
Are you part of any developer communities on Discord? What do you like about them?
Tags: discuss, watercooler, community
Published: 2021-01-24 22:15:36

I'm curious to know what developer focused servers on Discord that dev.to members are a part of.

Update!
No one seemed to have any Discord Server in particular so I've made one for a dev community I'm working on called [inspirezone](https://inspirezone.tech/). See this post for more details 😃

{% link https://dev.to/inspirezone/a-developer-community-encouraging-active-coding-practice-4koh %}
Asosiasi profesi, sains, dan iptek (bagian 2) 
Tags: writing, productivity, indonesia, iagi
Published: 2021-01-24 22:12:15

Oleh: [Dasapta Erwin Irawan](https://orcid.org/0000-0002-1526-0863)

[Bagian 1](https://dev.to/dasaptaerwin/asosiasi-profesi-sains-dan-rekayasa-bagian-1-c02)
Word Wrapping in Vim
Tags: vim
Published: 2021-01-04 19:30:53

I've been writing a lot of text recently in Vim: Notes, blog posts, pretty much any prose I need to write, starts in Vim first for me (including this blog post). But when writing prose, adding hard line breaks is often unnatural. Instead, I'd prefer if Vim would soft wrap my text at the width of my window.

Vim can do that, and there's a few options you can set together in order to create a better soft-wrapped text experience:

*   `:set wrap` - Wraps text instead of forcing a horizontal scroll. This is the Vim default, but just noting here that you do need to have this set, naturally.
*   `:set linebreak` - Wraps text at the end of a word. This is what prevents a word from being split in two.
*   `:set nolist` - You must turn off `list` which displays whitespace characters as text.

It's important to note that the mappings you use such as `j` and `k` to go up and down and `^` (or `0`) and `$` to go the beginning and end of a line, all apply to actual lines, not soft-wrapped "display" lines. Vim _does_ have a way to navigate across wrapped lines, however! Prepend `g` to any of those key presses:

*   `gj` - Go down one wrapped line
*   `gk` - Go up one wrapped line
*   `g^` or `g0` - Go to the beginning of the wrapped line
*   `g$` - Go to the end of the wrapped line

But that's sort of annoying. Rather than needing to prepend all of those key presses with `g` while in word-wrap mode, we could simply remap all of those. For example `j` could be mapped to `gj` while in this special prose-writing word-wrap mode. Let's put this all together into a function inside our `.vimrc` that allows us to toggle this mode on and off. [Check out the Gist](https://gist.github.com/cbartlett/83de923d3711e4baff9eefa4992a438d) with the full script.

When I call `<leader>w` or `\w`, Vim will turn on wrapping, toggle wrapping at word boundaries, and turn off `list` display. It will also remap all my line navigation keys to display lines rather than actual hard lines.

Drew Neil, author of [Practical Vim](https://amzn.to/2Mk7bov) and [Modern Vim](https://amzn.to/2Lii5uF), has a detailed screencast of this whole setup over on [Vimcasts](http://vimcasts.org/episodes/soft-wrapping-text/). But I've also made a quick video of word wrapping in action below.

If you're interested in more tips like this that are useful for note-taking in Vim, you might want to pre-order our course [Master Vim Note-Taking](https://gumroad.com/vimtricks#idnjX). We are hard at work on this course, it's shaping up to be even better than our first course, [Git Better with Vim](https://gumroad.com/vimtricks#hsOVI).

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

*This post originated on the [VimTricks blog](https://vimtricks.com/p/word-wrapping/).*
Sinopsis Kaifuku Jutsushi no Yarinaoshi
Published: 2021-01-24 22:05:40

Sinopsis utama Kaifuku Jutsushi no Yarinaoshi:

“Penyihir penyembuhan tidak dapat bertarung sendirian.”

Keare, yang terikat dengan pengetahuan umum, dieksploitasi lagi dan lagi oleh lainnya. Namun suatu hari, ia menyadari apa yang ada di luar sihir penyembuhan, dan meyakini bahwa penyihir penyembuhan adalah kelas terkuat. Akan tetapi, dalam beberapa waktu saat ia menyadari potensi penuhnya, ia terampas oleh segalanya. Kemudian, ia menggunakan sihir penyembuhan di dunianya untuk kembali ke empat tahun sebelumnya, dan melakukan lagi segala hal yang ia lakukan.

Download Dan Streaming di: https://nanimeku.com/anime/kaifuku-jutsushi-no-yarinaoshi/
Object-Oriented JavaScript — Async Programming
Tags: webdev, programming, javascript, beginners
Published: 2021-01-24 21:58:18

**Check out my books on Amazon at https://www.amazon.com/John-Au-Yeung/e/B08FT5NT62**

**Subscribe to my email list now at http://jauyeung.net/subscribe/**


JavaScript is partly an object-oriented language.

To learn JavaScript, we got to learn the object-oriented parts of JavaScript.

In this article, we’ll look at JavaScript async programming.

### Async Programming

Async programming is an import part of JavaScript apps.

It’s different from the alternative mode, which is synchronous programming.

Synchronous programming is where we run code line by line.

And async programming is where we run some code, then wait for the result.

While we wait for the result, we let other pieces of code in the queue run.

Then once the result is obtained, then we run the code that’s waiting for the result.

This is different in that we aren’t running anything line by line.

We queued up the code and initialize them.

Then once the result is computed, we go back to run the code that’s initialized.

When the code is waiting, the latency isn’t predictable.

So we can’t just run code and then wait for the result without letting other pieces of code run.

### JavaScript Call Stack

The call stack is a record of the functions that are called from latest to earliest.

For instance, if we have:

```
function c(val) {
  console.log(new Error().stack);
}

function b(val) {
  c(val);
}

function a(val) {
  b(val);
}
a(1);
```

Then we get:

```
Error
    at c ((index):37)
    at b ((index):41)
    at a ((index):45)
    at (index):47
```

from the console log.

We see that `a` is called first, then `b` , then `c` .

When `c` returns, the top of the stack is popped out.

And then `b` is popped out when it returns.

And finally `a` is popped.

### Event Loop

A browser tab runs in a single thread.

It runs in the event loop.

The loop continuously picks messages from the message queue and runs callbacks associated with them.

The event loop keeps picking tasks from the message queues when other processes add tasks to the message queue.

Processes like timers and event handlers run in parallel and add tasks to the queue.

### Timers

The `setTimeout` function creates a timer and wait until it fires.

When the timer is run, a task is added to the message queue.

It takes a callback and the duration in milliseconds.

Once the duration is reached, then the callback is run.

When the callback is run, then other interactions in the browser is blocked.

### Callbacks

Node popularized its own style of callback.

The callback takes an `err` and `data` parameter.

`err` has the error object.

`data` has the result data.

For instance, we have:

```
fs.readFile('/foo.txt', (err, data) => {
  if (err) throw err;
  console.log(data);
});
```

which has a callback with `err` and `data` .

The `fs.readFile` reads a file asynchronously and gets the content.

### Conclusion

JavaScript needs lots of async code because it only runs on one thread.

It needs to queue tasks and then run asynchronously.

This way, it won’t hold up the main thread.