teleren/devto huggingface dataset:
Acing Elastic Certified Engineer Exam
Tags: elasticsearch, elk, certification, exam
Published: 2023-01-08 03:03:13

This blog post shares some basic tips and techniques that can be helpful in acing the Elastic Certified Engineer Exam.

### First things first
* Check the Exam Version (8.1 at the time of writing this post)
* Note the duration - 3 hours
* Check Exam Topics
* Read the complete FAQ

All of the above can be found at [Elastic Certified Engineer Exam page](https://www.elastic.co/training/elastic-certified-engineer-exam). 

Please do not miss to read the [FAQ](https://www.elastic.co/training/certification/faq).

### Next Steps
* Without missing a beat, go through Rich Raposa's [webinar](https://www.youtube.com/watch?v=9UpB-s_ZfNE&t=1579s). This is extremely important as it not only gives an overview of what to expect in the exam, but also shows how the exam environment looks like. In essence, it gives some familiarity with the exam environment which is immensely helpful. The webinar is dated July 2021 but it's pretty relevant. 

* Read this excellent [post](https://www.linkedin.com/pulse/elastic-certified-engineer-exam-my-experience-how-i-surbhi-mahajan/) by Surbhi Mahajan. It has links to a plethora of resources including mock tests.

* Re-read the Exam Topics. This is extremely important as it's easy to get way-laid during exam preparation when curiosity gets the better of us and start reading and trying out topics that are not on syllabus / agenda. If you have any questions related to the topics, send an email to certification@elastic.co. The certification folks at Elastic are pretty empathetic and very responsive.

### Preparation Strategy
* The exam topics has 5 main sections. The questions will be distributed across them so makes sense to prepare from all the sections.
* From each section, read few topics and gain some confidence. Confidence is the key here. If you find losing your confidence, take up a topic that's more familiar, tackle it, regain confidence and take up challenging / un-familiar topics. 
* The exam has around 10 questions with a time duration of 3 hours (180 minutes). So approx 17 minutes per question with a buffer of 10 mins. During the exam, don't spend too much time on one question as it affects confidence. First attempt the questions that seem familiar and then use the remaining time to attempt other questions. There's `partial grading` so do attempt `all` the questions.
* Be well-versed with [Elastic Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/8.5/elasticsearch-intro.html). Know how to navigate and find the relevant info. The documentation is fully available to use during the exam so no need to memorise the APIs. Just remember where to look.

Hopefully this helps you in your preparation for the ECE Exam. Good luck!
How to change the default app for files of a particular type in the mac terminal
Published: 2023-01-08 02:49:51

https://superuser.com/questions/273756/how-to-change-default-app-for-all-files-of-particular-file-type-through-terminal

Install duti: `brew install duti`

Now you need to find the id of the app you want to use, and assign it to the extension you want to use it for. In this example, I already use Brackets for *.sh and I want to also use it for *.md files instead of xcode.

Get the default app id for .sh files: `duti -x sh`

```
output:
  Brackets.app
  /opt/homebrew-cask/Caskroom/brackets/1.6/Brackets.app
  io.brackets.appshell
```

The last line is the id.

Use this app id for all .md files: `duti -s io.brackets.appshell .md all`
WordPress Bar Search
Tags: wp, search, productivity
Published: 2023-01-08 02:24:23

WordPress Bar Search is a WordPress advanced search, the ability display items as tabs/radio/dropdown with advanced fields.
You can search by search categories, tags, taxonomies, authors, date, sort, order by …
Otherwise, you can search categories, tags, taxonomies, … as tab bar search
Unlimited Search form, so you can create many types of search form

https://zufusion.com/downloads/wordpress-bar-search/
WordPress Content Filter
Tags: wp, filter, search
Published: 2023-01-08 02:21:28

WordPress Content Filter lets you filter by rating, custom fields, taxonomies, meta fields, authors, dates, post types, sort and more.

Users now able to choose to use the Redirect or Ajax to display the search result.

It allows you filter posts, pages, WooCommerce, Easy Digital Downloads: product attributes, product categories, custom taxonomies, price, meta fields …

https://zufusion.com/downloads/wordpress-content-filter/
Full Stack Development with Spring Boot and React (အခန်း ၆)
Published: 2023-01-08 01:56:32

ဒီအခန်းမှာတော့ MariaDB(MySql) server install လုပ်ပြီး Spring Boot ကနေလှမ်းချိတ်မှာဖြစ်ပါတယ်။

https://downloads.mariadb.org/ ကနေ နောက်ဆုံး stable version ကို download လုပ်ပြီး install လုပ်ပါ။


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

root user အတွက် password ပေးပါ။ ဒီ password ကို application.properties file မှာနောက်ကျရင် ထည့်ပေးရပါလိမ့်မယ်။


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

ပြီးရင်တော့ default setting အတိုင်းပဲထားပြီး install စလုပ်ပါ။


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

MariaDB installer မှာ Heidi SQL client ပါပါတယ်။ သူ့ကိုလည်း install လုပ်ပါ။ 

Installation ပြီးရင်တော့ Heidi SQL သုံးပြီး local မှာခုဏက install လုပ်လိုက်တဲ့ MariaDB server ထဲကို ဝင်ကြည့်လို့ရပါပြီ။ အဲဒီဆိုရင် cardb ဆိုတဲ့ database ကို create လုပ်လိုက်ပါ။



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


ပြီးရင်တော့ Database list ထဲမှာ အောက်ပါအတိုင်းရှိနေရမှာဖြစ်ပါတယ်။


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

Application ဆီကို ပြန်သွားပြီး pom.xml (Maven file) ထဲမှာ maria db ကို ချိတ်ဖို့ အတွက် client ကိုထည့်ပေးပါ။

```xml
<dependency>
    <groupId>org.mariadb.jdbc</groupId>
    <artifactId>mariadb-java-client</artifactId>
</dependency>
```

ပြီးရင်တော့ mariadb ကို ချိတ်ဖို့ configuration တွေကို application.properties မှာ အောက်ပါအတိုင်း setting ချပေးပါ။ အခုချိန်ကစပြီး ကျွန်တော်တို့ H2 database အစား MariaDB ကို စသုံးတော့မှာဖြစ်ပါတယ်။

```properties
spring.datasource.url=jdbc:mariadb://localhost:3306/cardb
spring.datasource.username=root
spring.datasource.password=YOUR_PASSWORD
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=update
```
Spring boot application ကို run လိုက်မယ်ဆိုရင် mariadb ထဲက cardb database ထဲမှာ table တွေ သူ့အလိုလို create လုပ်သွားတာကို တွေ့ရပါလိမ့်မယ်။ JPA ရဲ့ @Entity notation ပါတဲ့ class တွေအတိုင်း table တွေဆောက်သွားတာပါ။


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3rfw018o53iu3wa2v9j3.png)
What are some essential apps that are easy to code?
Tags: help, ideas, programming
Published: 2023-01-07 23:28:35

I want to build my portfolio with a project that isn't purely for fun, something that provides good function, but I'm having programmersblock.  
What are some apps that are essential for people, programs that solve everyday problems, regardless of whether it's for normies or programmers?
Additionally it'd be preferred if the app could be used in the terminal since GUI programming is complex in languages other than Python or HTML+CSS.

Thanks in advance.
Cheers!
El libro negro del programador 🖥
Tags: programming, books, productivity, spanish
Published: 2023-01-07 23:00:00

Me considero un acérrimo lector, cosa que antes no me gustaba del todo ahora es una actividad y un pasatiempo que disfruto mucho poder hacer.

Sobre todo me encanta leer mucha literatura, investigar cuales son las mejores obras de los mejores escritores y entre el amplio abanico de posibilidades elegir las obras que más me llamen la atención.

Al principio como todo principiante me tocó leer textos que ya ni recuerdo post si intrascendente contenido que a mi criterio fue vago y paupérrimo, pero con el tiempo uno va mejorando e inevitablemente llega a libros de mejor calidad y que estan mas proximos a uno, que le sirven y dejan una huella marcada.

Por ello y con este breve preámbulo que seguro muchos de los lectores de este blog no leerán, (no les culpo), **me propuse intentar cambiar el rumbo de mis lecturas este 2023 y orientarlas más al panorama académico**, uno de los primeros libros que me gustaría leer es justamente **El libro negro del programador** cuyo título es una invitación a explorar sus páginas y ver que cosas interesantes tiene para decirte su autor, **Rafael Goméz Blanes.**

La intención de esta serie de posts no es hacerles un resumen del libro, considero que eso seria estaria tirando más a un estilo escolar que no es la intención, sino más bien de que se animen a leerlo (o no) en base a lo que vaya escribiendo, ¿será que estamos de acuerdo con todo lo que dice el autor?, quizá nos identifiquemos con muchos aspectos que menciona en su libro, o quizá no le veamos el más mínimo aporte a nuestra carrera profesional, todo esto lo dejo a criterio tuyo.

Empecemos...

---

Te dejo el link gratuito de [*El libro negro de programador*](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf) por si te intesa leerlo, o dale click a la imagen:



[![libro](https://www.digitalskillsinstitute.com/assets/media/books/5541eba31b4b42b5bb021dc77c70d658-480.jpg)](https://underpost.net/ir/pdf/cy3/el-libro-negro-del-programador.pdf)
How To: Highlight text in the DOM
Published: 2023-01-07 22:55:35

Here's a link to a Fediverse post that shows the best way I've found to highlight text in the DOM. I got the inspiration from this Youtube video (below) as I was learning how to write Chrome Plugins, and was extremely happy with this solution.

My app uses it to highlight search results after someone searches the database for some text.

Here's the link...

[Highlighting Text in DOM](https://quanta.wiki/u/clay/dom-highlighting)

Let me know what ya'll think! 

Here's the Youtube that was the inspiration for this:

https://www.youtube.com/watch?v=rymG9UmPuhM
Removing Google Analytics does it have an impact on the ranking?
Tags: discuss, seo, google, analytics
Published: 2023-01-07 22:44:00

Hello ! 

I'm basically a user who had pushed out of my view Google Analytics, to use Open Source solutions (that's the base) such as [Matomo](https://matomo.org/) (formerly Piwik), and then I tested [Umami](https://umami.is/), very easy to use and lighter. ✨

But recently, I asked myself the question again, and I couldn't **find a clear answer**. 

> Does removing Google Analytics from my websites have an impact on ranking and SEO?


Feel free to share with us posts, documentations and latest information about that. Thanks 👍🏼

____
Edit of the 11 january :

{% embed https://twitter.com/Thomasbnt_/status/1612491794775695360?s=20 %}
Changing a column name in an existing table
Tags: ruby
Published: 2023-01-07 22:34:49

To change a column name in an existing table (for example: from "body" to "movie"), we should run the following command in the terminal:
rails generate migration rename_body_column_to_movie

Then, we need to run the command:
"rails db:migrate"

Then a new migration file should appear in the "migrate" folder
"Comparing Netlify, GitHub Pages and AWS: A Detailed Look at Three Popular Static Website Hosting Platforms"
Published: 2023-01-07 22:00:27

When it comes to hosting static websites, there are a plethora of options available to developers. Two of the most popular platforms are Netlify and GitHub Pages, but in this article, we will also take a detailed look at hosting static websites on AWS.
In this article, we will compare Netlify and GitHub Pages to help you understand the pros and cons of each platform and choose the one that is best for your needs.

Netlify is a platform-as-a-service (PaaS) provider that offers a simple, yet powerful, hosting solution for static websites. With Netlify, developers can easily deploy and manage their websites directly from their Git repositories. The platform also provides a wide range of features such as continuous deployment, automatic SSL, and custom domains. Additionally, Netlify offers a free plan with basic features and a generous free tier, making it a great option for those on a tight budget.

GitHub Pages, on the other hand, is a free hosting service offered by GitHub. With GitHub Pages, developers can easily host their static websites directly from their GitHub repositories. The platform also offers automatic SSL, custom domains, and built-in integration with other GitHub features such as pull requests and issues. However, unlike Netlify, GitHub Pages only supports Jekyll, a static site generator, and does not offer as many features as Netlify.


When it comes to AWS, it provides a more comprehensive and flexible solution for hosting static websites. AWS offers a wide range of services that can be used to host static websites, including Amazon S3, Amazon CloudFront, and AWS Elastic Beanstalk. These services provide a high level of scalability, security, and performance. Additionally, AWS provides a free tier for the majority of its services, making it a cost-effective option for those on a budget.


While Netlify and GitHub Pages are both great options for hosting static websites, AWS offers a more comprehensive and flexible solution for hosting static websites. With AWS, developers can take advantage of a wide range of services to build and deploy their websites, including Amazon S3, Amazon CloudFront, and AWS Elastic Beanstalk. Additionally, AWS provides a free tier for the majority of its services, making it a cost-effective option for those on a budget.

In conclusion, while both Netlify and GitHub Pages are great options for hosting static websites, AWS provides a more comprehensive and flexible solution for hosting static websites. With a wide range of services and a free tier, AWS is a great option for developers looking for a cost-effective and scalable hosting solution for their static websites.
What’s your favorite reading list in 2022
Tags: reading, learninpublic
Published: 2023-01-07 22:18:09

Inspired by YouTuber Ali Abdaal’s [tweet](https://twitter.com/AliAbdaal/status/1607711663645417473), which is an **awesome** reading list to me, I compiled a list of articles that I personally get inspired the **most** in 2022 https://blog.liallen.me/2022-articles

Curious to see what’s yours 🧐? Excited to learn from them!
Free blog setup with GitHub and Hugo
Tags: hugo, blog, github
Published: 2023-01-07 21:34:26

I recently moved my blog from Wordpress hosted on DigitalOcean to [Hugo](https://gohugo.io/) hosted on [GitHub pages](https://pages.github.com/). Here's how and why I did it.

## Why?

Because I'm cheap and spending ~10$/month for a blog that gets close to 0 traffic and close to 0 attention from the owner hurts my onion hearth.

## What's Hugo?

[Hugo](https://gohugo.io/) is a static site generator (SSG) written in Go. It's main strength is speed of generation, but I like it for other reasons:

- Convention over configuration
- "All you need" features out of the box
- Maybe not the biggest but definitely high quality community
- Easy to understand, no magic source code
- Markdown 💖

## Migrating content

Hugo content is written in Markdown so I had to transform it. And since my blog had at the time enormous amount of content, i.e. 2 posts, I did that manually using .

The easiest way is to simply open each blog post, inspect the source in Chrome, find the first wrapping dom node in the inspector, right click and select "Copy outerHTML". Paste result in to https://codebeautify.org/html-to-markdown and enjoy freshly baked Markdown.

*If You need your old posts to appear under the same URL You can use [`aliases`](https://gohugo.io/content-management/front-matter/#predefined) field in post frontmatter.*

## Hosting

GitHub distingushes 3 types of pages: personal, organization and project. Since it's a personal blog I followed the guidelines for that type. In this case GitHub requires that the repo must be named after the username, in my case `https://github.com/pasierb/pasierb`.
Side benefit of this naming scheme is that the repo's README becomes your [profile README](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-profile/customizing-your-profile/managing-your-profile-readme).

I was worried that I will need to learn GitHub Actions to run hugo build, but suprisingly once GitHub notices that the repo is a Hugo project I got predefined build configuration suggested and it works flowlessly (awesome job GH!).

## Custom domain

To set up custom domain for GitHub Pages I had to verify that I own the domain, which boils down to setting some TXT record in DNS.

On thing that I noticed once the project was available at `www.stuffs.dev` is that assets are not loading and paths are wrong. Turns out that Hugo be default uses relative paths which is problematic since GH Pages uses username path prefix, e.g. `pasierb.github.io/PASIERB`.
In order for things to work correctly with path prefix I had to force Hugo to use absolute paths when generating HTMLs. Fortunately it's as easy as setting `canonifyURLs = true` in `config.toml`. That's it!

## Conclusion

Moving everything took me probably less than 2h which I find a great result. Developer experience both on GitHub side as well as Hugo is top notch. 
10$/month more in my pocket is also top notch 🤑.

_Originially posted on my blog at [www.stuffs.dev](https://www.stuffs.dev/posts/free-blog-setup-with-github-and-hugo/)_
📋 TIL you can create your own GitHub Actions workflow templates
Tags: github, todayilearned
Published: 2023-01-07 21:48:02

So you know how there's this wizard that you can use to create new GitHub Actions right? It turns out that there's a way to add your own GitHub Actions templates there!

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

All you need to do is add a `workflow-templates/*.yml` and `workflow-templates/*.properties.json` pair in your `user/.github` repository. This works for both organizations (like the official GitHub docs say) **and regular users**.

`workflow-templates/say-hi.yml`

```yml
name: Say hi!
on:
  push:
    branches: [$default-branch]
jobs:
  say-hi:
    runs-on: ubuntu-latest
    steps:
      - name: Echo "Hi!" to the user
        run: echo "Hi!"
```

`workflow-templates/say-hi.properties.json`

```json
{
    "name": "Say hi!",
    "description": "Says hi to the user",
    "iconName": "emoji-wave",
    "categories": ["Automation"],
    "filePatterns": ["README.md"]
}
```

`workflow-templates/emoji-wave.svg`

```svg
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <text y="75px" font-size="75px">👋</text>
</svg>
```

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

📚 Further reading: [Creating starter workflows for your organization](https://docs.github.com/en/actions/using-workflows/creating-starter-workflows-for-your-organization) (also works for users too)

## How you might want to use this

A great way to take advantage of this template feature is to make workflow templates for things you do often or in every repository. Think like...

1. Node.js `test.yml` workflow
2. Workflow to deploy to GitHub Pages from `npm run build`
3. Mirroring `wiki/` to the GitHub wiki page
4. Enabling `/help` in any issue

Anything that is arduous to re-type or re-reason about (like something that has complex `on: *` or `permissions: *` properties) on the workflow level is something that is a good candidate for a template.
¿Cómo manejar los recursos físicos a los que tienen acceso nuestros contenedores?
Tags: docker, devops, backend, linux
Published: 2023-01-07 21:30:58


Podemos especificarle a Docker que cantidad de memoria RAM y núcleos del CPU pueden utilizar con una subsección en la parte del servicio lamada **[Deploy](https://docs.docker.com/compose/compose-file/deploy/),** esta especificación nos permite definir algunos requerimientos para el contexto de ejecución de nuestro contenedor/servicio, es decir cuando el contenedor ya está corriendo. 

Entre las opciones que nos deja configurar esta funcionalidad está la parte de **[Resources](https://docs.docker.com/compose/compose-file/deploy/#resources)** que nos ayuda a manejar las restricciones de recursos físicos a los que va a tener acceso el contenedor una vez que esté en ejecución.

Entonces, adentro de la configuración de **Resources** tenemos dos campos que son siempre opcionales:

- Limits
    - Como su nombre lo especifica, nos permite establecer un límite de memoria ram y nucleos del cpu para el contenedor
- Reservations
    - También muy descriptivo, nos da la posibilidad de reservar espacio de manera exclusiva para la memoria RAM y núcleos del CPU

Ahora miremos un ejemplo concreto y sencillo:

```yaml
version: '3.8'

services:
  web:
    build: .
    volumes:
      - .:/code
    ports:
      - "8081:80"
    command: "python3 manage.py runserver 0.0.0.0:80"
    deploy:
        resources:
            limits: #Definiendo el límite de acceso a memoria RAM y núcleos CPU
              cpus: 0.50
              memory: 512M
            reservations: #Reservando espacio de memoria RAM y núcelos del CPU
              cpus: 0.25
              memory: 128M 

  database:
    image: postgres:14.1-alpine
    restart: always
    environment:
      POSTGRES_DB: dockerized
      POSTGRES_USER: postgres
      POSTGRES_PASSWORD: postgres
      PG_SYSTEM_MAX_CONNECTIONS: 500
    ports:
      - '5432:5432'
    volumes: 
      - database:/var/lib/postgresql/data
  
volumes:
  database:
```

Ahora sí, con el comando stats, que nos sirve para inspeccionar en tiempo real la información de los contenedores que están en ejecución, vamos a comprobar que todo este funcionando como lo especificamos:

```bash
docker stats
```


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jke1ju8pkyaii4fvof3j.png)
Using colon to specify that a method is a keyword argument
Tags: ruby
Published: 2023-01-07 21:30:21

The colon (:) is used to specify that a method or function parameter is a keyword argument. Keyword arguments allow you to pass arguments to a method or function using the argument name, rather than just the position of the argument.

For example, consider the following method definition:
def greet(name:, age:)
  puts "Hello, #{name}. You are #{age} years old."
end

This method has two keyword arguments: name and age. When you call this method, you can use the argument names to specify the values for each argument:
greet(name: "John", age: 30) -> Output: "Hello, John. You are 30 years old."

If you omit the colons when defining the method, Ruby will treat the arguments as regular, non-keyword arguments. This means that you will need to pass the arguments in the correct order, based on their position. For example:
def greet(name, age)
  puts "Hello, #{name}. You are #{age} years old."
end

greet("John", 30) -> Output: "Hello, John. You are 30 years old."

In this case, you can see that the name and age arguments are treated as regular, non-keyword arguments. You have to pass the arguments in the correct order (name first, age second) when calling the method.

Using keyword arguments can make your code easier to read and maintain, because it is clear which argument goes with which parameter. However, they are not always necessary, and you can choose to use regular, non-keyword arguments if you prefer.