teleren/devto huggingface dataset:
Install Gitlab Runner on AlmaLinux OS
Published: 2022-11-24 12:41:50

Run following commands:

1. Install Git:

```
sudo dnf install git
```


2. Download `gitlab-runner`

```
curl -LJO "https://gitlab-runner-downloads.s3.amazonaws.com/latest/rpm/gitlab-runner_amd64.rpm"
```

3. Install `gitlab-runner`

```
sudo rpm -ivh gitlab-runner_amd64.rpm
```

### To run jobs concurrently, update following
```
sudo nano /etc/gitlab-runner/config.toml
```
and update the desired value
```
concurrent = 5 
```
Mutually exclusive experiments in Google Optimize
Tags: googleoptimize
Published: 2022-11-24 12:26:50

![siloing users](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nn3vwmy7mq8s2cbv2tm1.png)

##Introduction
One of the Achilles heels of [Google optimize](https://optimize.google.com/) as an AB testing platform is how they bucket users into experiments. Users are often placed into multiple experiments at the same time without the possibility of natively having the users bucketed into only a single experiment at a time. In this post I will highlight an approach to ensure that experiments are **mutually exclusive** i.e. a user will only be placed in a single experiment at a time. 


## Siloing Your Users.

When a user visits your website, we execute the following steps: 
1. Check if the guest has already been siloed, if not proceed. 
2. Generate a random number between 1-100.
3. Create a cookie and store the number generated in the previous step. 

```
if(!window.vuCookies.get('vu.silo')) {
window.vuCookies.set('vu.silo', Math.floor(Math.random() * 100)+1, 365);
}
```

*Note: 
1. The window.vuCookies is custom code. 
2. This code must be placed before the Google Optimize script. 


## Audience Targeting

Set the audience targeting condition on the experiment level. 
![Audience targeting](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wzfwlkq53ulx70bvwp2a.png)

![Audience targeting by cookie](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xsta3ty17wm03b05lvjd.png)

![siloing condition](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/5ahb85y09ic73js4umms.png)

##Conclusion
In order to have accurate AB testing results its paramount that a user is not bucketed into multiple experiments. The approach outlined in this article will ensures tests remains mutually exclusive.
Singula Team developed a CRM based on customers data set for KFC
Tags: webdev, ruby, crm
Published: 2022-11-24 12:08:34

Well, it's time to announce our second collaboration!
Do you love Kentucky fried chicken? We do! And in the occasion of this we have helped them to build the CRM architecture. Read more about how it was on [our partners' website.](https://evrone.com/kfc)
Steps I took to improve my communication skills
Tags: beginners, productivity, discuss
Published: 2022-11-24 11:39:35

As part of my 1 blog post (or more) a week challenge I set for myself, here's one about a set of steps that I found useful for me in improving my communication skills, maybe these steps will be useful for you too:

**1. Identify where the problem is**
This sounds obvious but it's important to take a step back and have a moment of self-reflection. In what area are you struggling to communicate? Is it in a large group setting? Is it when you are alone with your manager? For me, it was when I had to communicate to a larger audience, especially in a scenario where the larger audience consisted of individuals from both technical and non-technical backgrounds.

**2. Think about what your measure of success will be**
Before diving in it's important to determine your measure of success. My measure of success was engagement, which to me translated to how many people asked a question during/after my presentation. That was my measure of how the audience was engaged.

**3. Expose yourself**
Now I don't think that this will help a lot of people but this helped me a lot personally. I tried my best to always take the opportunity to gain experience in speaking to a larger audience.

Within the teams where I was working, we had opportunities where you were able to present what the team had been working on to a larger group. I volunteered for the position to present the work (together with the individuals who did the work, sometimes this was myself as well).

**4. Reflect**
Now that you have done the deed, it's time to take a step back and think about how well it went. Did you meet your measure of success? Personally, it would have been my second or third meeting when I started gaining momentum and getting more engagement when I was presenting on certain topics. Another point to consider here when reflecting was to consider if your measure of success was correct, maybe there is something else for you to focus on to build up the confidence you need to succeed.

**5. Take a break**
I will admit that speaking to a large audience on a bi-weekly basis is not my cup of tea. It certainly pushes me out of my comfort zone and that is a stressful situation so always remember to take a break when you can! This can be done by either skipping being the presenter in one of these meetings or sharing the burden with someone else on your team.

Let me know what you did to improve your communication skills!
My second PR for Hacktoberfest
Published: 2022-10-17 22:42:08

Hi everyone,

This week I created my [second PR](https://github.com/makoteq/metaxa/pull/24) for Hacktoberfest. The repo is found was [metaxa](https://github.com/makoteq/metaxa), a command line speed reader, for fast reading one word at a time written in NodeJS.

The [issue I chose](https://github.com/makoteq/metaxa/issues/23) was to add a new feature, specifically adding a stats argument which displays the number of words, sentences, and the absolute path of the file given.

To get started, I forked the repo, created a new branch, and built the application. Since my SSG setup was similar to this repo, it was easy to setup.

Writing the code wasn't too difficult because of the SSG project that we created and maintained in our labs. To start, I made sure to read the other code in the repo so I knew how to follow the owner's coding style. After, I created the option for the user to use the "stats" argument. The function to read from a file was already created, so I used that function to help me get the information for that file. After reading the data, I used some regex to split the data into sentences and words and counted the sentences and words found. Finally, I displayed that information to the screen. To get the absolute path, I used the `.resolve()` method found in the path module and displayed that to the screen also. Finally, I updated another option -h or --help to include the newly added stats argument.

The results of my initial pull request:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yn67m0uv2fjbgs4r3vrh.png)

![Contribution](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qt0hshuuvthigljyp63x.png)

After I submitted my pull request, the owner of the repo wanted me to change the colouring style. After changing the style, I made sure that the style was suitable and then committed the new code.

The new colouring:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/43qfp4bb04qwpxzy4rwo.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hrasnmkl0k9my507ni0c.png)


Finally, the owner accepted my code and closed the PR. Overall, I had a fun time contributing to this repo.
Why Blockchain matters?
Tags: beginners, tutorial, web3, blockchain
Published: 2022-11-24 11:34:50

> "Everything will be tokenized and connected by a blockchain one day."

Blockchain opens up entirely new perspectives on how to alter processes, promote resilience across complex networks such as supply chains, facilitate trust, authenticate the digital identity of people and objects, and generate new income models.

This is [Web3 Trends](https://dev.to/envoy_/series/20519), a collection of brief but informative Web3 threads.

{% embed https://twitter.com/Envoy_1084/status/1595741352725139456?s=20&t=3cF00rcg4AdHWoyGOs0vUw %}

---

📍 Enhanced security

Your data is sensitive and critical, and blockchain has the potential to substantially alter how your critical information is seen. Blockchain prevents fraud and unlawful behaviour by producing a record that cannot be altered and is encrypted end-to-end.

---

📍 Greater transparency

Without blockchain, each organization must maintain its own database. Transactions and data are recorded identically in different locations because it employs a distributed ledger. Every transaction is immutably recorded and time and date-stamped.

---

📍 Instant traceability

Blockchain generates an audit trail that documents an asset's origins at each stage of its travel. This helps give verification in areas where consumers are concerned about environmental or human rights issues surrounding a product, or in industries plagued by counterfeiting and fraud.

---

📍 Increased efficiency and speed

Traditional paper-intensive processes are time-consuming, prone to human error, and frequently necessitate third-party intervention. Transactions can be completed faster and more efficiently by streamlining these processes with blockchain.

---

📍 Automation

Transactions can also be automated using "smart contracts," increasing efficiency and speeding up the process even more. When certain requirements are met, the next stage in the transaction or process is automatically initiated.

---

For more exciting brief web3 threads, follow me.

{% embed https://dev.to/envoy_ %}
{% embed https://twitter.com/Envoy_1084/status/1584856929259913216 %}

---
New Journey Starts Here
Tags: beginners, webdev
Published: 2022-11-18 16:03:13

Hi, welcome to my page. I never made a blog before , but this is one of many firsts for me!

My name is Tor (like Thor without the h) and I live in Philadelphia, PA. I've lived in the city for about 8 years now and I've come to call it my home. 

I have the typical story of getting a 4 year degree in something I didn't have a passion for, I come from a background in sales.

Last month I made a big change in my life by deciding to change career's into web development. I decided to attend Flatiron School about a lot of research into what I wanted out of a school.

I don't regret it one bit! I've always thought programing was interesting ,but never chased it. I always thought that I was "too hard" or "I'm not smart enough" to do it. After some dabbling with some free resources and a few student loans later, I realized that it's not as hard as I thought it was.

In the month that I've been in the program, I learned that the reason I thought it was too hard was because of my mindset. Once I learned how the program would think, It made a lot more sense when I tried applying what I learn. 

Thanks for reading my blog! I look forward to posting more along my journey.
what does the 'off' in yaml.off mean?
Published: 2022-11-24 11:19:15

Hi,

I've found some yaml files which have the word `off` suffixed to the end of the word `yaml`  so you get a file called , for example, `role.yaml.off`

Can anybody tell me what the point of putting `off` at the end is? Does it mean that the file does not necessarily get applied?...I've been Goggling but without success
Skip turbo broadcasting to speed up seeding process in Rails
Tags: rails, seeding, turbo
Published: 2022-11-24 11:08:47

---
title: Skip turbo broadcasting to speed up seeding process in Rails
published: true
description: If you use the turbo broadcasting in your callbacks & seed your database with records, you may want to disable turbo broadcasting to speed the seeding process up significantly.
tags: rails, seeding, turbo
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/283ptgey4wdg5bd2pczi.png

---

## Introduction
We discovered that our seeding process for our rails application was getting very slow by turbo broadcasting via callbacks triggered by saving models. Although this works as intended, we certainly don't need to broadcast turbo frames in the seeding process and just serves to slow down the seeding process without any benefits.

## Solution
*We were able to speed up the seeding process by 3x (~140s to ~40s) by disabling turbo broadcasting in seeding.* You can disable them too by inserting this code snippet before your seeding process:

```rb
class Turbo::StreamsChannel
  [:broadcast_append_to, :broadcast_prepend_to, :broadcast_replace_to, :broadcast_remove_to].each do |method|
    define_singleton_method(method) do |*args|
      return nil
    end
  end
end

# SEEDING PROCESS BEGINS
```

## Conclusion
We were able to improve the developer experience by making the
seeding process quicker with a short snippet of code. Shaving off about a minute of seeding seems insignificant, but it adds up!

Hope this helps!
Technology will be the star of the World Cup
Tags: bigdata, qata, inteligênciaartificial, tecnologia
Published: 2022-11-24 11:04:32

Artificial intelligence has already dominated several areas of work. Sports were not left out. The Qatar World Cup arrived with many technological innovations in football games, stadiums and cities.

We need to remember that Qatar has a rich and technological side. This provides an application of very new technology and some still unpublished.

Inside Field.
Even before entering the stadiums, fans will see a little of all this applied technology. Starting with the 100% digital tickets that will give access to the match venues via cell phone. Also the Hayya Card Digital, is an identification document for tourists, which is requested by the Qatari government for entry into the country and to the stadiums.

One of the main applications of the technology will be its use for the fastest and most efficient offside marking verification.

The official ball of the Cup, it was also designed with technology to be faster and more accurate.

Hot climate.
Stadiums will deploy the retractable roof if the weather is too hot for fans and teams. With this, the cooling of the stadium will also become more efficient.

The stadiums were also designed to be sustainable. They will use water and electricity efficiently.

Smarter teams.
Big Data is increasingly becoming the way out to solve problems in several areas, including team performance. This means that teams can utilize the massive collection of data to discover flaws and insights for game improvement.

Data everywhere.
The Internet of Things is still a distant concept for most people and most cities. During the Cup the visitors will be very close to that.

Cities will have smart sensors linked to urban mobility, public lighting and whatever else is needed.
What is Single Point of Failure?
Tags: blockchain, bitcoin, computerscience, webdev
Published: 2022-11-24 10:53:25


If you are intending to start a career in blockchain/web3, one important concept to understand is the Single Point of Failure, also known as SPOF.

{% embed https://twitter.com/jack/status/1516247207523008516 %}

## Key Takeaways

* A single point of failure is any part of a system that, if it fails, will stop the entire system from working.
* The best way to avoid this is to reject depending on a single point entirely and has many distributed points.
* Bitcoin blockchain is a decentralized network where transactions are stored and distributed across multiple nodes(servers). If a single node fails, the network does not go down and transactions won't be lost.  

## Single Point of Failure
A single point of failure is any part of a system that, if it fails, will stop the entire system from working.

For example a business owner needs $2500 per month to keep her business running. But she only got one client that pay her $2500 per month for her service. If that client decide to stop doing business with her, the business dies.

Another example is a football team that depends on only one star player to win matches; If that players gets an injury, the team stop winning.

## Solutions
Two types of solutions to the Single Point of Failure:

The first is to minimize the chance of the single point failing. For you the business owner, this means, you make sure the client sign a lifetime contract with you. For the football team, they ensure the star player is always fit. 

The second rejects depending on a single point entirely and has many distributed points.  For the business owner, this means, she has many clients that pay her $2500 per month, so if one decides not to pay her any particular month, her business keeps going.

## A decentralized network

The second solution is the optimal solution. Since no matter what happen to any single client, the business keep running smoothly. The business is never going to depend or rely on any single client.

This is the idea of the Bitcoin blockchain - a decentralized and trustless network where transaction data are stored and distributed across multiple nodes(servers). If a single node fails, the network does not go down and original data won't be lost.

Become a Web3/Blockchain Engineer in [this](https://school.forward.africa) 8-week program.
Angular 15: hostDirectives
Tags: angular, hostdirectives, refactoring, components
Published: 2022-11-25 06:08:43

---
title: Angular 15: hostDirectives
published: true
date: 2022-11-24 10:41:15 UTC
tags: angular,hostdirectives,refactoring,components
canonical_url: https://medium.com/@redin.gaetan/angular-15-hostdirectives-510e8a1fa456
---

How to avoid duplications and to keep access to properties

Hey, as you know, Angular 15 has been come with a new great feature: hostDirectives.

There are already many articles about it but I never read something about how to keep access to the directives properties yet. I will focus on an explicit example that will all know: disabled state.

Let’s start with an example:

```
@Component({
  selector: '...',
  host: {
    ...
    '[class.my-disabled-class]': 'disabled',
    '[attr.disabled]': 'disabled || null',
    '[attr.aria-disabled]': 'disabled || null',
    ...
  },
  template: `...`
})
class MyComponent {
  @Input() public disabled = false;

  // many other stuffs
}
```

This little piece of code is often duplicated. Sometimes, people use mixins to be DRY but you still have to repeat the host part.

So how to do better?

First, we will create the DisabledState directive like as follow:

```
@Directive({
  selector: '[myDisabledState]',
  standalone: true, // available since Angular 14
  host: {
    '[attr.disabled]': 'disabled || null',
    '[attr.aria-disabled]': 'disabled || null',
    '[class.rc-disabled]': 'disabled',
  },
})
export class DisabledStateDirective {
  @Input() public disabled = false;
}
```

And now, we can simplify our component like this:

```
@Component({
  selector: '...',
  host: {
    ...
  },
  hostDirectives: [{
    directive: DisabledStateDirective,
    inputs: ['disabled'],
  }],
  template: `...`
})
class MyComponent {
  // many other stuffs
}
```

More readable right? And also, better separation of concerns. One point, I loose the access to the disabled property. How to know in my component if it’s disabled or not? Thanks to the great Angular, it’s really easy to do it:

```
@Component({
  selector: '...',
  host: {
    ...
  },
  hostDirectives: [{
    directive: DisabledStateDirective,
    inputs: ['disabled'],
  }],
  template: `...`
})
class MyComponent {
  private readonly _disabledState: DisabledStateDirective = inject(DisabledStateDirective, { self: true });

  public myFunction(): void {
    if (this.disabledState.disabled) {
      ...
    }
  }
}
```

We can just use the inject method to get the DisabledStateDirective , we use the self: true to simplify the search to it.

Et voilà (I’m still french sorry).

I hope this little example will help someone to simplify his code et to write more readable code.

Thanks for reading.
Configure git user information
Tags: javascript, webdev, beginners, tutorial
Published: 2022-11-24 10:20:39

Configures user information for git.

Use `git config user.email <email>` to set the user's email for the current repository.
Use `git config user.name <name>` to set the user's name for the current repository.
You can use the `--global` flag to configure global user information.

Shell
```git

git config [--global] user.email <email>
git config [--global] user.name <name>
```

Example
```git
git config user.email "example@gmail.com"
git config user.name "Christopher Glikpo"
# Configures user for current repository

git config --global user.email "example@gmail.com"
git config --global user.name "Christopher Glikpo"
# Configures global git user
```

Connect me on [facebook](https://web.facebook.com/profile.php?id=100083195016286)
How To Generate A 'Blazing Fast' .gitignore File
Tags: rust, git, programming, showdev
Published: 2022-11-24 10:10:03

This article is a bit of a shameless plug (aren't they all), it is to promote a little command line utility that I created that enables the user to generate a `.gitignore` file from the terminal.

## Why is this useful?
This could largely be a 'me' problem, but it really annoys me when I have created a new project and pushed it to Github, to only go and see unwanted files or directories in my lovely new repository.

In comes [Toptal's .gitignore generator](https://www.toptal.com/developers/gitignore). This is a super handy way of creating .gitignore files for a wide range  of use cases.

I have been using the above website for quite a while and whilst I find it easy, it does annoy me that I have to visit the browser, enter the terms and then copy / pasta them into a `.gitignore` file.

## The solution
The solution is a small command line utility built with [Rust](https://www.rust-lang.org/).

It is very simple.

All you have to do is enter the command `gig` (naming things is hard) and the program will prompt you for some space separated terms.

It then goes off and fetches the generated `.gitignore` file and places it within the current directory.

If you would like to check it out or take it for a spin, here are the links:

[Source](https://github.com/damiensedgwick/gig)

[Latest Releases](https://github.com/damiensedgwick/gig/releases)