teleren/devto huggingface dataset:
My Favorite VS Code Shortcuts
Tags: vscode, shortcuts
Published: 2020-09-22 16:02:00

## Open a Terminal: CTRL + ~
You could have both Ubuntu (or your favorite CLI) and VS Code open, but why when you don’t have to? CTRL + ~ will open a terminal window, right in VS Code. Clicking the plus symbol in the terminal window will open more terminal windows. This comes in handy when running a backend and a frontend server, while also running GIT commands.

## Copy or Cut an Entire Line: CTRL + C/X
Want to reuse a line of code in another place? Place your cursor at the beginning or end of the line in question, and press CTRL + C to copy or CTRL + X to cut the whole line. No highlighting necessary!

## Go to File: CTRL + P
Building a Rails app and can’t find your schema file? No problem. CTRL + P will bring up a search bar where you can type in the name of the file you’re looking for. Clicking on a highlighted section will open (or navigate to) that file.

## Find & Replace
Looking for a line of code in the file you’re in? CTRL + F will bring up the search function for the current file. Use CTRL + SHIFT + F to search all of the files in the current director. In the search bar you will find options to match case, match whole word, and use regular expressions. CTRL + H will open the find and replace function.

## Select All Occurrences
This one can look like magic when you’re watching someone else code. Need to change all occurrences of a specific word- like a variable name? Click the variable or word in question and hold CTRL + SHIFT + L to select all occurrences. Start typing to replace all occurrences with a new word or variable.

## Open Next Tab
I almost always code with a minimum of 4 open file tabs. This shortcut will help you navigate all those open tabs without having to use a mouse. CTRL + TAB will open the next tab. CTRL + SHIFT + TAB will open the previous file tab.

## Bonus: Color Changes for Easier GIT Commits
I know you all are diligent committers, so you may never need this one. But on the chance that you’re anything like me, and work on more than one file at a time without committing, this one will help you out. Take a look at your left sidebar. Files with changes to be committed, will appear in yellow with an M to the right of the filename. New and untracked files will appear in green with a U. Open a modified file. Changed lines will have a color between the line number and the line itself. Green is for additions, blue for modifications and red for deletions. Commit early and often, but use these context clues for when you forget!
Truthy and Falsy values
Tags: javascript, webdev, beginners, codenewbie
Published: 2020-09-22 15:59:47

Falsy values - `false`, `0`, `""` (empty string), `null`, `undefined`, & `NaN`. 

Truthy - `"false"`, `"0"`, `{}` (empty object), & `[]` (empty array)

---

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

