teleren/devto huggingface dataset:
A quoi sert un Service Web?
Tags: php
Published: 2022-03-21 20:48:49


__À quoi sert un Service Web?
 
Les applications professionnelles modernes utilisent diverses plates-formes de programmation pour développer des applications Web. Certaines applications peuvent être développées en Java, d’autres en .Net, d’autres en Angular JS, Node.js, etc.
 

 
 
Le plus souvent, ces applications hétérogènes nécessitent une sorte de communication entre elles. Comme ils sont construits avec différents langages de développement, il devient très difficile d’assurer une communication entre ces applications.
 


 
Donc c’est là où les services Web entrent en jeu. Les services Web constituent une plate-forme commune qui permet à plusieurs applications basées sur différents langages de programmation de communiquer entre elles.
Dans ce tutoriel, nous expliquerons plus en détail les services Web, les différents éléments qui les constituent et les principes de l’architecture SOA (Service Oriented Architecture).
 

Qu’est-ce qu’un service Web?
Un service Web est un support normalisé permettant de propager la communication entre client et serveur sur le World Wide Web(WWW).

Un service Web est un module logiciel conçu pour effectuer un certain ensemble de tâches.

Les services Web peuvent être recherchés sur le réseau et peuvent également être appelés en conséquence. Lorsqu’il est appelé, le service Web peut fournir une fonctionnalité au client qui appelle ce service Web.
 

 
 


 
L’image ci-dessus montre une vue très simpliste du fonctionnement réel d’un service Web. Le client invoquerait une série d’appels de service Web via des requêtes adressées à un serveur qui hébergerait le service Web réel.
Ces requêtes sont effectuées par des appels de procédure distante. Remote Procedure Calls(RPC) sont des appels aux méthodes hébergées par le service Web correspondant.

Le composant principal d’un service Web est constitué par les données transférées entre le client et le serveur, c’est-à-dire XML. XML (Extensible Markup Language) est un équivalent du HTML et qui est un langage intermédiaire compris par de nombreux langages de programmation.

Ainsi, lorsque les applications se communiquent, elles communiquent en fait en XML. Ceci fournit une plate-forme commune pour que les applications développées dans divers langages de programmation puissent communiquer entre elles.

Les services Web utilisent SOAP (Simple Object Access Protocol) pour envoyer des données sous forme d’XML entre les applications. Les données sont envoyées via HTTP. Les données envoyées par le service Web à l’application sont appelées des messages SOAP. Le message SOAP n’est qu’un document écrit en XML. L’application client qui fait appel au service Web peut être écrite dans n’importe quel langage de programmation.
Create A Linktree Clone Using React
Tags: react, javascript, tutorial, beginners
Published: 2022-03-21 20:23:02

