teleren/devto huggingface dataset:
Top IT Career Meetups in November, 2021
Tags: career, programming, techtalks
Published: 2021-12-03 14:38:05

Eager to see the finest IT Career [**meetup videos**](https://blog.meetupfeed.io/it-career-meetups-november-2021/) from this November? Say no more, check our hand-picked selection below.

[**Writing Code is Easy, Being a Great Developer is Hard | Helen Scott**](https://meetupfeed.io/talk/tech-talks-writing-code-is-easy-being-a-great-developer-is-hard)
Dive into matters with Helen, who tells you all the things you need to know besides how to write a code well. Explore a whole bunch of other skills you might not have even realised you needed – until now. Find out how you can be an extraordinary developer wanted by many headhunters.

[**An Introduction To Accessibility & Why A Techy Needs A Personal Brand | Robert Precious & Rachel Skelton**](https://meetupfeed.io/talk/an-introduction-to-accessibility-why-a-techy-needs-a-personal-brand)
Jump into accessibility and let Robert elaborate on the triggers that start accessibility work at a company. Let him guide you through the start, problems, testing and so much more. Why does a techie need a personal brand now more than ever? Rachel continues by answering all your questions and making it easier for you to stand out of the crowd.

[**Five Programming Interview Red Flags In Your Career | Ryan McBeth**](https://meetupfeed.io/talk/five-programming-interview-red-flags)
Be prepared for any interview in your career and spare your own time by looking at instant red flags. You will thank Ryan McBeth in the long run, although it might be hard turning down an offer based on these things. But having a job at a company where you can truly fit in is invaluable. This is how you can easily filter your offers.

[**Emotional Intelligence in Tech | Rosemarie Wilson**](https://meetupfeed.io/talk/emotional-intelligence-in-tech-with-rosemarie-wilson)
Some might think that being a developer is all about the technical skills, but let’s not forget about emotional intelligence, which is just as important for success. Get an overview of how you can communicate your solutions better by improving your emotional intelligence. Let’s not forget that you still have to work with other people even as a developer.

[**Five Programming Skills to Boost your Resume | Ryan McBeth**](https://meetupfeed.io/talk/five-programming-skills-to-boost-your-resume)
Learn about five skills that will boost your resume right away. And you can learn them in only two week! The mentioned things are: SQL, Clustered & Non-Clustered Index, Jira, Git, Aws & Azure and many many more. Which of these skills do you already possess?
👁️Accelerates your coding using Gaze
Tags: programming
Published: 2021-12-03 17:09:14

---
title: 👁️Accelerates your coding using Gaze
published: true
description: CLI tool that accelerates your quick coding
tags: programming
#cover_image: https://direct_url_to_image.jpg
---


Software development often forces us to execute the same command again and again, by hand!

👁️[Gaze](https://github.com/wtetsu/gaze) runs commands for you, right after you save a file.

It greatly helps you focus on writing code!

![Gaze](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/h36f1v8ua1kq0m7xxo68.gif)


Gaze is designed as a CLI tool that accelerates your coding.

* Easy to use, out-of-the-box
* Super quick reaction
* Language-agnostic, editor-agnostic
* Flexible configurations
* Useful advanced options
* Multiplatform (macOS, Windows, Linux)
* Appropriate parallel handling


## 👁️Installation

On macOS

```
brew install gaze
```

Windows/Linux: download binary https://github.com/wtetsu/gaze/releases



## 👁️How to use

Gaze is really easy to use.

```
gaze .
```

And invoke your favorite editor on another terminal and edit it!

```
vi a.py
```


## 👁️More examples

Gaze at one file. You can just specify file names.

```
gaze a.py
```

---

Gaze doesn't have complicated options to specify files. You can use wildcards (\*, \*\*, ?) that shell users are familiar with. **You don't have to remember Gaze-specific command-line options!**

```
gaze "*.py"
```

---

Gaze at subdirectories. Runs a modified file.

```
gaze "src/**/*.rb"
```

---

Gaze at subdirectories. Runs a command to a modified file.

```
gaze "src/**/*.js" -c "eslint {{file}}"
```

---

Kill an ongoing process, every time before it runs the next. This is useful when you are writing a server.

```
gaze -r server.py
```

---

Kill an ongoing process, after 1000(ms). This is useful if you love to write infinite loops.

```
gaze -t 1000 complicated.py
```

---

In order to run multiple commands for one update, just simply write multiple lines (use quotations for general shells). If an exit code was not 0, Gaze doesn't invoke the next command.

```
gaze "*.cpp" -c "gcc {{file}} -o a.out
ls -l a.out
./a.out"
```


## 👁️Motivation

I often write Python scripts to automate boring tasks. I created a.py, wrote 5 lines of code and run "python a.py". Since the result was not perfect, I edited a.py again, and run "python a.py" again.

Again and again...

Then, I found myself going back and forth between the editor and terminal and typing the same command thousands of times that is total waste of time and energy!

That's the reason I developed Gaze in order to automate commands execution.

See more details!
https://github.com/wtetsu/gaze
My experience with hand on APIs workshop By using postman. 
Tags: todayilearned, devops, testing, discuss
Published: 2021-12-03 17:35:51

My hand on experience of learning APIs 101 with a postman workshop is amazing. before this workshop,*I didn't be familiar with what is API and how it's work?* It's my very first workshop from where I practically learned about API. How the speaker is clarifying is very considerable along with this the session was intuitive all through. **after going to this workshop I observed how it's straightforward and how easy to use API by using such a best API like the postman. *It has an extremely easy to understand interface*.
 Also, I find that by using postman API we can store data in a coordinated manner**, there are **tons of resources** accessible for users, **easy move to code repositories moreover**, it's a very good  API for **developers to create, share, text and documents APIs**. 
I recommended to all that ought to go to this sort of workshop it significantly gives a practical demo of whatever you desire to learn. In the end, I want to say that **creating an account on postman is very simple** and do  check out postman API

#PostmanAPI #PostmanStudent
`
WASM : The End of Javascript?
Tags: webassembly, blazor
Published: 2021-12-04 06:47:16

Microsoft has been working on WASM for a long time now. Their project named Blazor was doing well back in 2019 with its precursor Razor going back to at least 2014. 

I initially rejected Blazor thinking Javascript and JS packages are so dominant that the same type of Open Source collaboration will never catch up with NPM. If NPM already has a package I want... then what's the need for Blazor?

#VS2022 and .Net 6
VS2022 Just made it to GA of which I installed last week. I spent an entire week investigating Blazor and realized my distrust of Microsoft had blinded me. Blazor is an industry disrupter.

Then I backtracked and watched the keynote VS2022 release event on YouTube. It showed what Blazor can do and was over the top good. They showed 2 Activison games written in C++ running in the browser made possible by Blazor. 

Blazor also supports all .Net languages as well as Javascript and TypeScript.

The story improved, Blazor can compile to different operating systems including IOS, Linux, Android and Windows. This means a single code base for Web Apps is ready today.

The compiled WASM code also produces an .exe file. When clicked, it acts just like a desktop app. There was no explicit IIS server start required.

Rumor has it that Electron is no longer needed for desktop apps in TypeScript or Javascript, just replace it with Blazor.

Blazor also integrates seamlessly with both TypeScript and Javascript. Just create a Blazor Server Project and import all the NPM packages you want.

Blazor syntax is similar to JSX in that both code and html are in same file. The '@' sign indicates code blocks where native C# syntax is used.

Want Speed? Go view those Activision videos. Mentioned earlier.

I've now 'seen the light' regarding WASM. It's something I can't unsee. Blazor is my newfound target to pursue in 2022 as I'm pretty sure its a disrupter. My enthusiasm for Microsoft engineering has just returned to 2006 levels.

Finally: No, WASM isn't the end of Javascript. It just breaks up the once exclusive Javascript only club. It's the rebirth of how applications can be created to run within the browser.
Javascript的5个小技巧
Tags: javascript
Published: 2021-12-04 19:23:59

## 删除Array中重复的值
利用`Set`特性。
```js
const array = [1,2,2,3,3,3,4,4,4,4,5];
const unique = [... new Set(array)];
```

## 模板字符串
使用反引号 (`` ` ` ``) 来代替普通字符串中的用双引号和单引号。
```js
const str = `Hello ${expression}!`;

const num1 = "1";
const num2 = "2";
console.log(`${num1}${num2}`); // 12
```
[更多资讯](https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Template_literals)

## 类转换
使用`!!`转换成Boolean。
```js
const obj = { field1: "value" };
const bin = 0;

console.log( !!obj ); // true
console.log( !!bin ); // false
```

使用`+`转换成Number
```js
const num1 = "1";
const num2 = "2";

console.log( (+num1) + (+num2) ); // 3
```

## 空值合并运算符
当需要给空值一个默认值，可以使用`??`。
那么为何不是`||`呢？因为`||`无法区分 false、0、空字符串 "" 和 null/undefined。
```js
const field1 = "value";
const field2 = false;
const field3 = 0;
const field4 = null;

console.log( field1 || "default" ); // value
console.log( field2 || "default" ); // default
console.log( field3 || "default" ); // default
console.log( field4 || "default" ); // default

console.log( field1 ?? "default" ); // value
console.log( fiedl2 ?? "default" ); // false
console.log( field3 ?? "default" ); // 0
console.log( field4 ?? "default" ); // default
```
高级用法可以参阅[这里](https://zh.javascript.info/nullish-coalescing-operator)

## 可选链 `?.`
使用`?.`简去使用`if else`
```js
const obj = {
   sayHi: ()=>console.log("Hi")
}；

const empty = { };
const nullValue = null;

obj.sayHi(); // Hi
empty.sayHi(); // "'empty' undefined error"
nullValue.sayHi(); // "'nullValue' undefined error"

empty?.sayHi(); // "no error"
// equal to 
if( empty && empty.sayHi ) {
  empty.sayHi();
}

nullValue?.sayHi(); // "no error"
// equal to 
if( nullValue && nullValue.sayHi ) nullValue.sayHi();
```
If-Else or Switch or Match - Laravel
Tags: php, laravel, programming, beginners
Published: 2021-12-12 11:03:51

We have an example of entering data of different type and here we use if
```php
if($request->type == 'users'){
   $users = User::all();
   dd($users)
}
if($request->type == 'projects'){
   $projects = Project::all();
   dd($projects)
}
```
But we want to make the code easier and less, so here I want to use switch
```php
switch ($request->type) {
  case 'users': $model = 'App\\Models\\User'; break;
  case 'projects': $model = 'App\\Models\\Project'; break;
}
$records = $model::all();
dd($records)
```
But I want to covet more powerful code using php8 so I will use match
```php
$model = match($request->type){
  'users' => 'App\\Models\\User',
  'projects' => 'App\\Models\\Project',
}
$records = $model::all();
dd($records)
```
Source :- https://www.youtube.com/watch?v=sTm5P4IGD5g
Source :- https://stitcher.io/blog/php-8-match-or-switch
I hope you enjoyed the code.
What I learned about using and building public APIs
Tags: beginners
Published: 2022-01-15 03:28:11

---
title: What I learned about using and building public APIs
published: true
description: 
tags: #beginners
---


I've recently learned about the API Economy concept ([A good primer](https://www.notboring.co/p/apis-all-the-way-down) and [a contrarian view](https://www.swyx.io/api-economy/)). After a bit of research, I was pretty amazed at how so much of the stuff you need to build your product already exists out there. I think everyone knows about Stripe, Twilio, Auth0.. but I was surprised to learn about Notarize, which has API for signing and notarizing documents, or FaunaDB which is a database with REST API, or background checks with API, etc, etc.

I learned to never implement anything without checking if someone else already provides that as a service via an API that I could integrate with. I found out that Postman (which also has a nice desktop app for testing APIs) hosts API world where tons of APIs are hosted and it lets you experiment with them online: https://www.postman.com/explore

I also learned about JAMStack, which is a community of FE engineers who are building entire websites without ever building a backend - simply by using other services and filling in the gaps with serverless functions (AWS Lambda and such).

It makes sense for pretty much every service to add public APIs and allow others to integrate. It opens up new use-cases and revenue streams, and for the most part we already have these APIs. OpenAPI makes it pretty easy to define the APIs, and then generate the web interfaces in your language, generate documentation, generate mocks, generate tests, etc... All those generated stuff is super important: 

* Developers will need the documentation to use your API and do the integrations. 
* Mocks will allow them to test the integration without loading your production application. Maybe even try a "mocked MVP" so you can get feedback before building your app.
* Generated tests will let you continuously validate that you didn't break the APIs (since other developers will rely on their for their applications, it is critical not to break their applications - they won't come back and tell their friends). 

https://swagger.io/ has great tools for OpenAPI.

I cover all this with a bunch of examples in a video: 
{% youtube cTnTW5Cq0b0 %}

I'm also working on a SaaS-in-a-Box backend service (hopefully with both great APIs and great integrations) to make life simpler for SaaS developers. If you are willing to give me feedback on the MVP, mind sharing your email with me in this form? I promise it won't be used for marketing, I'll just personally connect with you to discuss https://forms.gle/8tW73MwEWdWu4rB27.
Starting journey toward building Blockchain App
Tags: blockchain, technology
Published: 2021-12-12 15:44:43

Photo by <a href="https://unsplash.com/@zoltantasi?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Zoltan Tasi</a> on <a href="https://unsplash.com/s/photos/ethereum?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText">Unsplash</a>
  
Hi all, in this article, we will discuss the path toward building our DAP (Decentralized Applications) using blockchain specifically based upon Ethereum. 

So when Ethereum was launched it was kept in mind that it will help make Dap's and nowadays it's a famous cryptocurrency and it can also be used to transfer data based upon blockchain technology. There are many networks involved in the overall ecosystem and each network has 1 or more nodes and each node is running an Ethereum client. Each node has a full copy of an identical blockchain.

For end consumers, there are wallets from which they can access their wallets and carry out transactions e.g. we have chrome extension Metamask and developers use web3.js. You can install Metamask in your chrome form [here](https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en).

For our journey toward building our App, we will use the Rinkeby Test network of Ethereum which help us to test out our transactions without burning real cash.

![Metamask Wallet](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/bqcrxxsslltorei84lgj.png)

If we see here we have an account address that is unique to a user and will be the same across different networks. For getting free ETH in your test account to the address you get in your wallet you can use [https://faucets.chain.link/](https://faucets.chain.link/ )
![Faucets](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/iwm8zba5qxm0n7xx8qzb.png)

These tokens don't have any real value but can be used in testing our smart contract codes for free before we make them usable on the main ETH network.
The account address we see on the wallet is our public address(can be referred to as an email address for understanding) which we can use to receive or send ETH tokens and there are 2 other keys involved with it Public and Private key which combined to act as an identifier for our account to carry out the transaction.

Thanks for reading this. In upcoming articles in this series, we will continue our journey to learn more and discuss how is the transaction carried out and important pointers in that.
A Short Borg Tutorial
Published: 2020-05-24 15:36:16

---
title: A Short Borg Tutorial
published: true
date: 
tags: 
canonical_url: https://mmap.page/dive-into/borg/
---

[Borg](https://www.borgbackup.org/) is the new generation of [attic](https://attic-backup.org/).

```
borg init --encryption=keyfile /path/to/repo
borg create -C lz4 /path/to/repo::NAME-YOUR-BACKUP ~/Documents

```

## Free space

Before you start creating backups,please make sure that there is always a good amount of free spaceon the filesystem that has your backup repository (and also on ~/.cache).

## Encryption

Default enabled with `repokey` method.

```
borg init --encryption=none|repokey|keyfile PATH

```

When repository encryption is enabled,all data is encrypted using 256-bit AES encryptionand the integrity and authenticity is verified using HMAC-SHA256.

- `repokey`: key is stored inside the repository (`config`);
- `keyfile`: key is stored under `~/.config/borg/keys/`;

In both modes, the key is stored in encrypted formand can be only decrypted by providing the correct passphrase.

Do not forget to backup the key (e.g. via `borg key export`).

For automated backups the passphrase can be specifiedusing the BORG\_PASSPHRASE environment variable.

Be careful how you set the environment;using the env command, a `system()` call or using inline shell scriptsmight expose the credentials in the process list directlyand they will be readable to all users on a system.Using `export` in a shell script file should be safe, however,as the environment of a process is accessible only to that user.Also, using a shell command may leak the passphrase in shell history file.

For server backup, have a look at [borgmatic](https://torsion.org/borgmatic/).

## Compression

```
borg create --compression TYPE

```

Default is no compression.

- fast repo storage and some compression: `lz4`
- less fast repo storage and a bit more compression: `zlib`
- very slow repo storage and high compression: `lzma`

`lz4` is very fast thus preferred.`lzma` is preferred when the repository is on a remote host with slow (dial-up) connection.

## Upgrade from attic

```
borg upgrade --inplace REPOSITORY

```

If a backup copy is required, omit the `--inplace` option.

## Hosted Services

- [rsync.net](https://www.rsync.net/products/borg.html) also works with scp, rsync, git, etc. Nodes available globally.
- [BorgBase](https://www.borgbase.com/) dedicated borg repository hosting with specific APIs. It also offers a free plan (5 GB and 2 repos), and paid plans are cheaper than rsync.net. Nodes available in US and EU.
Why You Need a Coding Scratch File
Tags: productivity, programming, beginners
Published: 2021-12-13 01:16:22

Sometimes the best place to write code for your project is outside it.

This may sound like a lie. How could writing code outside of a project be the best place for the project's code? How can it even help the project at all?

Working within a project, especially a large and complex one, other code can get in the way of what you are writing.

## By removing the distraction of unrelated code, you can focus on your task.
When experimenting with designs or figuring out a tricky issue, it's quicker and easier to focus on the smallest amount of code needed. You don't have to worry about passing arguments around, multiple software layers, and other complexities. You also won't need as many manual steps or automated tests to test your code.

Sometimes you will need the rest of the project code, but removing it can be a huge productivity boost when you don't.

## How does a scratch file help?
A scratch file allows you to write code that can be compiled, ran and debugged without the rest of your project or setting up a new one. You can copy the code to your project and delete the file when you finish. Scratch files also help avoid accidentally committing temporary code.

It's like a sticky note for the code you throw out when done with it.

## Create your first scratch file.
Scratch files can usually be created inside your IDE. The process is different between IDEs, so search for "your IDE name + scratch file" to get started. It's also helpful to read everything your IDE can do with scratch files when you look this up.

Once you create the file, start writing code.

**There are also options outside of IDEs for scratch files.**
You could use a fiddle site (like [jsfiddle](https://jsfiddle.net/)) for your language. Some languages and frameworks have tools for this, such as [artisan tinker](https://laravel.com/docs/8.x/artisan) for Laravel and [LinqPad](https://www.linqpad.net/) for C#. A default project for your language or framework could also serve as a scratch file if you need to work across multiple layers with no other custom code.

Learn about the scratch file options for your project and use what you prefer.

While not suitable for every situation, scratch files are a fantastic tool when focusing on a small amount of stand-alone code.