Micro-Learning ● Web Development ● Javascript ● MERN stack ● Javascript  
**[codedrops.tech](https://www.codedrops.tech/)**
🔥🔥🔥it's fast, it's easy~ step-tooltip
Tags: javascript
Published: 2020-09-22 15:56:29

* demo: https://step-tooltip-example.logiczc.vercel.app/
* github: https://github.com/Rabbitzzc/step-tooltip/tree/v1.0.3

---

I wrote a tool function for the guide page to quickly create a boot flow.
Laravel CRUD Generator
Tags: laravel, crud, generator
Published: 2020-09-22 15:56:00

[Laravel CRUD Generator](https://github.com/mehradsadeghi/laravel-crud-generator) is a simple and light-weight wrapper on Laravel's default controller generator, Which makes creating a controller with a pre-defined CRUD like a breeze.

You can define your validation rules in an interactive way that [crud-generator](https://github.com/mehradsadeghi/laravel-crud-generator) provides. Also it is compatible with Laravel 5.x, 6.x, 7.x, 8.x and 9.x.

There is demo available [here](https://github.com/mehradsadeghi/laravel-crud-generator) which is showing how it's done :)

#### Installation
`$ composer require mehradsadeghi/laravel-crud-generator`

#### Usage

It works based on your `$fillable` property of the target model.

If you would like to use `$guarded` instead of `$fillable`, It is supported too. In that case you'll need to have an existing Schema (table), Then the crud generator will automatically figures out your fillables.

As an example:

`$ php artisan make:crud UserController --model=User`

If you would like to have validaiton rules too, You may enter the `--validation` option:

`$ php artisan make:crud UserController --model=User --validation`

#### Customizing Default Stubs
It is possible to publish default stubs and change them in a way that fulfills your requirements.

In order to do this:

`$ php artisan crud:publish`

The published stubs will be located within stubs/crud directory in the root of your application. Any changes you make to these stubs will be reflected when you generate crud.

Feel free to take a look at [crud-generator](https://github.com/mehradsadeghi/laravel-crud-generator) repository.
EuroPython “Ask me Anything” [Finished]
Tags: ama, europython
Published: 2020-09-22 15:55:46

Dear Community,

we want to try a new experiment and run an “Ask me Anything” (AMA)to answer questions you may have, share our knowledge or help you in planning your online event.

Some of the topics we can cover:

* our tools research and findings
* our concepts for running an online conference or event
* our experience with running EuroPython online
* what we could do to support you
* how our Zoom license sharing works
* how you can apply for a grant
* how the EuroPython Society works
* how we run the EuroPython organization with fully remote work groups

and, of course, anything else :-)

**Post your questions in the comments section below.**

If there is demand, we’ll probably have these AMA here on DEV on a monthly basis to keep the momentum going.

BTW: We are making [our conference resources](https://www.europython-society.org/resources) available on our website, in case you have missed our blog post earlier this year.

Many thanks.

Enjoy,
–
EuroPython 2020 Team
https://ep2020.europython.eu/
https://www.europython-society.org/
Advice needed: How not to get frustrated when time runs out
Tags: discuss, productivity, help, psychology
Published: 2020-09-22 15:44:51

---
title: Advice needed: How not to get frustrated when time runs out
published: true
description: How does one not get frustrated, when the time for a task runs out or the workload is too much for the timeframe
tags: discuss, productivity, help, psychology
//cover_image: https://direct_url_to_image.jpg
---

I notice that I get frustrated quite easily when the time for a task runs out. This do not necessarily have to be deadlines that are not met, but also self imposed time frames for tasks.

Especially today was a rough day in which I did not complete much of the tasks I thought I would be able to do today. I'm at a point right now where I say quit that and ask the DEV community for help and advice.

How do you deal with the frustration or what are your methods to prevent this?
Poll: What is your prototype color?
Tags: webdev, css, html, testing
Published: 2020-09-22 15:11:29

When I'm working in CodePen or debugging in DevTools, I'll usually default to using red on properties to get a quick idea of what I'm working with. For example: `background: red;`. I'm curious though, what color do you default to? I'd be interested to see if there's a de facto standard that we unintentionally realize or if the results are more random.

[What is your prototype color?](https://forms.gle/bkQjnVVVe6NcxZP28)

Share with your friends and coworkers!
https://forms.gle/bkQjnVVVe6NcxZP28

I don't frequent twitter, but share it if you do!
{% twitter 1308420805458636809 %}
Making a custom CrUX Dash shortcut in Chrome
Tags: chrome, chromeuxreport
Published: 2020-09-22 15:11:18

---
title: Making a custom CrUX Dash shortcut in Chrome
published: true
description: A short walkthrough of setting up a Chrome search shortcut to launch a custom CrUX Dashboard
tags: chrome, chromeuxreport
//cover_image: https://direct_url_to_image.jpg
---

![Configuring the shortcut](https://dev-to-uploads.s3.amazonaws.com/i/2k1o5lfq04s1nuzxaash.png)

The CrUX Dashboard is a really easy way to see how real users experience the web, with data available for millions of websites. For developers who want to quickly jump into the CrUX Dashboard for a website, I made the [CrUX Dash Launcher](https://github.com/rviscomi/crux-dash-launcher), a tiny web app that takes an origin and redirects you to its dashboard, by taking advantage of URL parameters.

Now there's an even easier way to launch into a customized CrUX Dashboard, using Chrome search shortcuts. Setting it up is almost as easy, as I've done here in under a minute:

{% youtube t88_MvwLrns %}

Here's how to set it up yourself:

1. Go to [chrome://settings/searchEngines](chrome://settings/searchEngines)
2. Click **Add** and enter the following URL:
    ```
    https://datastudio.google.com/c/u/0/reporting/bbc5698d-57bb-4969-9e07-68810b9fa348/page/keDQB?params=%7B%22origin%22:%22%s%22%7D
   ```
3. Set the search engine to `CrUX Dashboard` and the keyword to something unique and easy to type like `cruxdash`

![Chrome search shortcut for CrUX Dashboard](https://dev-to-uploads.s3.amazonaws.com/i/jcic25sz7v2pszwp8znf.png)

Now you can start typing `cruxdash` in the URL bar, and after pressing the `<Space>` key, it should prompt you to "Search CrUX Dashboard". Enter any website's origin (scheme, subdomain, and domain), eg `https://dev.to`, and press enter to be taken directly to a [custom CrUX Dashboard](https://datastudio.google.com/u/0/reporting/bbc5698d-57bb-4969-9e07-68810b9fa348/page/keDQB?params=%7B%22origin%22:%22https:%2F%2Fdev.to%22%7D) for that website. Voila!
Day 0 | Planing to do 100DaysOfCode
Tags: 100daysofcode, gatsby
Published: 2020-09-22 15:03:38

Burnout...

I was tired of my current job.
My brother advises me to try the #100DaysOfCode challenge.

So I just followed 😄.
I need something to make confidence and start to learn new things.

Planning
- What to learn
- What to Re-Learn
- Goal

Done
- Register https://dev.to
- Launch my 100-days-of-code site https://nijicha_100.gtsb.io
Super Excited - Writing my first Golang book
Tags: go, development, coding, author
Published: 2020-09-22 14:51:48

Hey all :)

Super pumped about this and I want to ensure I keep the community up to date. I'm writing my first Golang book and I'm very excited about it. I'll be posting stories and updates about my journey.

I posted something similar on Reddit and it got some love. Feel free to check it out if you'd like to see the conversations! https://www.reddit.com/r/golang/comments/ivdt43/super_excited_writing_my_first_golang_book/

If you'd like to follow along, check out my Twitter: https://twitter.com/TheNJDevOpsGuy
VS Code's secret snippets
Tags: webdev, vscode, productivity
Published: 2020-09-22 14:48:40

Did you know that VS Code has built-in snippets for lots of languages?

![js snippets](https://dev-to-uploads.s3.amazonaws.com/i/oajt1gu90yzgcgqgs75k.png)

They are **not documented** in the VS Code docs.

There is **no way to browse them inside VS Code**.

## How can you find them?

It's awkward to track them down yourself! 

This spurred me to write an extension called [**Snippets Ranger**](https://marketplace.visualstudio.com/items?itemName=robole.snippets-ranger) has a nice UI to explore and edit all snippets easily.

<a href="https://marketplace.visualstudio.com/items?itemName=robole.snippets-ranger">
<img src="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ctlx4y36vz495ow8oqv3.png" alt="snippets ranger extension logo" title="Snippets Ranger" style="width:200px;margin:0 auto;"/>
</a>

![snippets ranger demo](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qs13zxmnihd2g6dslvnt.gif)

Snippets can be defined in a number of different places. They can be added by:
- Creating a global snippets file, a workspace snippets file, or a language-specific file;
![user snippets](https://dev-to-uploads.s3.amazonaws.com/i/b1n9z82q4c63p8syc901.png)
- Installing extensions found in the ["Snippets" category](https://marketplace.visualstudio.com/search?target=VSCode&category=Snippets&sortBy=Installs) in the Visual Studio Marketplace;
- Installing some of the [Programming Language extensions](https://marketplace.visualstudio.com/search?target=VSCode&category=Programming%20Languages&sortBy=Installs), which often have hidden snippets cargo e.g. [Python](https://marketplace.visualstudio.com/items?itemName=ms-python.python);
- the VS Code team to the built-in language extensions.

Keeping track of them is not possible by yourself.

## How do I find the built-in snippets myself?

If you want to track down the source files yourself, they live inside each individual language extension directory. The file for each language is located at `«app root»\resources\app\extensions\«language»\snippets\«language».code-snippets` on Windows. The location is similar for Mac and Linux.

## Find this helpful?

I would appreciate if you add a [favourable review](https://marketplace.visualstudio.com/items?itemName=robole.snippets-ranger&ssr=false#review-details) in the marketplace or star the [github repo](https://github.com/robole/vscode-snippets-ranger).

If you encounter an issue or have a feature request, you are welcome to make an [issue on github](https://github.com/robole/vscode-snippets-ranger/issues).

---

<small><span>Banner Photo by <a href="https://unsplash.com/@markusspiske?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Markus Spiske</a></span></small>
Horizontal vs Vertical Scaling
Tags: systemdesign, server, loadbalancing, scaling
Published: 2020-09-22 14:45:31

## :bulb: Idea Behind the Scaling
Suppose I have a business application and I want to access it from anywhere over the internet, so I can make money. So, how I supposed to do that? I know you are brilliant and you have the answer. Yes!! I will rent a machine from a cloud provider and host it traditionally.
After some days my app becomes very popular and so many people are using it. Now the real problem begins. People are facing downtime and I am losing customers :facepalm:. So, I asked one of my friends and he told me to scale up the machine to solve the problem.

## :boom: What is Scalability?
Scalability is able to handle more requests with a bigger machine or adding more machines. There are two types of scaling,  
1. Vertical Scaling  
2. Horizontal Scaling  

**Vertical Scaling**
In one sentence, Buying a bigger machine called vertical scaling. I mean a single machine serves all the requests.

**Horizontal Scaling**
Adding more than one machine is called horizontal scaling. I mean you have already a machine and you add more machines with it to serve the requests. 

## :beers: Pros and Cons

|Horizontal | Vertical|
| --------- | --------- |
| 1. Load balancer required | 1. N/A |
| 2. Call over the network (Little Slower) | 2. Interprocess communication (Faster)|
| 3. No problem until all the servers crash | 3. Single point of failure |
| 4. Data Inconsistency | 4. Consistent |
| 5. Nicely scale up according to need | 5. Hardware limits at some point. |

## :rocket: Conclusion
So, now the big question is **Which one should we use :question:** My answer is **Both**. This actually depends on the system you are designing. Both the scaling system have some good sides. You just need to think about how much big a system you are going to build and how many requests you need to serve in each second and is it consistent to use this model. That it. You'll have your answer.
macOS Mojave
Published: 2020-09-22 14:39:14

many times we come across the trouble with the screen resolution issues in Windows 10 and macOS. hopefully, there are always methods to overcome such issues. 

But today we are going to talk about the screen resolution on macOS Catalina. Especially, when it is installed on a virtual machine. But the screen resolution problem always exists. 

tool: better.
download: Available.
 Time: today.
should you prefer: As you wish.

What we need to do is to find ways to overcome such issues. macOS Catalina is one of the latest versions of macOS. And like this, there are also multiple ways. What we have got we have provided in this report.

https://www.pinterest.com/
https://www.apple.com/mac/?cid=OAS-US-DOMAINS-mac.com


[url=https://flic.kr/p/2jJmskG][img]https://live.staticflickr.com/65535/50362398046_f0f3913d30_n.jpg[/img][/url][url=https://flic.kr/p/2jJmskG]

[img]https://live.staticflickr.com/65535/50371621641_4814b85ae5_c.jpg[/img][/url][url=https://flic.kr/p/2jKaJcc]


[img]https://live.staticflickr.com/65535/50371621736_066cf2cb3c_c.jpg[/img][/url][url=https://flic.kr/p/2jKaJdQ]
https://techvatan.com/fix-macos-mojave-screen-resolution-on-vmware/
https://techvatan.com/fix-macos-catalina-screen-resolution-on-virtualbox/
[img]https://live.staticflickr.com/65535/50370919478_d055e727b2_z.jpg[/img][/url][url=https://flic.kr/p/2jK78sW]
How to automate Skype?
Tags: python, webdev, automation, showdev
Published: 2020-09-22 14:36:09

Skype, Hangout, Slack, Microsoft Teams, zoom, and many more chat and video calling applications we have but as a developer, we use a single application for a project, mostly one that our client is comfortable with.

I have to use Skype and there are no official APIs for automating Skype unlike other applications so I found an unofficial opensource python library **SkPY** for interacting with the Skype HTTP API.

The aim of this library is to provide feature-complete support for Skype for Web. So far, it supports:

* contacts: retrieving the contact list and groups, sending and responding to invites, searching the directory
* conversations: sending text messages, marking read, rich text formatting, file/image transfers, shared contacts
* group chats: creating new conversations, adding/removing members, delegating admins, setting topic/history, join URLs
* events: receiving conversation messages, status and endpoint changes
* and more: translation API, user settings, credit/subscription info

Here is the sample python code snippet to automatically respond to a message

```
from skpy import SkypeEventLoop, SkypeNewMessageEvent

class SkypePing(SkypeEventLoop):
    def __init__(self):
        super(SkypePing, self).__init__(username, password)
        print("initialized! watching for events")
    def onEvent(self, event):
        if isinstance(event, SkypeNewMessageEvent) \
          and not event.msg.userId == self.userId :
          # sending automated reply
          event.msg.chat.sendMsg("Hi there! Maulik is currently not available. If urgent you can call him at 91********")

sk = SkypePing()
sk.loop()
```
Let's see the demo
{% youtube I-MexuWOnsY %}


We can achieve many things by automation like we can create a script to send a reminder to a group/person and schedule it through cron job or we can keep watch on how many calls we have attended and how much time we spent on skype meetings etc.
Generating a Self Signed Certificate using Powershell
Tags: devops, security, testing
Published: 2020-09-22 14:26:30

A self-signed certificate it's very easy to create and helps with our local development and testing.

With a Single Line of PowerShell code, we create a certificate.

First, open the PowerShell as Administrator  and run the following command:

```
New-SelfSignedCertificate `
   –DnsName <DNS-Name> `
   -CertStoreLocation "cert:\LocalMachine\My"
```

The default expiration is 1 year. If you want a custom expiration date use option -NotAfter.

```
New-SelfSignedCertificate `
   –DnsName <DNS-Name> `
   -CertStoreLocation "cert:\LocalMachine\My" `
   -NotAfter [System.DateTime]::AddYears(3)
```
![PowerShell result](https://res-5.cloudinary.com/ht54oxr6q/image/upload/q_auto/v1/ghost-blog-images/generating-cert.png)

That is it. Done!! The certificate was created and stored in our Certificate Store of Windows.

> Note the parameter "CertStoreLocation", this is where the cert will be stored. cert:\LocalMachine means Local Machine Cert store.

Now, let's export it as a .pfxfile into a local directory.
In the same Powershell window run the following commands.

```
#create a password for our cert
$pwd = ConvertTo-SecureString -String "SOME-PASSWORD" -Force -AsPlainText

#finds the certificate in our local store
$cert = Get-ChildItem -Path cert:\LocalMachine\my | where Subject -eq "CN=rmauro.dev" 

#exports the certificate to temp directory
Export-PfxCertificate -FilePath c:\temp\rmauro.dev.pfx -Password $pwd -Cert $cert
```
![Export result](https://res-5.cloudinary.com/ht54oxr6q/image/upload/q_auto/v1/ghost-blog-images/cert-powershell.png)

In my scenario, the cert name is *rmauro.dev*. Change it to yours.
Check the directory temp to find the certificate - rmauro.dev.pfx.

Leave a comment if you like it or dislike.

Also check out my blog [https://rmauro.dev](https://rmauro.dev).
goURL release 0.1
Tags: opensource
Published: 2020-09-22 14:19:18

# goURL

check dead links inside a file.

# Usage

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

After clone the repo,

```bash
cd goURL

go run main.go *.txt

go run main.go urls2.txt
```

# Features

- Check usage

`go run main.go`

- Check version

`go run main.go -v`

`go run main.go --version`

- glob patterns

`go run main.go *.txt`

- colorfull output
bad URLs in red, good URLs in green, unknown URLs in gray

- support parallelization using go routine

- optimize network code by only request header
Generating Mock Data API
Tags: api, mock, data, generator
Published: 2020-09-22 14:18:24

Today I write to show you a new tool, an **API to get mock data for your tests and database**.

It's free up to 500 per day.
Each request can return up to 100 results, so you can generate for free up to **50.000** generated data items per day.

[Mocking data generator API](https://api.generadordni.es)

This API have, now, this resources:
- **DOI**
NIF, NIE, CIF and NIF of most European countries
- **PERSON**
Generates passport codes, ssn, email, password and usernames
- **BANK**
Generates bank accounts and credit cards
- **TEXT**
Generates from characters, words or paragraphs. Everything customizable.
- **VEHICLE**
Generates platenumbers and VIN codes
- **PROFILES**
Generates full profile data for person and companies
- **MISC**
Generate a lot of other codes and numbers such as LEI, ISIN, Cadastre references, CUPS codes, IMEI, Zipcodes, etc
- **CUSTOM**
This is a under subscription resource, which provides and endpoint where you can generate customized objects

I hope you like this tool and it can help you in your tests!

Best regards!