Looking for a project to show off some of your React skills? [Michael Tirona](https://www.codecast.io/users/tironam) has created a four-part course on [CodeCast](codecast.io). 

![Linktree Course Cover](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1rov7qfsw3ynfry7obor.png)

In the course, you'll focus on creating all the structure and components needed using React. Once the core code is built out, you'll polish it up by styling it Bootstrap (specifically react-strap). Then you'll go through the deployment process on Netifly!

When you're done you'll have a fully functional link in bio application to use on your own social media.

Find the four-part course here:
https://www.codecast.io/series/82-build-a-linktree-clone-using-react-js/playlist
How I Present Markdown Slides from the Terminal
Tags: python, cli
Published: 2022-03-21 20:16:18

---
canonical_url: https://waylonwalker.com/til/lookatme-slides/
published: true
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xfy9vxqm2ozzbmlmgbgi.jpeg
tags:
- python
- cli
title: How I Present Markdown Slides from the Terminal
---

{% tweet 1506001160913756172 %}

I love the freedom of writing in markdown.  It allows me to write content from the comfort of my editor with very little focus on page style.  It turns out that markdown is also a fantastic tool for creating slides.

## Present from the terminal

I will most often just present right from the terminal using [lookatme](https://lookatme.readthedocs.io/en/latest/index.html).  Presenting from the terminal lets me see the results quick right from where I am editing. It also allows me to pop into other terminal applications quickly.

## reveal.js

I sometimes also use reveal.js, but that's for another post.  It is handy that it lives in the browser and is easier to share.

## New Slides

I leverage auto slides when I write my slides in markdown.  The largest heading, usually an h2 for me, becomes the new slide marker.  Otherwise my process is not much different, It just becomes a shorter writing style.

## Installation

lookatme is a python library that is available on pypi, you can install it with the pip command.

```
python -m pip install lookatme
```

Since it's a command line application it works great with pipx.  This prevents the need to manage virtual environments yourself or ending up with packages clashing in your system python environment.

```
pipx install lookatme
```

## From my terminal

``` bash
lookatme {filepath}
```

I just run it with pipx.

``` bash
pipx run \
 --spec git+https://github.com/waylonwalker/lookatme \
 lookatme {filepath} \
 --live-reload \
 --style gruvbox-dark
```

> Note, I use a custom fork of lookatme.  It's schema validation did not like
> the date format of my blog posts, so I have a one line fix built into my
> fork that is pretty specific to me.

## From Neovim
_most often what I do_

From Neovim I use a plugin I created for sending out commands to tmux called [telegraph](https://github.com/WaylonWalker/Telegraph.nvim).  This sends the above command to a new session that I can bounce between quickly.

``` vim
nnoremap <leader><leader>s <cmd>lua require'telegraph'.telegraph({cmd='pipx run --spec git+https://github.com/waylonwalker/lookatme lookatme {filepath} --live-reload --style gruvbox-dark', how='tmux'})<CR>
```
Angular & Gulp: custom assets hashing mechanism
Tags: angular, node, gulp, hash
Published: 2022-03-21 20:09:39

In this post you will learn how to create a flexible, fully customizable and easily maintainable cache busting mechanism using **gulp.js** for Angular applications. We'll compose a 2 step pipeline that hashes all files in the assets directory after application build is performed. 

First, let's install all the required libraries.
```npm install -D gulp gulp-rev gulp-rev-replace gulp-rev-delete-original```

Alright, let's create our pipeline. Create a new file in the root directory and name it **gulpfile.js**. Good, now import all the dependencies inside the file. 

```ts
const gulp = require("gulp");
const rev = require("gulp-rev");
const revreplace = require("gulp-rev-replace");
const revdel = require("gulp-rev-delete-original");

const { name } = require("./package.json");
const assets = `dist/${name}/assets`;
```

Let's create a first task that will traverse the assets folder and append unique hashes to the file names. 

```ts
gulp.task("hash:revision-media", () =>
  gulp
    .src(`${assets}/**/*.*`)
    .pipe(rev())
    .pipe(revdel())
    .pipe(gulp.dest(assets))
    .pipe(rev.manifest())
    .pipe(gulp.dest(assets))
);
```
I will briefly describe each step:  
(1) locates all matching files and reads them into memory to pass through the stream

> Having inserted this pattern, gulp will match any file with any extension in any directory. If you want to target a concrete extension or multiple extensions, use a glob pattern syntax **{x1,x2,..,xn}**, e.g: *.{jpg,jpeg,png}

(2) hashes a file, e.g: `mylovelydog.png -> mylovelydong-df1cr0g.png`
(3) removes old, unused fingerprinted files 
(4) writes hashed assets to build directory
(5) maps the original paths to the revisioned paths and places the directory in a manifest file
(6) writes the manifest to build directory

Now, we need to find all occurrences in our bundled output files and update them by replacing the original paths with the hashed ones using our manifest that holds all the mappings. 

```ts
gulp.task("hash:replace-hashed-media-imports", () => {
  const manifest = gulp.src(`${assets}/rev-manifest.json`);

  return gulp
    .src(`dist/${name}/*.{html,css,js}`)
    .pipe(revreplace({ manifest }))
    .pipe(gulp.dest(`dist/${name}/`));
});
```
Almost there! Now, we will combine these two tasks into a single task. 

```ts
gulp.task(
  "optimize",
  gulp.series("hash:revision-media", "hash:replace-hashed-media-imports")
);
```

Finally, let's set up our `package.json` in the way that our pipeline will run after build is complete.

```json
"scripts": {
    ...
    "postbuild": "gulp optimize",
},
```

Done. I hope this post will help you building your own pipeline. If you have any questions, feel free to ask them in the comments!
An opinionated way to build and maintain complex YAML documents
Tags: go, yaml, devops, kubernetes
Published: 2022-03-21 19:56:41

---
title: An opinionated way to build and maintain complex YAML documents
published: true
description: 
tags: golang, yaml, devops, kubernetes
//cover_image: https://direct_url_to_image.jpg
---

## `dirty` - Directory to YAML 

Create YAML documents from a directory tree.

Build a YAML document from a directory tree containing YAML fragments.

It is useful everywhere complex YAML configuration is employed: 

- CI pipelines 
- Crossplane Compositions 
- Kubernetes manifests, etc.

For instance, Kubernetes resources can be complex, and in turn make the YAML very verbose.

The aim is to make the document easier to reason about and maintain.

### How to use

`dirty` parses a directory tree:

- a directory is a yaml key
- a file (a yaml fragment) has content that is rendered at the current indentation level

Check this Crossplane Composition as example: https://github.com/lucasepe/dirty/tree/main/testdata/platform-ref-aws/cluster/eks

Here the repo link:  https://github.com/lucasepe/dirty

Regards,
Luca
Grails 5 no longer runs my tests!
Tags: grails, gradle, groovy
Published: 2022-03-21 19:56:05

# Problem

I just followed the guide to upgrade from Grails 4.0 to Grails 5.1 [here](http://docs.grails.org/snapshot/guide/single.html#upgrading40x). I now try to run my unit and integration tests and Gradle is reporting there are no tests to run!

# Solution

In our case, we need to add a new line in `build.gradle`:

```groovy
tasks.withType(Test) {
    useJUnitPlatform() // <-- Here
    systemProperty "geb.env", System.getProperty('geb.env')
    systemProperty "geb.build.reportsDir", reporting.file("geb/integrationTest")
    systemProperty "webdriver.chrome.driver", System.getProperty('webdriver.chrome.driver')
    systemProperty "webdriver.gecko.driver", System.getProperty('webdriver.gecko.driver')
}
```

This tells Gradle that we're using JUnit-style tests.
Building PowerShell Module - how to organise your source files and build with ease
Tags: powershell, module, building, video
Published: 2022-03-21 19:55:09

Ever wanted to build #PowerShell module with ease? Wondered how to organise your source files? I made a video describing step by step of the process, with sample files on GitHub!

[Building PowerShell Module - how to organise your source files and build](https://youtu.be/lKO_LPMfV1Y)
WP Engine Review - Der WordPress Hoster mit dem alles begann
Tags: wordpress, hosting
Published: 2022-03-22 12:12:35

---
title: WP Engine Review - Der WordPress Hoster mit dem alles begann
published: true
date: 2022-03-21 19:48:10 UTC
tags: WordPress,hosting
canonical_url: https://bloggerpilot.com/wp-engine/
---

![WP Engine Review](https://bloggerpilot.com/wp-content/uploads/2022/03/wp-engine-review.png)

WordPress betreibt über 23 Millionen Websites auf der ganzen Welt. Daher ist es normal, dass WordPress-Nutzer/innen eine Art von Webhosting-Service benötigen, um ihre WordPress-Websites zu hosten. Was du vielleicht nicht weißt, ist, dass WordPress im Vergleich zu anderen beliebten Content-Management-Systemen (CMS) als besonders empfindlich gegenüber schlechtem Webhosting gilt. WP Engine ist ein verwalteter WordPress-Hosting-Anbieter, dem Millionen von Menschen wegen seiner Stabilität und Geschwindigkeit vertrauen. Berühmt ist auch sein erstklassiger Kundenservice. In diesem Artikel erfährst du alles, was du über WP Engine wissen musst.

Der Original-Artikel erschien auf [WP Engine Review - Der WordPress Hoster mit dem alles begann](https://bloggerpilot.com/wp-engine/).

## Was ist WP Engine?
WP Engine ist ein cloudbasierter WordPress-Hostingdienst, der automatische Backups, einen Staging-Bereich, Staging-Sites und mehr bietet. Für Entwickler bietet WP Engine eine API und Staging-Sites. Und für Website-Besitzer bietet WP Engine eine Reihe von Optionen, darunter Website-Sicherheit, Website-Leistung und Website-Geschwindigkeitsoptimierung.

WP Engine ist blitzschnell. Die Server sind sogar so schnell, dass sie mit einem CGI-Skript auf einem UNIX-Server vergleichbar sind. Die Server von WP Engine liefern bis zu 100 Mal mehr Anfragen pro Sekunde als die typischen Shared Hosts und bis zu 20 Mal mehr Anfragen pro Sekunde als ein typischer VPS-Host.

Zusammenfassend lässt sich sagen, dass WP Engine der beste WordPress-Hosting-Anbieter ist. WP Engine bietet schnelles WordPress-Hosting mit individuellen Funktionen.
Ansible İle Miço RPM Ajanı Dağıtma
Tags: ansible, liman, mico
Published: 2022-03-21 19:46:49

Yerli bir SCCM alternatifi olan Miço, Windows işletim sistemi, Redhat ve Debian tabanlı işletim sistemlerine rahatlıkla kurulabilmektedir. 
Birden fazla linux makineye kurulum yapılmak istendiğinde akla ilk ansible gelmektedir. 

Bu dokümanda Pardus 21 Sunucu üzerine kurulu ansible uygulaması kullanılarak Redhat tabanlı makinelere Miço ajanının kurulumu anlatılmıştır. [(github deposu)](https://github.com/aciklab/ansible-mico) 
![schema](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0svmcy8jfz06os90kjq6.png)

 - Öncelikle Pardus 21 Sunucusu üzerine ansible ve gerekli diğer paketler yüklenir
```
apt install ansible git sshpass
```
- /opt dizinine gidilerek `ansible-mico` indirilir
```
cd /opt
sudo git clone https://github.com/aciklab/ansible-mico.git
```
- Mevcut **Miço** rpm paketi ve **osquery** paketleri `/opt/ansible-micofiles/rpm/` dizini altına kopyalanır.
![list-of-rpm-packages](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i37ztpfvg24e9h76605y.png)
 
 
✅  osquery'nin en güncel paketi için [osquery'nin](https://osquery.io/downloads/official/5.2.2) ziyaret edebilirsiniz. 
- /opt/ansible-mico/inventory/hosts dosyasına `[rpm]` başlığı altına Miço ajanı yüklenecek makinenin IP adresi, ssh kullanıcı adı ve ssh kullanıcısının parola bilgilerini yazmak gerekmektedir.
```
[rpm]
192.168.5.66 ansible_ssh_user=sysadmin ansible_ssh_pass=1
```
- /opt/ansible-mico/vars/mico-vars.yml dosyası içerisine Miço sunucusunun ip adresi aşağıdaki şekilde yazılır.
```
mico_server: "192.168.5.10"
```
- /opt/ansible-mico dizinine gidilir ve aşağıdaki şekilde ansible komutu çalıştırılır.
```
cd /opt/ansible-mico
ansible-playbook playbooks/rpm.yml 
```
![rpm-yml-output](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2n4w5xbh0uo5y6xerw9o.png)
Planning for release 2.9
Published: 2022-03-21 19:29:02

#Overview
This week we will land 2.9 for Telescope and as usual, I will be responsible for Telescope's mobile app using React Native. And in the release 2.9 I will work on the footer for About Screen.

#[Issue-3203](https://github.com/Seneca-CDOT/telescope/issues/3203)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dqnvd4z9vz2gt8wjeg8x.png)
A footer need to be added to About Screen like the original Telescope web app. As you can see in the picture above, I have to make the UI as well as integrate with GitHub API to show the contributors of Telescope.
For now I have completed 40% of the footer. Links have been added and the Titles have been styled. The problem is that I am still researching how to use <code>justifyContent: 'center'</code> here so that a blank space will be created between <code>Docs</code> and <code>More</code>. I have tried it but I did not worked. <code>flexWrap</code> did not work either. I still have 2 days to complete it so everything should be good to have a PR before the release.

#Planning
After finishing the footer, I will work on the Image service for Home Page as well as help Kevan on Posts service.
Structs em Elixir
Tags: elixir, livebook
Published: 2022-03-21 19:17:16

Fiz um vídeo sobre Structs em Elixir:

{% youtube wJknSjlOkYM %}

O código do vídeo está em [Livebook do vídeo](https://gist.github.com/adolfont/72b6ece62c644c890976a137c62be714). Sabe como rodar um Livebook? Acesse https://livebook.dev/

Eu usei como base a documentação de Structs no site de Elixir https://elixir-lang.org/getting-started/structs.html
How To Learn Power BI ?
Published: 2022-03-21 19:12:01

As a result of Power BI’s level of popularity, there are a great deal of educational resources available to aiming professionals every aspect of the program to learn  power BI beginning from the normal information to Power BI meeting questions. You can even review what you’ve learned by practicing with this BI test.

As an example, you can start learning Power BI by taking Power BI Basics course.

With that said, here’s a different methods you can employ whether you happen to be just starting to [learn Power BI](https://www.igmguru.com/data-science-bi/power-bi-certification-training/), or you want to brush up/improve on your existing skillset.

• Microsoft’s guided learning resources
• Microsoft hosted training webinars
• Visiting the official Power BI online community
• Microsoft’s uploaded training videos online
• Power BI’s development team’s blog
• Various online training made available from different e-learning sites, companies, and websites

Right after having understood how to learn Power BI, let us all next understand how to utilize it.

**How to Use Power BI**

As soon as trying to fully grasp how to apply Power BI, is considered best to get started on by simply getting acquainted having the tool’s several elements. Power BI comprises of:

• **Power BI Desktop**.  Typically the Windows desktop use
• **Power BI Service**.  The online Software as a Service (SaaS)
• **Mobile apps**.  These kinds of software are suitable for Android, iOS, together     with Windows mobile units
• **Power BI Report Server**.  As soon as you develop your Power BI reports using Pc, you can post these to an on-premises report server

Users  hook up to the required data sources and make a report using Power BI Desktop computer. When the report is complete, users distribute it to the Power BI service, allowing end-users to view and link to the information.

And do not forget that you have the option of using the Power BI Report Server if you’re not ready for individuals  outside of your company’s firewall to see the reports yet!

As soon as you gain proficiency by simply learning Power BI, it is crucial to look straight into the various task opportunities for qualified individuals.
Best Developer Setup (Fish Shell & NeoVim & VSCode Ext. Pack )
Published: 2022-03-21 19:05:32

## Shell Setup

- [Fish shell](https://fishshell.com/)
- [Fisher](https://github.com/jorgebucaran/fisher) - Plugin manager
- [Tide](https://github.com/IlanCosman/tide) - Shell theme. Use version 5: `fisher install ilancosman/tide@v5`
- [Nerd fonts](https://github.com/ryanoasis/nerd-fonts) - Powerline-patched fonts. I use Hack.
- [z for fish](https://github.com/jethrokuan/z) - Directory jumping
- [Exa](https://the.exa.website/) - `ls` replacement
- [ghq](https://github.com/x-motemen/ghq) - Local Git repository organizer
- [peco](https://github.com/peco/peco) - Interactive filtering

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

## NeoVim Setup

```zsh
brew install neovim
npm install tree-sitter cli
brew install luajit
```

- [Vim-Plug](https://github.com/junegunn/vim-plug) - minimalist plugin manager
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig) - A collection of configurations for Neovim's built-in LSP
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter) - [Treesitter](https://github.com/tree-sitter/tree-sitter) configurations and abstraction layer for Neovim
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp) - A completion plugin for neovim coded in Lua
- [lspsaga.nvim](https://github.com/tami5/lspsaga.nvim) - A light-weight LSP plugin based on Neovim built-in LSP with highly a performant UI
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim) - A highly extendable fuzzy finder over lists
- [defx.nvim](https://github.com/Shougo/defx.nvim) - A file explorer

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

## Vscode Plugins

- [Spirit Ship Pack](https://marketplace.visualstudio.com/items?itemName=bcakyz.spiritship-pack) 
This package covers all the needs of a full stack developer
How to Refactor the global variables in javascript?
Tags: javascript, webdev, beginners, tutorial
Published: 2022-03-21 19:03:02

A deeper dive into the namespace pattern to refactor the global variables.

We all have heard or read that globals are bad practices.

Polluting the code space with multiple globals leads to unmanageable and unpredictable code. It is always advisable to keep the globals in check and have it as minimum as possible.

In this part, we will be discussing one approach that will reduce the global variables with much ease.

Suppose in your codebase the following globals are present —

```
// Constructors
function X() {}
function Y() {}

// global vars
var res = 1;

// global objects
var module1 = {
   a: 1,
   b: 2
};

var module2 = {};
module2.a = 10;
module2.b = 20;

var module3 = {};
```

In the above block, we have **_6 global variables_**. Now, we can refactor this code to have only one global object, and all the constructors, variables, and objects will be part of it.

Ideally, all codebases should thrive to have a single global variable. 

Having multiple globals are bad because of many reasons — 

1. they could be modified accidentally and are error-prone.
2. also, it may cause name collision with your code or 3rd party library

## Solution —
Refactored code —

```
// Global object
var APP = APP || {};

// Constructors
APP.X = function () {};
APP.Y = function () {};

// variables
APP.res = 1;

// objects
APP.modules.module1 = {a: 1, b: 2};
APP.modules.module2 = {};
APP.modules.module2.a = 10;
APP.modules.module2.b = 20;
APP.modules.module3 = {};
```

There is a problem with the code e.g if you want to use the below

```
var module1 = APP.modules.module1;
```
you have to make 3 checks like below

```
var module1 = APP && APP.modules && APP.modules.module1;
```
and this is kind of irritating.

To solve this we need to have a handy function that deals with the `namespacing` part. 

Let's call this function `‘namespace()’` and use it like this —

```
APP.namespace(‘APP.modules.module1’) 
```
which is equivalent to —

```
var APP = {
   modules: {
      module1: {
      }
   }
};

```

## Implementation of namespace() function

```
var APP = APP || {};

APP.namespace = function (str) {
  var parts = str.split('.'),
      parent = APP;

  // remove the redundant global
  if (parts[0] === 'APP') {
      parts = parts.slice(1);
  }

  for (var i = 0; i < parts.length; i++) {
      if (typeof parent[parts[i]] === 'undefined') {
          parent[parts[i]] = {};
      }
      parent = parent[parts[i]]; 
  }

  return parent;
}
```

Let's test the above.

![Refactoring global variables](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f6qd3f93pyq2kc3dtgog.png)

We can see that —

```
APP.namespace(‘APP.modules.module1’)
```
gives the desired result and also passing the `APP (the top global object in the namespace)` is redundant. We can achieve the same by passing just `modules.module1`

```
APP.namespace(‘modules.module1’)
```

---

Let me know if you like the namespace pattern. If you like my article, please follow me. Thanks for reading the article, See you soon!