teleren/devto huggingface dataset:
Conditional git profile configuration
Tags: git, tutorial, productivity, github
Published: 2021-03-03 19:30:15

I always found it inconvenient that I had to either keep changing the email in my `.gitconfig` every time I wanted to switch between working on a personal project and a work project, or I had to remember to configure the email in each repository as I cloned it. I often forgot and git discipline being something of a pet peeve of mine, I spent way too much time rewriting history just to change my darned email address so that it wouldn't be inconsistent in the git log. I have a problem, I know but let's keep on topic here mmhkay?

Turns out, there's a much easier way to do this. It's possible to conditionally extend the git configuration based on where your repository is located in your file system. That means we can have a global git configuration with all the default configuration and then in a few overrides for all repositories within, for example, the `~/code/work/` folder by adding a little something like this to the `~/.gitconfig` file.

```jsx
// ~/.gitconfig
[user]
	name = Sebastian Bille
	email = personal@example.com

[includeIf "gitdir:~/code/work/"]
	path = ~/code/work/.gitconfig
```

```jsx
// ~/code/work/.gitconfig
[user]
	email = work@example.com
```

Now all repositories inside of the `~/code/work/` folder will use your overridden email but all others will keep using the default configuration.

This could of course be used to override or add any other configuration conditionally as well. 

