teleren/devto huggingface dataset:
Problemns with Remote Desktop (MSTSC)
Tags: IT, Tech
Published: 2020-04-27 15:59:43

# IT Support tips & quicknotes

 Hey guys! Here I'm gonna tell you about some tips and tricks I've learned as IT Analyst working on a Helpdesk company. The complete doc about it can be found [here](https://rodcordeiro.github.io/TodayILearned/IT_Support_quicknotes). But now, let's talk about this error:

#### The remote session was disconnected because there are no remote desktop client access licenses for this computer.

 Sometimes, the windows just stop recognizing your access trough mstsc, returning the error that *"The remote session was disconnected because there are no remote desktop client access licenses for this computer"*, I didn't found a good explanation about it yet, but it returns an error, saying to call the network administrator.
 
 ![error reference](https://rodcordeiro.github.io/TodayILearned/assets/conexao_remota_erro_licencas.png)

 To solve this, it's pretty simple:

 1. You will run **Regedit**
 1. Go to `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\`
 1. Delete the `MSLicensing` key and close regedit
 1. Run the MSTSC as administrator and *'et voilá'*!
Depois do Café - Episodio 9 - Processo Seletivo (com Filipe Pereira "Barba")
Tags: podcast, programação, portugues, processoseletivo
Published: 2020-04-27 15:49:25

---
title: Depois do Café - Episodio 9 - Processo Seletivo (com Filipe Pereira "Barba")
published: true
description: Nesse episódio a gente fala sobre algumas histórias de processos seletivos que deram e que não deram certo. Falamos desde procurar a vaga, entrevistas e até testes.
tags: podcast, programação, portugues, processo seletivo
---

{% spotify spotify:episode:2Akl1GXOp6FmKrdCBtja1K %}

Você também pode ouvir no seu aplicativo preferido: [iTunes](https://podcasts.apple.com/br/podcast/depois-do-caf%C3%A9-com-airton-zanon/id1480842641), [Breaker](https://www.breaker.audio/depois-do-cafe-com-airton-zanon), [Google Podcasts](https://www.google.com/podcasts?feed=aHR0cHM6Ly9hbmNob3IuZm0vcy9lMGU0MDU4L3BvZGNhc3QvcnNz), [Overcast](https://overcast.fm/itunes1480842641/depois-do-caf-com-airton-zanon), [Pocket Casts](https://pca.st/bpyo3i4y), [Radio Public](https://radiopublic.com/depois-do-caf-com-airton-zanon-6r2oLq), [Spotify](https://open.spotify.com/show/4cqX5o40bClwqtYHv9X7Lp)

Nesse episódio a gente fala sobre algumas histórias de processos seletivos que deram e que não deram certo. Falamos desde procurar a vaga, entrevistas e até testes.

Este foi um episódio da Série Corona Edition, na qual vamos lançar um episódio menor que o normal toda semana, durante este lockdown, para comentar o que estamos fazendo depois do café.

----------------------

**Participantes:**

Airton Zanon - [@airtonzanon](https://twitter.com/airtonzanon) (twitter)

Elisa Pedrosa Reis - [@liisapedrosa](https://twitter.com/liisapedrosa) (twitter)

Filipe Pereira - [@filipe_mp](https://twitter.com/filipe_mp) (twitter)

----------------------

**Links comentados:**

Angel List: [https://angel.co](https://angel.co)

Stackoverflow Jobs: [https://stackoverflow.com/jobs](https://stackoverflow.com/jobs)

Landing Jobs (agora indeed) [https://www.indeed.com](https://www.indeed.com)

----------------------

 Para mais episodios e saber mais sobre o podcast acesse https://anchor.fm/depoisdocafe.

Siga-nos no twitter [@dpsdocafe](https://twitter.com/dpsdocafe)
Spring Boot : Handling Exception
Tags: java, springboot
Published: 2020-04-27 15:39:57

Example of how to handling exception in Spring Boot.

* Annotate Exception with `@ResponseStatus`

```java
@ResponseStatus(code = HttpStatus.INTERNAL_SERVER_ERROR, reason = "I don't know...")
public class MyException extends Exception {

    public MyException(String message) {
        super(message);
    }
}
```

This will response HTML error page as screenshot below.

* Throw `ResponseStatusException` from Controller.

```java
@GetMapping("/users/{id}")
public User findUser(@PathVariable Long id) throws MyException {
    throw new ResponseStatusException(HttpStatus.INTERNAL_SERVER_ERROR, "I don't know this too...");
}
```

* Use `@ControllerAdvice` as global exception handling.

```java
@ExceptionHandler(MyException.class)
@ResponseStatus(HttpStatus.INTERNAL_SERVER_ERROR)
@ResponseBody
public String handleMyException(HttpServletRequest request, Throwable ex) {
    return "I don't know anything...";
}
```

We can remove `@ResponseBody` if we use `@RestControllerAdvice` instead of ``@ControllerAdvice``
I created a messenger bot for my University
Published: 2020-04-27 15:32:44

 [Bot link](https://www.facebook.com/NUKIT-105147994485858/)

Here's what I have used:

1. Node js - Typescript (natural, cheerio, boot bot, request, MySQL
2. Heroku for hosting
3. Canva for graphics and videos
4. Corona API from [corona.gov.bd](https://corona.gov.bd)
5. Results from nu.ac.bd

https://www.reddit.com/user/-princebillyGK-/comments/g7ebsi/i_created_a_messenger_chatbot_for_my_university/?utm_medium=android_app&utm_source=share
Just Released: Minimal Sass / HTML Template Site
Tags: showdev, css, html, webdev
Published: 2020-04-27 15:11:03

Over the weekend, I boosted my existing `html-sass-jumpstart` repo to a more easily customizable and useful minimal Sass and HTML template repo.

[**Head on over to the docs**](https://5t3ph.github.io/html-sass-jumpstart/) or get a brief intro below.

## Who is this for?

Anyone who wants to get a site up and going to host basic content and doesn't need features of a full static site generator - just good ole HTML and CSS!

Also great for:
- practicing improving your use of Sass
- ditching the bulk of heavier frameworks that you're only using a subset of
- creating Github/Bitbucket pages for small projects
- quickly launching a basic site on Netlify or similar hosting

## Features

- node-sass powered, includes stylelint and prettier, and autoprefix and minifying upon build. Develop script includes hot-reload via browsersync.
- **Final base styles 2kb** minified and gzipped
- Uses BEM class naming format, but reasonable element styles are also included.
- Essential layout utilities mix grid and flexbox to "pick the right tool for the right job"
- Foundational theme system with colors, typography, and utility styles that include easy overrides to prevent bulking final build
- Two essential components: buttons and cards

> [**Check out the docs**](https://5t3ph.github.io/html-sass-jumpstart/) or go ahead and [use the template](https://github.com/5t3ph/html-sass-jumpstart)

## Origins/Philosophy

My day job is leading the development of a large enterprise design system. But on a personal note, I often need something to just get a project started, and typically I don't need React or an SSG.

This is a slim themeable Sass framework with just the features I often find myself needing for a basic content site.

I'm a fan of BEM, but for this type of project, there are some instances where element styling is appropriate. So reasonable defaults for expected content are included.

Additionally, I love utility class availability but it can easily add bulk, so overrides are available via Sass maps to trim out the values you don't need to reduce generated classes for things like colors and sizing utilities.

In terms of layout, a lot of frameworks go all-in on either flexbox or grid - but there's a time for both! So this package doesn't include a 12-col grid layout, but it does provide light layout utilities for simple modifications to solve general use cases like auto-sized responsive columns, simply placing a few elements in a row, and capping width with consideration to line-length.

I hope this can be useful to you, and I look forward to feedback!

✨Comments, issues, and pull requests welcome!
Automate Azure AD User Provisioning, with auto-generated passwords in Azure Keyvault
Tags: PowerShell, Azure, activedirectory, windows
Published: 2020-04-27 15:03:52

# Use Case
Ever encountered a situation where you are about deploy an App in a Windows Environment, and you realize you don't have an designated user account yet?
- You would ask your AD admin to create one for you (or do it yourself).
- Figure out a password with the correct complexity
- Note down the password (securely 😉) so that Team members can use it.

I assembled a script that takes a list of **Users** and a set of **Environments** (`dev`, `test`, `prod`, ...), which then either creates or updates the **AAD User**.
Passwords are auto-generated and backed in an **Azure Keyvault** -- this makes noting down passwords a thing of the past 🎉. 
You can find the boilerplate script (or set of functions) [here](https://github.com/mieel/snippets/blob/master/powershell/Ensure-AzureADUserAccounts.ps1).

> **Note**: This is meant to tailor to your business logic.

# Explanation
In my example, I have a simple list of **Services** and **Environments**: 
```
$Services = @(
@{ name = 'service_1' ; description = 'Service 1'},
....
)
$envs  =  @('Dev','Test','Acc','Stage','Prod')
```  
The User Account Names are consctructed from the **Service** and **Environment**, so for example the account name for `service_1` in `development` would be: `svc_d_service_1`

> NOTE: Again, Account Name logic can be entirely different in your business

For each **User Account**, the main Function `Set-ServiceAccountUser` is called:
- it checks if the User exists
- if it doesnt exist, the User will be created.
- When an User needs to be created, it checks the **Azure Keyvault** whether it has a Password available, if not, a Password is auto-generated  and stored in the Vault.
- If the User already exists, you can optionally update the password (in the Keyvault and AD) with the `-updatePassword` switch

Passwords are generated in the form of a `wer-yui-wwer35` (three syllables plus 2 digits).

> NOTE: Passwords logic can be found in the `New-Password` function. I'm using the `pronounceable` pattern of the `https://makemeapassword.ligos.net` api. This is totally customizable.

You will also notice that I use different Keyvaults for each **Environment**. You can find (and customize) the logic in the `Get-VaultName` Function.
Implementing your own Array class in javascript
Tags: javascript, todayilearned, webdev, oop
Published: 2020-04-27 14:49:46

An array is not a primary data type in javascript. So, today I thought can I implement my own javascript class that can implement an array. So, I tried it and I'm pretty happy with the results. You can see my whole implementation on [github](https://github.com/ajitsinghkaler/javascript/blob/master/interview/array.js).

The following were the API functions that I implemented:

size() - returns length

is_empty() - checks if array is empty

at(index) - returns the item at the given index, returns undefined if something is out of bound

push(item) = push an element at the end returns array

insert(index, item) - inserts an item at index, shifts that index's value and trailing elements to the right returns an array

prepend(item) - insert an element at index 0 returns array

pop() - remove from end, return element

delete(index) - delete item at index, shifting all trailing elements left, return element.

removeAll(item) - looks for value and removes index holding it (even if in multiple places) returns a new array

deleteAll(item) - looks for value and removes index holding it (even if in multiple places) returns the new array

find(item) - looks for value and returns the first index with that value, -1 if not found

> Let me know if you know any better implementations.
How do you manage Docker secrets?
Tags: docker, devops, discuss
Published: 2020-04-27 14:36:17

Now that you put `secrets` into `.dockerignore`

```sh
# .dockerignore
.env
```

How do you ensure the secrets is available?

- Building `docker build -t tag --build-arg SECRET_ENV .`, with `ARG SECRET_ENV` in `Dockerfile`
- Running `docker run -e SECRET_ENV tag`

Or, do you use [`docker secrets`](https://docs.docker.com/engine/swarm/secrets/)?

What do you recommend?

BTW, I thought [Oh-My-Zsh dotenv plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/dotenv) is the end, but it is not yet for Docker...
“Test Focus Highlighter” VS Code extension
Tags: testing, showdev, vscode, javascript
Published: 2020-04-27 14:34:16

This post was originally published on [my blog](https://dzhavat.github.io/2020/04/27/test-focus-highlighter-vs-code-extension.html).

---

I’m really excited to share a new VS Code extension called [“Test Focus Highlighter”](https://marketplace.visualstudio.com/items?itemName=dzhavat.test-focus-highlighter). 🎉

It’s an extension that visually highlights focused tests in spec files. Here’s a demo:

![“Test Focus Highlighter” in action](https://dev-to-uploads.s3.amazonaws.com/i/am9o4tzrf1doz5ogbq7p.gif)

Why did I build it?

Primarily for myself. I started writing tests for my code a few months ago and mistakenly committed focused tests in a couple of occasions. They were, fortunately, catched during pull request (PR) review but that is already too late in the process. I saw this as an opportunity to make a small tool that can help me identify focused tests during development by visually highlighting them. And when I say visually, I mean really making them stand out.

The extension does this in three ways:

1. Shows a warning icon in the gutter for each line covered by a focused test.
2. Shows a warning message when a focused test is hovered.
3. Shows a color in the overview ruler that makes it easy to see any focus tests in a big spec file.

![“Test Focus Highlighter” features](https://dev-to-uploads.s3.amazonaws.com/i/zhcbap94tposq5teprrw.jpg)

The extension will not prevent one from committing focused tests. It only aims to increase ones chances of catching such tests as early as possible.

I hope you will find the [extension](https://marketplace.visualstudio.com/items?itemName=dzhavat.test-focus-highlighter) beneficial as well!
Remote Soundboard
Tags: twiliohackathon
Published: 2020-04-27 11:16:44

---
title: Remote Soundboard
published: true
description: My submission to the Twilio x DEV Hackathon!
tags: twiliohackathon
---

## What I built
A soundboard that can be used by attendees during a remote presentation, attendees can access the page and react to a presentation, the sound then plays on any device that has the page open in the browser.

This allows the audience to react to a presentation, to hear other audience members reacting and for the speaker to get feedback from the audience on their talk, without them unmuting their microphone or when they're on a one-way platform (eg. Twitch, YouTube Live, Teams Live, etc).


#### Category Submission: 
COVID-19 Communications, Engaging Engagements, Exciting X-Factors
 

## Link to Code
{% github amykapernick/remote-soundboard %} 

## How I built it (what's the stack? did I run into issues or discover something new along the way?)
- Running on Express
- Using the Twilio Sync API to play the sound remotely on any device that has the page open

## Additional Resources/Info
Built on my Twitch stream
<https://www.twitch.tv/videos/603849527>

{% vimeo 413798818 %}

Live Demo also available on request (not hosted, running locally on my computer, but can be set up to demo)
Building a Push-Up Bot in Discord!
Tags: tutorial, python, 100daysofcode, showdev
Published: 2020-04-27 14:26:43

With covid-19 getting us all out of shape, we decided a push-up bot was in order. In this 10 minute tutorial, we walk you through how to build a bot in discord. 

Hope you all enjoy this one day build. Now drop and give me 20! 

https://www.youtube.com/watch?v=etSRnPp9H8s&t=18s
QR Code Generator in Asp.net C# using ZXing.Net Library
Tags: dotnet
Published: 2020-04-27 14:26:07

Generating the bar code is very easy, we have so many libraries are there. out of that, I am going to choose zxing QR, this assembly is very good for generating the QR code and reading the QR code. by using asp.net, we can generate and read the QR Code is very easy in c#.
About Ruby Hash#each_pair
Tags: ruby, hash, documentation
Published: 2020-04-27 14:25:47

---
title: About Ruby Hash#each_pair
published: true
description: 
tags: ruby, hash, documentation
---

Get more information and more examples at my AboutRuby project:
* [AboutRuby project](https://github.com/BurdetteLamar/AboutRuby/blob/master/core/Hash/api/markdown.md#each_pair)

Here's the write-up over at the Ruby project:
* [Ruby project](https://ruby-doc.org/core-2.7.0/Hash.html#method-i-each_pair)
Asp.Net Core Web API Tutorial For Beginners
Tags: dotnet, angular
Published: 2020-04-27 14:24:30

Some Basic Understanding of Asp.net Core web API.

Asp.net Core is a free, open-source and cross-platform framework. the main target of this framework to target the Cloud. Designed to run on the Cloud as well as On-premises.

 Why we need to go for asp.net core web API?

Supports Multiple Platforms: it supports Windows, Linux, Mac OS, etc.
IoC Container:
Hosting: we can host our asp.net core app on different servers like IIS, Apache, etc.
Fast: the application speed is more than asp.net.
Integration with Modern UI Frameworks: we can develop UI applications in React JS, Angular, Vuejs, etc.
Keeping Your Hands on the Keyboard: A Few Bash and Git Shortcuts
Tags: learning, thisweekilearned, git, bash
Published: 2020-04-27 14:22:57

Over the last few weeks I've picked up some helpful bash shell shortcuts. I'm no bash power user, but it does hurt my soul a little bit every time I'm in a terminal window and have to reach for the mouse or trackpad. With that said, I'm not great at memorizing long lists of shortcuts. It needs to be something I use a lot, or I trickle them gradually into my existing workflow. The latter was the case with the commands that my colleague introduced me to over the past few weeks. 

- `ctrl` + `e` 
    - moves the cursor to the end of the line
- `ctrl` + `a`
    - moves the cursor to the beginning of the line
- `ctrl` + `r` 
    - starts a `reverse i search` where you can grep through your terminal history
    - similar to using the `up` arrow key to cycle through the history, but with the ability to grep
    - press `ctrl` + `r` again to cycle through all the grep results
- `ctrl` + `c`
    - clears the current line
- `option` + `left`/`right` arrow 
    - moves the cursor by word
  - while this works by default in Apple Terminal, if you use iTerm, it needs a little setup : https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x

One more command that I've been using a lot lately is git specific. In this current project we have made it a point to have a clean git history, so when making pull request updates I've been doing a lot of interactive rebasing. What I would find myself doing is getting the log of last commits, then copy/pasting that SHA into my rebase command. The process would look something like this:

Log the last commits:

`git log`

Result:

{% gist https://gist.github.com/noelworden/bb1a1a8a57c187c0cc1e9918b4bf8a6e %}

Manually copy the appropriate SHA, and paste it into the rebase command:

`git rebase -i 2672f7a`

I learned that this can also be accomplished by counting back from `HEAD` and using any one of the following techniques to represent that number. For example, to rebase to that same SHA, two steps back from `HEAD`, any one of these options would work:

`HEAD^^`
`HEAD~~`
`HEAD~2`

That would make the interactive rebase command look like this:

`git rebase -i HEAD^^`

The amount of `^` or `~` after `HEAD` is simply the amount of commits you want to step back; same with `HEAD~2`, just change the digit to the amount of steps. This technique can be applied to anything in git where you need to step back from `HEAD`, for example, a `git reset`.

These are the handful of commands I have integrated into my workflow recently. If these commands are new to you and you'd like to incorporate more into your workflow a quick internet search will bring up more lists than you can shake a stick at.

------

This post is part of an ongoing *This Week I Learned* [series](https://dev.to/noelworden/beginning-of-a-blog-series-5aj3). I welcome any critique, feedback, or suggestions in the comments.
Tutorial: Building an Automated Message Board with Slack & Trello
Tags: tutorial, beginners, Slack, Trello
Published: 2020-04-27 14:21:36

*This video shows you a common use case using [WayScript](https://www.wayscript.com), a rapid development platform we're building. Please try it out and send us your feedback.*

##Introduction
Slack and Trello are undoubtedly two tools that can help increase productivity in your workflow. Slack is great for communicating what needs to get done, Trello is great at keeping track of all of those things. Sometimes whenever there seems to be too much to get done, we might forget to add those important things that we need to do to a Trello board.

For this example, let's see how we can create an automated response to happen whenever a message is posted to slack, with specific keywords. In this specific example, we'll be building a "bug board" that will remind us of all the bugs we need to fix. We'll add items to this bug board by using a keyword in a slack channel of "!bug".

##Let's get building!
This workflow will be activated by a slack trigger, therefore we need to be sure to activate this at the top of our tree.

![Slack trigger](https://cdn.wayscript.com/blog_img/59/Trigger.png)

Fill out your slack settings to integrate slack into this workflow. Then, we'll need to add some programming logic to make our keywords work. We'll add an in statement below and use this to find those keywords. Here's a completed example of finding the "!bug" keyword.

![If Statement](https://cdn.wayscript.com/blog_img/59/If_Statement.png)

Our last step is to integrate trello into the workflow. We'll need to configure this to a board so we know where to add the messages to.

Derrick at WayScript created a [video of this tutorial](https://youtu.be/1Mf5SP8vOwY). Please let us know if you have any questions!
Multiple Github PRs?
Tags: help, github
Published: 2020-04-27 14:20:06

---
title: Multiple Github PRs?
published: true
description: How to safely and sanely put up multiple pull requests on Github?
tags: help, github
---
Suppose (C'mon, just suppose):
- I'm working on some changes for a project on Github (say, the Ruby project).
- I have an open PR for a single file (say, <code>hash.c</code>) in my branch <code>hash</code>.
- I have more changes, to a different file (say, <code>array.c</code>), in my branch <code>array</code>, and I'd like to put up a second PR for those changes.
- When I offer to create a second PR for <code>array.c</code>, its changes include those for <code>hash.c</code>.

So:

- Is it possible to create a second PR for <code>array.c</code>, without including the changes for <code>hash.c</code>?
- If so, would a subsequent merge of either PR "foul" the other, so that it couldn't be sensibly merged?

Thanks for any help.