teleren/devto huggingface dataset:
I had received the 4 Week Streak Dev badge
Published: 2021-10-23 02:31:05

> ### You received the  **4 Week Streak**  badge
>
> Awarded for consistency of writing.
>
> ![4 Week Streak](https://res.cloudinary.com/practicaldev/image/fetch/s--L6TKY3HN--/c_limit,f_auto,fl_progressive,q_80,w_250/https://dev-to-uploads.s3.amazonaws.com/uploads/badge/badge_image/11/4WeekStreak-badge.png)
>
> _Congrats on achieving this streak! Consistent writing is hard. > The next streak badge you can get is the 8 Week Badge. 😉_
>
> [Visit your profile](https://dev.to/ksengine)
>
> You also get  [5 new credits](https://dev.to/credits)  to use for  [community listings](https://dev.to/listings)  if you have anything you'd like to promote. 🎉
PowerShell misc.
Tags: powershell
Published: 2021-10-23 01:49:11

[get all excel processes stop when it's done](
https://stackoverflow.com/questions/55423220/cant-get-all-excel-processes-to-stop-when-closing-through-powershell/55423449#55423449)
```
& {  # Create a temporary child scope.

  $excel = new-object -ComObject excel.application # create excel object
  $workbook = $excel.Workbooks.Add() # add a workbook
  $ws1 = $workbook.Worksheets.Item(1) # reference the 1st sheet

  # You must *always* call .Quit(), otherwise the Excel process lingers
  # for the entire OS users session.
  $excel.Quit()

} # On exiting this block, $excel, $workbook, and $ws1
  # go out of scope and release the COM objects when the
  # garbage collector runs next.

# Run the garbage collector now.
# The Excel process should terminate shortly after.
[GC]::Collect()


ーーーー



#CSV を読み紺で Excel で出力する。
#既にファイルがある場合は強制的に上書きされる

#参考：XlFileFormat 列挙型
#https://msdn.microsoft.com/ja-jp/library/microsoft.office.interop.excel.xlfileformat(v=office.11).aspx


$excel = New-Object -ComObject Excel.Application
$book = $excel.Workbooks.Open("c:\temp\test.csv")

#警告なしに上書き
$excel.DisplayAlerts = $false



#Excel 2003形式の xls で保存する場合

$book.SaveAs("c:\temp\test.xls", [Microsoft.Office.Interop.Excel.XlFileFormat]::xlWorkbookNormal)



#Excel 2007以後の形式の xlsx で保存する場合

$book.SaveAs("c:\temp\test.xlsx", [Microsoft.Office.Interop.Excel.XlFileFormat]::xlExcel5)



#HTML 形式で保存する場合

$book.SaveAs("c:\temp\test.html", [Microsoft.Office.Interop.Excel.XlFileFormat]::xlHtml)




$excel.Quit()



#プロセスを終了する
Gerenciando múltiplas contas do git [pt-BR]
Tags: git, beginners, tutorial, productivity
Published: 2021-10-23 01:12:14

Em algum momento você já deve ter se deparado com a necessidade de utilizar mais de um email na configuração do git. Seja por estar fazendo commits em projetos que utilizam um emails diferentes ou por que na mesma máquina você tem projetos feitos para empresas diferentes.

A troca do email normalmente pode ser feita pelo comando

```bash
git config user.email your@email.here
```

Mas, ficar alterando essa configuração manualmente toda vez que precisar fazer um commit em um projeto diferente não é muito produtivo, não é mesmo?

E se eu te disser que é possível realizar uma configuração específica do git para cada diretório?

## A solução

Vamos supor que você organize seus projetos em uma estrutura de diretórios dessa forma:

```
Development/
├── CompanyA
│   ├── project-a-1
│   └── project-a-2
├── CompanyB
│   ├── project-b-1
│   └── project-b-2
├── my-project-1
└── my-project-n
```

Para configurar uma conta diferente para seus projetos pessoais, projetos sob o diretório  `CompanyA` e projetos sob o diretório `CompanyB`, podemos fazer uso da [Inclusão condicional] de configurações no seu arquivo `.gitconfig`

A forma de como vamos trabalhar é deixando no arquivo `.gitconfig` todas as configurações compartilhadas e criar arquivos com configurações específicas para cada diretório.

**.gitconfig**


Seu arquivo `.gitconfig` se parecerá com assim:

```
[user]
    name = Mesaque Francisco
    email = my@personal.email
    signinKey = ......

...

[includeIf "gitdir:~/Development/CompanyA/"]
    path = .gitconfig-company-a

[includeIf "gitdir:~/Development/CompanyB/"]
    path = .gitconfig-company-b
```

**.gitconfig-company-a**


Seu arquivo `.gitconfig-company-a` se parecerá com assim:

```
[user]
    email = ...@companya.com
    signinKey = <diffrent key>
```

**.gitconfig-company-b**


Seu arquivo `.gitconfig-company-b` se parecerá com assim:

```
[user]
    email = ...@companyb.com
    signinKey = <diffrent key>
```

Note que aqui eu utilizei o parâmetro `signinKey` como exemplo de mais coisas que podem ser alteradas nesses arquivos, mas poderiam ser, por exemplo, aliases exclusivos para projetos da ComapanyB, uma ferramenta de diff.

## Estrutura final de arquivos

Imaginando que você esteja em um sistema unix-like, e esteja na sua home, ao listar seus arquivos teríamos essa visão:

```
.
├── Development
│   ├── CompanyA
│   │   ├── project-a
│   │   └── project-b
│   ├── CompanyB
│   │   ├── project-a
│   │   └── project-b
│   ├── my-project-1
│   └── my-project-n
├── .gitconfig
├── .gitconfig-company-a
└── .gitconfig-company-b
```

Para verificar se tudo funcionou corretamente, basta rodar dentro dos diretórios dos projetos o comando

```
git config user.email
```

Esse comando retornará o email atual utilizado para os commits.

[Inclusão condicional]: https://git-scm.com/docs/git-config#_conditional_includes
Easy React Table
Tags: react, npm, javascript, webdev
Published: 2021-10-23 00:56:31

## What?

A simple batteries included table component for React projects.
 
Say hello to [ez-react-table](https://www.npmjs.com/package/ez-react-table)!

⚡️ Try the [Demo](https://rowlinsonmike.github.io/ez-react-table/?path=/story/ez-react-table--demo)! ⚡️

## Why?

I build a lot of admin related dashboards and wanted a table that just works. A table with almost no setup and a nice user experience.

## How?

Out of the box you get a search bar for filtering, sorting, virtualized rows, infinite scrolling ability, effective styling (including dark mode), and sweet cell overflow handling with tooltips. Additionally, it is arbitrary to add custom components to row cells. 

### Setup

```bash
npm i ez-react-table
```

### Example

```javascript
import * as React from "react";
import EzReactTable from "ez-react-table";

// fake data
const data = Array.from(Array(20))
  .map((i) => [
    { first: "Michael", last: "Myers" },
    { first: "Laurie", last: "Strode" },
    { first: "Samuel", last: "Loomis" },
  ])
  .reduce((a, c) => [...a, ...c], []);

// define columns
const cols = [
  {
    title: "First",
    width: 200,
    key: "first",
  },
  {
    title: "Last",
    width: 200,
    key: "last",
  },
  {
    title: "Actions",
    width: 100,
    key: "action",
    center: true,
    render: (value, object) => (
      <button onClick={() => alert(JSON.stringify(object))}>View</button>
    ),
  },
];

function App() {
  return (
    <div className="App">
      <EzReactTable cols={cols} data={data} />
    </div>
  );
}

```

## End

Thanks for reading. In active development as I use across my projects. Stay tuned!

Peace.
No-Code Screenshot: Get Notified via SMS
Tags: nocode, workflows
Published: 2021-10-25 18:07:26

---
title: No-Code Screenshot: Get Notified via SMS
published: true
date: 2021-10-22 23:08:35 UTC
tags: NoCode,Workflows
canonical_url: https://maxkatz.org/2021/10/22/no-code-screenshot-get-notified-via-sms/
---

The screenshot below shows how to get notified via an SMS when a particular event occurs. For example, this automation can be used to notify when a user in an organization is provisioned (or de-provisioned). Any time you need to be notified via SMS this automation can be used.

[![Get notified with SMS flow](https://katzmax.files.wordpress.com/2021/10/flowgraphic_sms_twilio.png?w=1024)](https://katzmax.files.wordpress.com/2021/10/flowgraphic_sms_twilio.png)<figcaption>Get notified with SMS flow</figcaption>

This particular flow is a sub-flow which means it can be invoked from any other flow.

The flow consists of the following steps (cards):

1. The first card ( **Child Flow** ) is the input for this flow
2. The second **Compose** card creates a string message to be sent to Twilio with the actual message and to/from numbers
3. The next **Compose** card creates a string to call Twilio SMS API
4. The **Post** card invokes the Twilio SMS API

What I love about this automation is that it was created visually, without writing any code. To learn more about Okta Workflows, [try these tutorials](https://help.okta.com/wf/en-us/Content/Topics/Workflows/Tutorials/tutorials-workflows-learn.htm).
Welcome to the iiviiGames Devlog!
Tags: programming, tutorial
Published: 2021-10-22 21:40:07

Hello! My name is **Vee**, the one and only employee of iiviiGames.

While I work out the kinks in [my website](https://odd.codes), I'm going to start posting a series of tutorials I've been writing for _years_ on here.

See, to understand a topic better, I often write myself a tutorial.

That may sound bizarre, but when you don't have the money for school, and find the nature of a student/teacher relationship very helpful, you fill in that blank yourself.

## What are these tutorials about?

Well, they're about a lot of things. Mainly **game development**, but some are about general concepts in programming, like object-oriented, classes, inheritance, and a bunch of language specific quirks to different engines and paradigms.

## Let's talk Language

I'm going to teach you a lot about [GameMaker Studio](https://yoyogames.com), [Pico-8](https://lexaloffle.com/pico-8.php), and [Love2D](https://love2d.org).

I'm also going to teach you a lot about [Python](https://python.org) and [Javascript](https://javascript.info), as well as a handful of weirder or lesser known frameworks like [Ink](https://www.inklestudios.com/ink/), [Twine](https://twinery.org/), and [Amulet](http://www.amulet.xyz/).

## When do we start?

**NOW!** Check back often to find something new and I'm sure you'll learn a thing or two!
Lear React.js typescript tdd road map
Tags: react
Published: 2021-10-22 21:31:06

Hi guys i am fullstack web developer i used vue.js for 3 years and lately i started comparing everything i do with react. For example this month i started a new project with vue3 and firebase i looked for some helper library i found vuefire but it uses vue 2 and firebase 7, current version vue 3 firebase 9 and have so many issues and not so active compared to reactfire where it's already supporting firebase 9. And more importantly i did a huge mistake in my career i didn't focus on improving and do code testing, writing with typescript, contributing, and i want to make a radically change. So i decided to switch to react and learn typescript and learn TDD and start contributing and i don't know where to start. I am sure many people are facing the same issue and wanting to improve like me if any one to join me on this journey it will be great, and if there are someone who can mentor us or provide some road map and resources it will be awesome.
Day 478 : Piece Of Me
Tags: hiphop, code, coding, lifelongdev
Published: 2021-10-22 21:21:03

_liner notes_:
- Professional : Had a really good day. Actually put in time off request. It's been a minute! haha Reviewed a pull request. Put in a service request to get access to some stuff. Had a hangout meeting with some teammates and played an online guessing game thing. Pretty fun. Went back to working on a demo application. I got the sign up and log in working from before and now working with the data that comes back. I created a dashboard that shows up once there's a successful signup / login. Got the list of users to display and when you click, it will show the user details. I'm doing this in all vanilla JavaScript and trying out some new things to me like template. Coming together pretty well.

- Personal : Last night, I watched up to the second to last episode of "Squid Game". Whew... the series has been pretty awesome. Whenever the show lost a character, I felt like it was a piece of me. They really do a good job of making the viewer care about the characters. I also went through a bunch of tracks for the radio show. Also did some research into the issue I've been having with my side project. Since the thing that would be the perfect solution isn't in browsers yet, I'm probably going to roll with something similar to what I did in previous project. It involves a cron job that will run every hour. I was worried about the cost, but then I did some research and I don't think it will be too bad.  .

![The clouds above Žalý, Czechia so high up that the clouds are at the bottom of the photo and the clear skies at sunset](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dbqjm4n1939n6ygx8ik1.jpg)
  
Going to finish up the work for the radio show. I want to see if I can set up the cron job for my side project and see if I can get that working. Then I'll probably end the night watching the final "Squid Game" episode of the season.

Have a great night and weekend!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube l5KaHnyNC8g %}
PandaDoc launches API for Document Generation and eSignatures
Tags: launch, productivity, api, tech
Published: 2021-10-22 20:56:33

---
title: PandaDoc launches API for Document Generation and eSignatures
published: true
description: PandaDoc for Developers — easy and scalable all-in-one API solution for generating documents and capturing eSignatures by embedding them into your app, website, or using the backend API. Explore our fully featured and lifetime sandbox for free.
tags: launch, productivity, api, tech
//cover_image: https://ph-files.imgix.net/cfae7df6-6a76-40d2-a70a-5b3a260fa125.png?auto=format&auto=compress&codec=mozjpeg&cs=strip
---
Today, we’re launching PandaDoc for Developers on Product Hunt. 🚀

https://www.producthunt.com/posts/pandadoc-for-developers

Our new API platform will help developers to create and integrate custom eSignature and document workflow solutions that support their unique business processes and needs in a matter of days.

Check out our post on Product Hunt and be sure to throw us an upvote or comment if you like what you see!
Two weeks after launch, I am close to 100 subscribers 
Published: 2021-10-22 18:06:29

Hi everyone! Two weeks ago, I launched [indiegrow](https://indiegrow.substack.com/) as a way to help founders grow together on Twitter. What my free newsletter does is send tweets that are good for commenting. Subscribers (mostly founders) can reply and stay active on Twitter. For folks under 1000 followers, commenting is a vital strategy to gain a following and make friends!

My biggest challenge for this daily newsletter is sending it out every day.  Even though sometimes it can get tricky to keep this up,  I enjoy finding good conversations for folks, so I have been having a lot of fun with it. I am happy to report that I haven't missed sending out a single issue.

It has been growing steadily for the last two weeks. Right now, I am closed to 100 subscribers. A new feature I implemented recently is an exclusive Twitter list for my newsletter subscribers. Having a dedicated Twitter list means they will be able to see each other's tweets. It also allows me to see and feature their tweets if they are good for engagement.

I hope to reach 100 subscribers and keep the momentum going. If you feel like checking it out, it is [here](https://indiegrow.substack.com/). Hope you can join us on this journey!
Adding SSH login to bitbucket
Tags: bitbucket, ssh, git
Published: 2021-10-22 20:47:45

Recently I noticed an easier way to login to bitbucket via SSH. Here is how to go about it. I use a Linux environment so the post is in accordance with that. 

Open a terminal and type - 

```
ssh-keygen
```

This will create a private and public rsa key on your system. Just keep pressing enter to whatever question it throws you and in the end you will be able to see two files **id_rsa** and **id_rsa.pub**. The **.pub** means it's your public SSH key. This can be distributed. The other one you guard it with your life.


Now open bitbucket and go to **Settings -> Security -> SSH Keys**. Click on **Add Key** and give a **title** - (I usually give my machine's name) and paste your id_rsa.pub contents into the **key** textbox and Save. 

Use this to open the public key file 

```
cat ~/.ssh/id_rsa.pub
```

Go to your repository source tab on bitbucket and click on **Clone** and select the **SSH** option. Copy the part that starts with **git@bitbucket.org** ...

Once done go to your code and open **.git/config**. You will be able to find a property - 

```
[remote "origin"]
    url=<substiture the copied url here>
```

You should be done. Try git pull, push or any other fancy commands you feel like and enjoy. 

Happy coding!
Hex Color Generator
Published: 2021-10-22 20:43:02

##### Creating a color draw is very simple.

First we need to add some html.

```html
<!DOCTYPE html>
<html lang="en">
<!-- Head -->
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
		<link rel="stylesheet" href="./style.css" />
	</head>
	<body>
<!-- Main Container -->
		<div class="container">
			<h1>Draw a Color</h1> <!-- Title -->
			<button class="btn" type="button">Draw a Color</button><br /> <!-- button to draw color -->
			<h1 class="hex" style="text-align: center; margin: 10px"></h1> <!-- hex value -->
			<div class="colors">
				<div class="color1"></div> <!-- div with hex color -->
			</div>
		</div>

		<script src="./index.js"></script>
	</body>
</html>
```

Now let's create a `css` file with simple styles. It has to be presented somehow!

### Main Styles
```css
* {
	box-sizing: border-box;
	font-family: sans-serif;
	margin: 0;
	padding: 0;
}

body {
	background: rgb(243, 237, 237);
}

.container {
	align-self: center;
	align-items: center;
	text-align: center;
	margin: 15px;
}
```

### Color container styles
```css
.color1 {
	background: gray;
	height: 200px;
	width: 210px;
	border-radius: 15px;
	margin: 40px auto;
	display: flex;
	justify-content: center;
	flex-direction: row-reverse;
	flex-wrap: wrap;
}
```

### And button styles
```css

.btn {
	font-size: 1em;
	color: #fff;
	cursor: pointer;
	outline: none;
	border: none;
	background: #b2d100;
	display: inline-block;
	padding: 10px 30px;
	margin-top: 20px;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	letter-spacing: 2px;
	transition: 0.5s;
}

.btn:hover {
	letter-spacing: 4px;
}
```

And last not much js script.

### First we download all the items.
```javascript
const btn = document.querySelector('.btn')
const color = document.querySelector('.color1')
const hex = document.querySelector('.hex')
```

### Then we create a function that generates the hex code
```javascript
function getRandomColor() {
	var letters = '0123456789ABCDEF'
	var color = '#'
	for (var i = 0; i < 6; i++) {
		color += letters[Math.floor(Math.random() * 16)]
	}
	return color
}
```
### And the button handling
```javascript
const btnClick = () => {
	console.log(getRandomColor())
	color.style.background = getRandomColor()
	hex.innerHTML = getRandomColor()
}

btn.addEventListener('click', btnClick)
```

The code is available on [github](https://github.com/Kraken161/color-generator) and on [this website](https://kraken161.github.io/color-generator).

Thanks, Kraken.
What was your win this week?
Tags: discuss, weeklyretro
Published: 2021-10-22 20:17:36

---
title: What was your win this week?
published: true
description: Got to all your meetings on time? Started a new project? Fixed a tricky bug?
tags: discuss, weeklyretro
cover_image: https://cl.ly/188e843c2985/download/Image%202019-02-15%20at%202.36.37%20PM.png
---

Hey there! 


Looking back on this past week, what was something you were proud of accomplishing?

All wins count — big or small 🎉

Examples of 'wins' include:

- Starting a new project
- Fixing a tricky bug
- Cleaning up your space... or whatever else might spark joy ❤️ 

---

Happy Friday! Hope you all have a great weekend 🎊 

![Relaxing brain](https://media.giphy.com/media/26tP4mS08o114G2kg/giphy.gif)
Global exception handling in ASP.NET Core
Tags: dotnet, csharp, aspnetcore
Published: 2021-10-22 20:07:00

---
title: Global exception handling in ASP.NET Core
published: true
description: 
tags: #dotnet #csharp #aspnetcore
canonical_url: https://www.jitbit.com/alexblog/304-aspnet-core-global-exception-handling-error-page-and-a-lambda/
---

One of the (many) annoyances we bumped into when rewriting our (huge) app from .NET Framework to .NET Core was the inability to handle exceptions globally both via an error page *and* some exception handling code.

See, .NET 5 has `app.UseExceptionHandler()` and the way you use it is either via error page (and extracting the actual error object on that page):

```csharp
app.UseExceptionHandler("/Error"); //error handling page
```

OR use the exception handling lambda:

```csharp
app.UseExceptionHandler(errorApp => //error handling lambda
{
    errorApp.Run(async context =>
    {
        var exceptionHandlerPathFeature =
            context.Features.Get<IExceptionHandlerPathFeature>;();

		var exception = exceptionHandlerPathFeature?.Error;

		//do something with the exception
    });
});
```

But what if you want to do both - show an error page *and* use a lambda to process the exception (for example, to send an error email)? Preferably without the bulky `context.Features.Get<ExceptionHandlerPathFeature>`? This is how:

```csharp
app.UseExceptionHandler("/Error");
app.Use(async (context, next) => //add middleware
{
	try
	{
		await next.Invoke(); //run next middleware code
	}
	catch (Exception ex)
	{
		//do something
		throw; //re-throw so it's caught by the upper "/Error"
	}
});
```