If you enjoyed this guide and want to see more, follow me on Twitter at [@TastefulElk](https://twitter.com/tastefulelk) where I frequently write about serverless tech, AWS and developer productivity!

Happy hacking! 🚀
Bootiful Cassandra Live Coding
Tags: database, cloudnative, cloud, devlive
Published: 2021-03-03 19:24:37

The easy button for serverless noSQL data has arrived! Join @Patrick McFadin (DataStax) & Josh Long, VM on March 18th at 10am PT for a live coding extravaganza with Apache Cassandra and DataStax Astra using Spring Boot, Spring Data, and Spring Cloud Function. Astra is the industry’s first and only open, multi-cloud serverless database-as-a-service (DBaaS).
https://www.eventbrite.co.uk/e/bootiful-cassandra-live-coding-session-tickets-143298711303
The 3 best features announced at GatsbyConf 2021
Tags: gatsby, javascript, react, performance
Published: 2021-03-03 19:15:13

Yesterday the (virtual) conference for Gatsby started. It's still going on today, with a lot of workshops. If you're interested, go check it out at https://gatsbyconf.com/.

In the talks yesterday a lot of cool new features were announced. I've selected 3 which I found the most interesting.

# Gatsby Cloud Hosting

Gatsby cloud already existed for a while now, but yesterday the Gatsby team announced they are adding hosting to their offering. So as easy and fast as it was before to build your website, you can now immediately deploy your Gatsby site through this service too.
They partnered with Fastly for a super fast CDN.
More info: https://www.gatsbyjs.com/products/cloud/hosting/

# Gatsby Image Plugin

The Gatsby team has worked on a new image plugin for the past few months, and it shows!
This might be my favourite announcement of the conference.
The new plugin makes your images responsive and fast by default. 
Images above the fold are immediately loaded, images below the fold are lazy loaded.

Here are some of the options I like in the plugin: 

* Formats: adding more image formats to be served (think AVIF, WEBP..)
* Placeholder: Gatsby can generate a placeholder to show while your images is being lazily loaded. 4 options available: Blurred, Dominant color, Traced SVG or None. 
* Aspect ratio: forces an image to the specified aspect ratio, cropped if needed. Example: `aspectRatio={16/9}`
* Transform options: grayscale, duotone, rotate, trim, cropFocus, fit. 

Example of the code:

```
import { StaticImage } from "gatsby-plugin-image"

export function Dino() {
  return (
    <StaticImage
      src="../images/dino.png"
      alt="A dinosaur"
      placeholder="blurred"
      layout="fixed"
      width={200}
      height={200}
    />
  )
}
```

More info can be found here: https://www.gatsbyjs.com/docs/how-to/images-and-media/using-gatsby-plugin-image

# Gatsby v3.0

Last but not least: a new major version of Gatsby's core!
Some of the biggest takeaways: 

* 80% faster develop experience: pages are only being built when request, images only processed when needed.
* Incremental Builds for OSS: this used to be a feature only available for websites being built through Gatsby Cloud. This is no longer the case, you can enjoy incremental builds on any CI/CD service. This means (much) faster building!
* The core dependencies have been updated, fixing a lot of bugs:
 * Node 12
 * webpack 5
 * React 17
 * GraphQL 15
 * ESLint 7

More info can be found here: https://www.gatsbyjs.com/blog/gatsby-v3/

Thanks for reading!
Loading Bigfoot Data from CSV Files into Redis 
Tags: redis, csv, javascript, node
Published: 2021-03-03 18:54:03

---
title: Loading Bigfoot Data from CSV Files into Redis 
published: true
description: I show how to load CSV files into Redis using Bigfoot sightings data as an example.
tags: #redis #csv #javascript #node
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zpwlf7gvp4qg93u641m2.jpg
---

I made a video showing you two ways to load data from a CSV file into Redis. One, using RIOT File. The other writing some JavaScript. And, to make it fun, I used Bigfoot sightings for my data. Check it out!

{% youtube TqTg6RijfaU %}
Tuesday at Boston.pm: Perl subroutine signatures and type validation
Tags: programming, perl
Published: 2021-03-03 18:49:16

---
title: Tuesday at Boston.pm: Perl subroutine signatures and type validation
published: true
date: 2021-03-03 18:45:20 UTC
tags: Programming,Perl
canonical_url: https://phoenixtrap.com/2021/03/03/tuesday-at-boston-pm-perl-subroutine-signatures-and-type-validation/?utm_source=rss&utm_medium=rss&utm_campaign=tuesday-at-boston-pm-perl-subroutine-signatures-and-type-validation
---

I’ll be reprising my [presentation](https://phoenixtrap.com/2021/02/11/slides-from-tonights-houston-perl-mongers-presentation/) on Perl subroutine signatures and type validation for the Boston Perl Mongers on Tuesday, March 9 at 7 PM EST. [Visit their wiki for details](https://boston.pm.org/bpm/Calendar#Next_Meeting); they’ll be posting the Jitsi URL shortly before the meeting.
Welcome Thread - v114
Tags: welcome
Published: 2021-03-03 18:12:22

---
title: Welcome Thread - v114
published: true
description: Welcome to DEV! A thread of hellos and intros.
tags: welcome
canonical_url: 
---

![We're happy you're here](https://media.giphy.com/media/eIU6nUlmldCWl51FQH/giphy.gif)

### Welcome to DEV!

1. Leave a comment below to introduce yourself! You can talk about what brought you here, what you're learning, or just a fun fact about yourself.

2. Reply to someone's comment, either with a question or just a hello. 👋 

**Great to have you in the community!**
JavaScript isArray and thisArg Methods
Tags: javascript, node, tutorial, webdev
Published: 2021-03-03 17:59:27

[![s-l1600.jpg](https://cdn.hashnode.com/res/hashnode/image/upload/v1615147167990/6zalhYPvf.jpeg)](https://ebay.us/XfkRzX)

---
### *isArray* method
The `typeof` method does not distinguish between arrays and objects.

See the example below:

```js
console.log( typeof {} ); // object
console.log( typeof [] ); // object
```

The `isArray` method returns true if it is an array, false otherwise.

The syntax is shown below:

```
Array.isArray(arr);
```

See the example below:

```js
console.log( Array.isArray({}) ); // false
console.log( Array.isArray([]) ); // true
```

### *thisArg* method
Most array methods (`find` `filter` `map` ...) have the `thisArg` has an argument.

See the syntax below:

```
array.find(func[, thisArg]);
array.filter(func[, thisArg]);
array.map(func[, thisArg]);
// ...
```

> `thisArg` is rarely used and optional.

See the example below:

```js
const army = {
  minAge: 18,
  maxAge: 27,
  canJoin(user) {
    return user.age >= this.minAge && user.age < this.maxAge;
  }
};

const users = [
  { age: 16 },
  { age: 20 },
  { age: 23 },
  { age: 30 }
];

// find users, for who army.canJoin returns true
let soldiers = users.filter(army.canJoin, army); // between 18 and 26 
// => { age: 20 }, { age: 23 },

console.log(soldiers.length); // 2
console.log(soldiers[0].age); // 20
console.log(soldiers[1].age); // 23
```

A call to `users.filter(army.canJoin, army)` can be replaced with `users.filter(user => army.canJoin(user))` are the same. Most people prefer the latter because itis easier to understand.

**Happy coding**

---


[![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1614817015187/dsl-EosQo.png)](https://www.buymeacoffee.com/techstackmedia)

---

<a href="https://skillshare.eqcm.net/c/2680282/974611/4650" target="_top" id="974611"><img src="//a.impactradius-go.com/display-ad/4650-974611" border="0" alt="" width="440" height="220"/></a><img height="0" width="0" src="https://skillshare.eqcm.net/i/2680282/974611/4650" style="position:absolute;visibility:hidden;" border="0" />
Wednesday Links - Edition 2021-03-03
Tags: java, jvm, kotlin, bazel
Published: 2021-03-03 17:58:21

Monitoring across frameworks (5 min read) 🩺
https://blog.frankel.ch/monitoring-across-frameworks

Introduction to JVM Unified Logging (JEP-158 / JEP-271) (10 min read) 📝
https://foojay.io/today/introduction-to-jvm-unified-logging-jep-158-jep-271

Choosing Java instead of C++ for low-latency systems (8 min read) ⚖️
https://stackoverflow.blog/2021/02/22/choosing-java-instead-of-c-for-low-latency-systems

Creating and Analyzing Java Heap Dumps (8 min read) 🧲
https://reflectoring.io/create-analyze-heapdump

How does Google keep build times low? (9 min read) 💨
https://jmmv.dev/2021/02/google-monorepos-and-caching.html

A practical look at JEP-389 in JDK16 with libsodium (78 min read) 🔗
https://blog.arkey.fr/2021/02/20/a-practical-look-at-jep-389-in-jdk16-with-libsodium

How We Test Concurrent Primitives in Kotlin Coroutines (9 min read) 🧪
https://blog.jetbrains.com/kotlin/2021/02/how-we-test-concurrent-primitives-in-kotlin-coroutines
How to build Vue composition apps.
Tags: vue, vuequery, javascript
Published: 2021-03-03 17:58:04

Hey everybody!!! 

Last month I was working on a new project at my work and was using the Vue composition API. I had about 6-7 months of experience on the new composition API of Vue and was ready to tackle it.

As I was writing the new requirements, a colleague came by and looked at how I was writing code for retrieving data from the server. On 3 or more components I had used the same features like loading, error handling, and handling data. I give it another thought and started creating a new composition function, to encapsulate the logic of fetching data from an API.

He stopped me and showed me how the React community is doing it with [React Query](https://github.com/tannerlinsley/react-query).

I was pretty pumped up and wanted to use it on my Vue project, but with no luck. Because there is no such thing for Vue. I was like WHAT!?!??! 

![image](https://media.giphy.com/media/IUp9WRHyCwUEg/giphy.gif)

Then I started working on [Vue Query](https://github.com/cytools/vue-query). It has the same concepts as React Query, but it is written with support for both Vue 3 and the composition API library.

Currently, the features that are integrated are: 

- Key Caching
- Pagination Support
- Mutating Cache State
- and more.

Check out the video below, to see a quick tutorial on how everything is working. And most importantly give us your feedback on what we should improve or if you like the idea for Vue support. 

[Vue Query Tutorial Video!!!!!](https://www.youtube.com/watch?v=8Tx8eYKRPUU&feature=youtu.be)
[Vue Query](https://github.com/cytools/vue-query)
[Vue Query Examples](https://github.com/cytools/vue-query-examples)
[Vue Query Example site](https://nifty-brattain-3dfba5.netlify.app/)
Automate Terraform CLI
Tags: terraform, devops, iac
Published: 2021-03-03 17:55:09



TL:DR
If you want to know more about the mechanisms at hand, head DOWNLOAD > [TerraformCLI](https://www.terraform.io/downloads.html) and CHECKSUM > [Terraformchksm](https://www.hashicorp.com/security)
First, create the PGP key and name it hashicorp.asc and save it in the same directory as the Terraform CLI will be installed at. (Click CHECKSUM https://www.hashicorp.com/security to copy the PGP key)
Second, I stored the Terraform CLI in the dir that I'm working in, save it at /usr/bin if you're using macOS or Linux. 
To start the script, I have created three arguments that will simplify the version and the file version that Hashicorp keeps updating. (for good reasons, I assume the developers want more features in Terraform I'm all for that)
```
#!/bin/bash
# Update Terraform version bash script automation
#Arguments
version=$1 #version# 0.2.28
tfver=$2 # terraform_0_2_28_darwin_amd64.zip
tfsha=$3 # terraform_0.2.28_SHA256SUMS
tfshasig=$4 #terraform_0.2.28_SHA256SUMS.sig
cd $HOME/Path/to/TerraformCLI
wget https://releases.hashicorp.com/terraform/$version/$tfver
gpg  --import hashicorp.asc
curl -Os https://releases.hashicorp.com/terraform/$version/$tfsha
curl -Os https://releases.hashicorp.com/terraform/$version/$tfshasig
gpg  --verify $tfshasig $tfsha
shasum -a 256 -c $tfsha
unzip $tfver
rm $tfver
```

The above image is showing four variables version number, file with version, SHA256SUMS with version, and SHA256SUMS.sig with version. 
Copy and paste the bash script and chmod +x automateTFCLI.sh, then execute the script with this command
./automateTFCLI.sh 0.12.28 terraform_0.12.28_darwin_amd64.zip terraform_0.12.28_SHA256SUMS terraform_0.12.28_SHA256SUMS.sig
The script takes care of downloading, checking the integrity of the file and then, unzipping and deleting. 
Leaving the Terraform CLI inflation (meaning in use)
Next run Terraform - version to output version and confirm you have the working Terraform. 
(side note, I was tired of typing long cli commands so I put an alias in bash_profile to shorten it i.e alias tf="terraform" and also 
tfplan="terraform init && terraform plan")

Hashicorp Terraform has made this much simpler by adding Terraform CLI from the repo using APT. [SetupTFCLIAPT](https://learn.hashicorp.com/tutorials/terraform/install-cli?in=terraform/aws-get-started)

If you found this article to be useful please consider buying me a cup of coffee
Effective CapsLock
Tags: productivity, programming
Published: 2021-03-03 17:51:19

When I first start to think about how to get more efficient in using my text editor, I realized that when I both navigate and edit files at the same time I have to move between keys which are far from each other. For example; arrow keys and any other letter key.

Then I thought that, the least useful key for me was caps lock. So I come up with a solution by using  [autohotkeys](https://www.autohotkey.com/). I wrote this script to separate navigate mode and editing mode, like in VIM but much simpler. Here is the script:

```
#Persistent
SetCapsLockState, AlwaysOff
; Caps Lock Disable

#If GetKeyState("CapsLock", "T") = 0
;;; [CapsLock] + [i] - move up
Capslock & i::Up
; ...
;;; [CapsLock] + [l] - move right
Capslock & l::Right
; ...
;;; [CapsLock] + [k] - move down
Capslock & k::Down
; ...
;;; [CapsLock] + [j] - move left
Capslock & j::Left
; ...
;;; [CapsLock] + [;] - move far right
Capslock & `;::End
;;; ...
;;; [CapsLock] + [h] - move far left
CapsLock & h::Home
;;; ...
;;; [CapsLock] + [n] - enter
CapsLock & n::Enter
;;; ...
;;; [CapsLock] + [d] - delete
CapsLock & d::BackSpace
;;; ...
;;; [CapsLock] + [w] - pageup
CapsLock & w::PgUp
;;; ...
;;; [CapsLock] + [x] - pagedown
CapsLock & x::PgDn
;;; ...
```

Basically what this script does is that; **when capslock is pressed** you can use:

j as left arrow
i as up arrow
l as right arrow
k as down arrow
n as enter button
d as backspace
w as pageup
d as pagedown
h as home // to go to the beginning of the line
; as end  // to go to the end of the line 

Now it feels more intuitive and effective to navigate and edit files. Let me now in comments if it worked for you or not or maybe you have better approach.
What is JAVASCRIPT??
Tags: javascript, java, programming, css
Published: 2021-03-03 17:50:03

Computers are incredibly powerful machines, capable of performing amazing feats like playing competitive chess, serving thousands of web pages, or making millions of complex calculations in less than a few seconds. But deep down, computers are actually really dumb. Computers can only do exactly what we humans tell them to do.

We tell computers how to behave using computer programs, which are just sets of instructions for the computers to follow. Without programs, computers can’t do anything at all!

**Meet Javascript**
Even worse, computers can’t understand English or any spoke. Language. Computer programs are written in programming language like Javascript. You might not have heard of JavaScript before, but you’ve certainly used it. The JavaScript programming language is used to write programs that run in webpages. Javascript can control how a web page looks or make the page respond when a viewer clicks a button or moves the mouse.

Sites like Gmail, Facebook and Twitter use JavaScript to make it easier to send email, post comments, or browse websites. For example, when you’re on twitter reading tweets from @thewebguyy and you see more tweets at the bottom of the page as you scroll down, that’s JavaScript in action.

You only have to visit a couple of websites to see why JavaScript is so exciting.

1. Javascript lets you play music and create amazing visual effects.

2. Javascript lets you build tools for others to make their own art.

3. Javascript lets you play and code fun games.

**Why learn Javascript?**

Javascript isn’t the only programming language out there --infact, there are literally hundreds of programing languages.
But there are many reasons to learn Javascript.

Why? Because:
It’s a lot easier and more fun to learn than any other programming language. But perhaps best of all, in order to write and run JavaScript programs, all you need is a web browser like google chrome, Mozilla Firefox. Every web browser comes with a Javascript interpreter that understands how to read JavaScript programs. Once you’ve written a Javascript program, you can send people a link to it, and they can run it in a web browser on their computer, too!


You can check out more about Javascript in your free time.
If you need help or a teacher to help and assist you, you can connect with me. I'm always ready to help.
Top 10 Best Free WordPress Themes
Tags: webdev, wordpress, writing, webassembly
Published: 2021-03-03 17:31:28

Are you looking for the best free WordPress themes for your website? Then, here you will get the one.

Choosing the best free WordPress theme is not an easy task because there are thousands of free themes available on WordPress that makes it hard for beginners to choose between all the different options. 

When I started blogging, one of the biggest difficulty I faced was choosing the best WordPress theme for my blog. I just couldn’t find the right one for me. But I know better now.

So, I can understand your problem because I have also suffered the same problem. That’s why I decided to write a post on this topic that can help beginners.

But, if you’re a beginner you should also know how to create an [amazing blog](https://huppdigital.com/) and make it user-friendly.

Another important part of a WordPress website is plugins, you should choose the best WordPress Plugins for your site.

You might have seen many blogs that say these are the 64 best free themes for your site or 56 best free WordPress themes. They provide a long list that makes it difficult to choose one theme from a long list.

But, in this post, I will provide you with the top 10 best free WordPress themes that make it easy for you to choose the best theme for your site according to your requirement.

**Best Free WordPress Themes**

1. Hestia
2. Generate Press
3. OceanWP
4. Astra
5. Neve
6. Accelerate
7. Sydney
8. Bento 2.0
9. Zakra
10. Flash

Read the full article here: https://huppdigital.com/top-10-best-free-wordpress-themes/
Nevertheless, Gabi Coded in 2021 also!
Tags: wecoded
Published: 2021-03-03 17:29:34

![Alt Text](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vz6t1tiav8itvitf2ipk.png)
Thanks to @Dell for making this photo available freely https://unsplash.com/photos/g2E2NQ5SWSU

<!-- ✨This template is only meant to get your ideas going, so please change/add/remove these prompts as you wish! We also encourage you to create your own title if you’d like! ✨ -->


## Advocating for myself
Advocating for myself seems to be like a non-stop task which I learned to not give a damn about when it becomes too much. I realised that giving my time like this is taxing and non-productive for me. I am just at the beginning of my career (13+ years) and I have a long long way until retirement. Understanding this puts things in perspective. Current juniors will be the next seniors, not everyone is the same, good people will form good people, technologies will change, projects and companies will change and so on. I am sure my mom and dad's resume wouldn't fit on the 1 or 2 pages of CV if they were to describe THE MAIN THINKS that they worked on during their long career. I still giggle a bit when I hear some CV advice (well-intended even so). It's like we forget this software development domain is at it's beginning still, and we forget we have a few more decades of work until retirement.

## My biggest goal
My biggest goal is the sum of a lot of small goals. Always has been and always will be if you ask me now. I want to leave doors open to change my mind, change interests and change paths in my career. This abstract is what works well for now and leaves room for a lot of improvement. I have learned and evolved in my craft so much since I started writing code and I will continue to learn and adapt as long as I can do my job. I studied and worked hard to be a Software Developer because I want to create stuff, useful stuff and as many as possible. The point is to help myself and others with technology.

## My advice for allies
My advice for allies to support underrepresented folks who code is exactly what you read in memes, Twitter feeds, blog posts: believe us when we present something that is wrong. Just freaking believe us like you would your white-male colleague that you go for beers with every week. Of course, there will be people that will try to cheat this, take advantage of this, but *we*- as a group are not them, the exact same way *you* as a group are inclusive, helpful and decent humans. I had to make these analogies, but we should already see ourselves as one group, not separate.

What about you?