teleren/devto huggingface dataset:
[Tutorial Linux] Terminal: Criando arquivo
Tags: linux, touch, terminal, womakerscode
Published: 2020-08-28 14:52:01

Um comando muito utilizado para criar arquivos(em branco) no Linux é o **touch**.

```
$ touch <arquivo>
```

- **$** indica que você deve usar o **usuário comum** para fazer essa operação.

- digite o nome que deseja dar ao arquivo sem os sinais **< >**.

![criando arquivo](https://dev-to-uploads.s3.amazonaws.com/i/k7f4xtxbh8t2r3jjzur0.gif)

## Criando mais de um arquivo simultaneamente

É possível criar mais de um arquivo por vez.

```
$ touch arquivo1 arquivo2 arquivo3
```

![criando mais de um arquivo](https://dev-to-uploads.s3.amazonaws.com/i/z170oo3pljcqh9vqyv42.gif)

## Criando arquivo dentro de um diretório específico

Para criar arquivo dentro de um diretório específico, digite o caminho do diretório seguido do nome do arquivo.

Exemplo:

```
$ touch /home/usuario/Documentos/arquivo1.txt
```

No exemplo acima foi especificada a extensão do arquivo.

![criando arquivo em um diretório especificado](https://dev-to-uploads.s3.amazonaws.com/i/v4goh8bftfsggze9liu4.gif)

## Criando mais de um arquivo numerado

Outra maneira de criar três diretórios de uma vez, como o mostrado acima, em que só mudamos o número final do arquivo, é usando o recurso curinga. Assim, temos:

```
$ touch arquivo{1,2,3}
```

Depois do nome do arquivo, entre as chaves, colocamos o que há de diferente entre eles, no caso o final.

![criando mais de um arquivo numerado](https://dev-to-uploads.s3.amazonaws.com/i/chq07cxnqy0v6yyrsnql.gif)

## Alterando data de criação de um arquivo

Ao utilizar o comando touch num arquivo já existente, o mesmo irá alterar a data da criação do arquivo para a data atual.

![alterando data criação](https://dev-to-uploads.s3.amazonaws.com/i/lvoamrvwet89ueb8f316.gif)
Finally, 1st Rails Project done!
Tags: rails, showdev, beginners, webdev
Published: 2020-08-28 17:30:06

So somewhere last year(2019), I started learning Ruby on Rails from The Odin Project. I had already been learning and working with HTML & CSS and was already building static sites.
I dived into Rails because I needed to have a backend to certain projects, and because Javascript has always scared me... lol.

I took a break from The Odin Project, and got back just this month. I dived into the  Blog Project, and after two weeks of anxiety, fustrations and alomst certainly, depression, I'm glad to say I made it.
I'm done with the Blog Project now, thanks to some wonderful people from The Odin Project's discord server.

It's been an amazing journey, gradually learning syntax and MVC, and how to handle error messages, debugging as well, and more googling , together with stack overflow. I'm proud of myself for seeing this challenge through;  there were many times I felt like giving up and quitting Rails altogether.

And oh, imagine my surprise when I realized my database was gone after deploying to heroku....
I felt so mad and pained....lol, that was when I got to know that the local database is different from the heroku database, so I'd have to figure out a way to ship my local database too(Database seeding), or write all my articles again.

Anyway, its been fun and interesting. I'm already calling myself a Full Stack Rails Developer....
Josh_on_Rails it is.......
Open a router port for home Ubuntu Server 20.04
Tags: ubuntu, network, hints
Published: 2020-08-28 17:26:43

**Problem:**

You've run your application on home server (e.g. Ubuntu Server 20.04), but it isn't available outside.

**Solution:**

1) Check your IPs

External:

```
curl ifconfig.me
```

Internal:

```
ip a
```

2) Make app's port available

[A complete guide on how to open Ubuntu port is on my blog](https://ntscx.com/posts/open-a-router-port-for-home-ubuntu-server-20.04)
Mobile Development and What You Should Know
Tags: mobiledevelopment, appdevelopment, iosdevelopment, androiddevelopment
Published: 2020-08-28 17:05:24

Business management comes with different challenges, which is the reason one has to be careful before getting into one. It is necessary to take time and consider the dynamism of the business you want to establish or manage before getting started. Also, one has to discover the things required to startup and grow a business, which should reflect in the business plan. But, when you have already established your business, but finding it difficult to scale it to the level you desire, one way is to consult a digital agency for assistance. The digital agency will position your business before your target audience in different ways. One way to get that done is mobile development.

##The truth you should know about app development
Creating a mobile application for your business is necessary when you want to reach out to people of different demographics in their comfort. Depending on your brand and target audience, you can choose between [iOS](https://developer.apple.com/) and [android app development](https://developer.android.com/). These are the two trending application developments that can make your business a household name within a short time. Digital agencies are available on the internet to offer branding, print, and website development services to clients. With the service of the developers, you can get an audience to interact with your brand in an easy way.

![ios and android development mobiles](https://i.imgur.com/Hkjd8eS.jpg)

##Hire the right team for business application
Do not hire a mobile app developer without confirming the capability of the person. There are many acclaimed developers that are not good at the job. Some of them do parade themselves as full stack mobile and web developer, but in the end, are not able to meet up with the requirement. Some of the things to look out for in the developer you want to hire include:

• The developer must be able to ask the appropriate question
• The developer must have a good listening ear
• The developer must be ready to work with your budget and deadline.

##When to hire mobile app development experts
Professional digital agencies do take time to find out the needs of their clients before swinging into action. These are the people that know the right question to ask their clients at any point in time to figure out what they want before forging ahead to render the service. More so, the reason for asking the right question is to make sure they proffer solutions suitable for the goal of their client. Through the answers you provide to the developers, they will be able to know your budget and timing, which will be helpful in getting the [app development](https://www.inspirevisual.com/mobile-application-development/) done.

![mobile development team](https://i.imgur.com/GqaTWxF.jpg)

##Conclusion 
I hope the factors mentioned in this article will entice you to make an informed decision to move forward with your app idea. Connect with a trusted team today to get the job done without delaying another minute.
Reviewing Google's Technical Writing Courses // Would I Recommend Them?
Tags: writing, beginners, career, devrel
Published: 2020-08-28 17:03:38

Recently, I have been recommending [Google's Technical Writing courses](https://developers.google.com/tech-writing) to new writers. However, I also find myself pointing out content gaps in the courses and sharing complementary resources. So I made a video to share my opinions and other resources:

https://youtu.be/fAGE8OepYUo

TL;DW: The courses are designed to help engineers to improve their tech writing skills. I think the assumption is that the student already knows the technology they are writing about. IMO, the courses are an excellent starting point for new tech writers and they are even more useful when coupled with [Google's developer documentation style guide](https://developers.google.com/style) and [Divio's documentation framework](https://documentation.divio.com/). In the video, I also share how I would have used all these resources if I were a new tech writer. Hope the video helps you decide if the courses are worth your time!
Links To The Best Resources On UI And UX Design On The Internet
Tags: showdev
Published: 2020-08-28 17:02:49

I would like to announce to you, my ebook on: Links To The Best Resources On UI And UX Design On The Internet.

For those of us looking for advise and inspiration in building the right User Interfaces and Experiences for our customers. There is a lot written on UX and UI on the internet.

I have compiled the best out of the lot that have generated the most positive results for their readers. The list includes links to blogposts, articles, etc on the internet , on this topic.
https://7website.github.io/ebook/
Thank you
Get in on the action — GitHub Actions Hackathon reminder! ⏰
Tags: actionshackathon, actions, opensource, github
Published: 2020-08-28 16:58:02

---
title: Get in on the action — GitHub Actions Hackathon reminder! ⏰
published: true
description: You still have time to build projects with GitHub Actions for the hackathon!
tags: actionshackathon, actions, opensource, github
cover_image: https://dev-to-uploads.s3.amazonaws.com/i/xnzigbzxrvzif1v7ge86.png
---

### GitHub Actions Hackathon submissions are due on September 17 at 11:59 PM PST.

GitHub Actions are an awesome way to automate, customize, and execute your software development workflows in a centralized way within your repository. The [GitHub Actions Hackathon on DEV](/t/actionshackathon) is your chance to play around with this tool in a fun competition while earning prizes in the process. Don’t miss out -- you still have a few weeks left! 

Full details and rules for participating in the GitHub Actions Hackathon on DEV can be found here:
{% link https://dev.to/devteam/announcing-the-github-actions-hackathon-on-dev-3ljn %}

---

If you've already published your submission, fantastic! We can't wait to review your entry, and we thank you for contributing your time and imagination to enhance the open source ecosystem for all of us. If you get stuck at any point, refer to the [help thread](https://dev.to/devteam/github-actions-hackathon-help-thread-1li4). If you simply want to connect or bounce ideas off other participants, the [community thread](https://dev.to/devteam/share-your-github-actions-hackathon-updates-251m) is the place to do it.

Happy coding!
A GitHub Action to find dead code using Vulture
Tags: actionshackathon, github, python
Published: 2020-08-28 16:54:59

### My Workflow

[Vulture](https://pypi.org/project/vulture/) is an awesome static code analyzer which helps identify dead code in Python repositories. As a python project maintainer, it is useful to know if a new pull request has introduced any dead code.

The [GitHub Actions Hackathon on DEV](https://dev.to/devteam/announcing-the-github-actions-hackathon-on-dev-3ljn) was an opportunity to experiment with Github Actions and make it easier to find dead code. The Github Actions marketplace didn't have any existing actions for Vulture and so I decided to write one. 

Sample run: https://github.com/anaynayak/python-vulture-action/actions/runs/227230739

![Diff shown on a Pull request](https://dev-to-uploads.s3.amazonaws.com/i/m8vrdvgf2unl5312b19g.png)

I have enabled it on one my other repositories [BuildNotify](https://github.com/anaynayak/buildnotify/) and it helped me realise that I had introduced some dead code as well :smile:

Here is the link if you'd try it on your repository [Python Vulture Action](https://github.com/marketplace/actions/python-vulture-action) 

Sample workflow

```yaml
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    name: vulture
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Scavenge
        uses: anaynayak/python-vulture-action@v1
        id: vulture
        with:
          vulture-args: src --min-confidence 90
```

### Submission Category: 

Maintainer Must-Haves

### Yaml File or Link to Code

{% github github.com/anaynayak/python-vulture-action %} 


### Additional Resources / Info

https://github.com/anaynayak/buildnotify/
https://pypi.org/project/vulture/

<span>cover photo by <a href="https://unsplash.com/@cdr6934?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Chris Ried</a> on <a href="https://unsplash.com/s/photos/code?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></span>
I built yesno.
Tags: showdev, angular, javascript, java
Published: 2020-08-28 16:23:10

Hi everyone, 

while being quarantined for the last month i started a small project: [**yesno.**](https://app-yesno.herokuapp.com/)

It is basically a webapp where you can anonymously ask yes/no question and everyone can anonymously answer them once before getting to see the yes/no statistics.
It has a new and a top (of the last 48h) questions section.

Technically I realized the Frontend Progressive Web App it with Angular and Ionic which was a great experience. The backend was written in Java with Spring Boot. Everything is deployed to heroku.

I'm really hoping for feedback and I am open for any questions. (Even non-yesno questions 😉 )
Help Wanted for the new tsParticles GitHub Pages website
Tags: contributorswanted, javascript, html, webdev
Published: 2020-08-28 16:22:00

{% github https://github.com/matteobruni/tsparticles/issues/752 %}

The current tsParticles Github Page is just the readme, but creating a cool website with samples and guides would be awesome.

The documentation created by TypeDoc inside the `core\main` folder could be included too.

The website architecture could be done with everything, I don't care about it. Angular, React, Vue.js, plain HTML is all good, the only requirement is it must work fine, and obviously **tsParticles** must be used to create particles effects.

If ideas are needed you can check out the CodePen collection actively updated with tsParticles configurations: http://codepen.io/collection/DPOage

---

Some interactive samples from that collection

{% codepen https://codepen.io/matteobruni/pen/PoNmejJ %}

{% codepen https://codepen.io/matteobruni/pen/rNeLmeQ %}

{% codepen https://codepen.io/matteobruni/pen/YzwBmJZ %}

---

The website will be hosted at https://particles.js.org (as you can see it's really bad), this is the documentation created by TypeDoc https://particles.js.org/core/main/docs/ but it has issues with Jekill because filenames start with the underscore.

The website will be created inside the new `website` branch and deployed to `gh-pages` branch with the build output files.
The branch `gh-pages` has no `.gitignore` for `docs/` folder, while others have, this behavior must be kept.

The branches tree should be:
```
website
`- master
   `- gh-pages
```

If this tree can lead to problems we can discuss about it

{% github https://github.com/matteobruni/tsparticles %}
Find Duplicates in an Array / JavaScript
Published: 2020-08-28 16:13:36

Consider the following LeetCode problem. 

>Given an array of integers, 1 ≤ a[i] ≤ n (n = size of array), ?>some elements appear twice and others appear once.
>
>Find all the elements that appear twice in this array.
>
>Example:
>Input:
>[4,3,2,7,8,2,3,1]
>
>Output:
>[2,3]

I will present a few solutions to the problem in JavaScript, though I know there are some better options out there. My first approach was to create an empty object, run the array through a for loop, and count every instance of each number. Because the problems wants us to only return elements that appear twice, we would then filter the object by values equal to 2 and return the relevant keys. This looked like:

```
var findDuplicates = function(nums) {
    let count = {}
    for(const num of nums){
        if (!count[num]){
            count[num] = 1
        } else {
            count[num]++
        }
    }
    let keys = Object.keys(count)
    return keys.filter(x => count[x] === 2)
};
```

According to LeetCode, this took 132ms and registered a memory usage of 53MB. In contrast to other LeetCode submissions, this beat 60.12% of JS submission with runtime, but only 8.39% in terms of memory usage.

One initial change I wanted to make was to change the if/else in the for-loop, reducing it to one line:

```
count[num] = 1 + (count[num] || 0)
```

Oddly, this came back with a runtime of 148ms and a memory usage of 53.6 MB. 

My first alternate solution addressed memory, and I chose to modify the array in place by first sorting the array and then iterating over it by comparing values and splicing duplicates and unique values. We know this will work because duplicates appear no more than twice according to the directions; if this stipulation was not in place, we would need another comparison that looks father ahead (something like `nums[i] !== nums[i + 2]`). 

```
var findDuplicates = function(nums) {
    nums.sort();
    for (let i = 0; i < nums.length; i++){
        if (nums[i] === nums[i + 1]){
            nums.splice(i + 1, 1)
        } else {
            nums.splice(i, 1)
            i--;
        }
    }
    return nums;
}
```

Once again, this works but produces a runtime of 1204ms beating only 10.12% of JS submissions, but improves a bit on memory usage, using only 47.7 MB, beating 37.52% of JS submissions. 

Looking to come up with a one-line solution, I took the same logic from the previous submission and filtered the array. 

```
var findDuplicates = function(nums){
    return nums.sort().filter((val, idx, arr) => arr[idx - 1] === val);
}
```

This improved on the previous submission's runtime: 168 ms, beating 34.12% of JS submissions. Memory usage was 46.8 MB, beating just under 50% of other JS submission; this was our best bet in memory usage so far. 

None of these are the fastest or most efficient solutions, but it is good to see different possibilities and I will keep working on something better and faster.
How to Deal With Imposter Syndrome
Tags: beginners, codenewbie, career, productivity
Published: 2020-08-28 15:57:53

When I first started writing code, none of it felt like it was good enough for me to consider myself a developer. When I started my first job at a big company, it didn't feel like I belonged there. I thought every other developer was smarter and more talented that I was.

One of the biggest problems with imposter syndrome is that it never really goes away. Since software development never stops evolving, there will always be more that I don't know.

I've come to realize that when I'm working on something that's outside of my comfort zone, that's when imposter syndrome creeps up on me. After almost two years of coding, here's how I've been dealing with imposter syndrome:

1. Remember that **it's okay to feel like this** as long as you're learning, growing, and contributing.
2. **Get comfortable with being uncomfortable.** It means that you're working on something outside your comfort zone and you're learning. 
3. **Adopt a growth mindset.** Acknowledging that you don't know everything means you're willing to improve your skills, which is far better than believing you know it all. Take on new opportunities and challenge yourself.
4. **It's okay to ask for help!** No individual developer knows everything. Talk to your seniors and ask questions when you don't understand something.
5. **Keep track of your accomplishments.** Being able to reflect on your successes will remind you of how far you've come. That goal isn't to be perfect, or even the best, just a little bit better every day.
6. **Write down your career goals.** By knowing what you want to do down the line, you're setting yourself up for success. Knowing what you want will help you plan out the steps to get there.

Imposter syndrome is very much still a thing for me. Instead of fighting it, I've learned to embrace it. Feeling imposter syndrome is just a reminder that I'm learning something new and expanding my knowledge and skills as a developer.

Hope this helps! If you have other ways of dealing with imposter syndrome, share them below in the comments!
null vs undefined
Tags: beginners, webdev, javascript
Published: 2020-08-28 15:56:19

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

**Thanks for reading 💙**  
Follow **@codedrops.tech** for daily posts.  
[Instagram](https://www.instagram.com/codedrops.tech/) ● [Facebook](https://www.facebook.com/codedrops.tech/)

Micro Learning ● Web Development ● Javascript ● MERN stack  
**www.codedrops.tech**
Dev.to Writing: Polls?!
Tags: writing, tutorial, poll, howtodevto
Published: 2020-08-28 15:51:26

_Cover photo by [Element5 Digital](https://unsplash.com/@element5digital?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/poll?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)_

---

Since @ben refused to answer [my question](https://dev.to/kallmanation/comment/145c8) on how to setup polls (like [this one](https://dev.to/ben/are-you-a-confident-developer-3j4j)), I had to find out for myself!

There's no reference to it in any of the [documentation](https://dev.to/p/editor_guide)... so I went to the [source](https://github.com/forem/forem).

Digging into [forem](https://github.com/forem/forem) (the open source code that powers DEV) I found references to the `poll` liquid tag.

It's hard to infer just by looking at the code, but based on how tags work (and how I would implement it), I believe starting a poll on DEV looks something like so:

```
{% poll "Is this how you start a poll?" "Yes" "No" %}
```

So I threw that into my post and:
![Error message stating "Whoops, something went wrong: base User is not permitted to use this liquid tag](https://dev-to-uploads.s3.amazonaws.com/i/yzc0haz2v77v4sm5613t.png)

I guess those lines in the [`PollTag` class are working](https://github.com/forem/forem/blob/5eda086e782ef65d5fc14811de57a0efa90909ba/app/liquid_tags/poll_tag.rb#L4-L7):
```ruby
  VALID_ROLES = %i[
    admin
    super_admin
  ].freeze
```

And surprisingly it seems like I'm not an `admin` or a `super_admin`...

I guess until the almighty @ben and company decide to release such a magical feature to us unwashed masses we'll have to go about this another way:

If you think polls should become a widely available feature, react with a 🦄
If you think polls are a blessing only the elite should disseminate, react with a ❤️
If you want to check back in on the status of this poll, react with a 🔖

---

Thanks for reading!

If you have a question of your own about DEV, just ask in a comment. I read all of them and would love to add another post in this series that will actually help other writers in this awesome community!
Find My Diamond - A Web Components Starter Project
Tags: javascript, 100daysofcode, webdev, vue
Published: 2020-08-28 15:49:48

# Reusable Components Using Vanilla JS
Always I use to wonder about how to create reusable components in Pure Vanilla JS. Using Vanilla JS is bliss because you get to work and build your solution from the ground. 

# Web Components to the Rescue and Learn it using a Project
```As I follow - To learn anything, start Building something.```

Project URL - https://diamond.kaustubh.dev

# Description 
Find My Diamond is a puzzle game that is written in pure JavaScript, HTML/CSS with the usage of Web components.
My #100DOC - Day 2
Tags: 100daysofcode, challenge, log
Published: 2020-08-28 15:47:58

### Day 2: August 28, 2020

#### **Today's Progress**: 
1. **[Help on Stack Overflow](https://es.stackoverflow.com/questions/385290/problema-con-el-netbeans-y-los-audio-mp3/385486#385486)** | [GitHub Repository](https://github.com/pablohs1986/learningJavaSwing/tree/master/buttonWithMusic) (1h 5min):<br>A question from a colleague served to practice a bit of Java Swing. In this case, I had to configure a .mp3 file playing in the background and a button to exit the program. Also, I added the option to play .wav.
    
#### **What I learned**: 
* Handle .MP3 and .WAV files in Java Swing.

#### **Total time**:
1h 5min.