teleren/devto huggingface dataset:
Upgrading to Gitlab 15.0 CE from Gitlab 14.9.3
Tags: gitlab, ubuntu, debian, linux
Published: 2022-05-24 22:13:04

---
title: Upgrading to Gitlab 15.0 CE from Gitlab 14.9.3
published: true
description: A few tips on upgrading major versions of Gitlab 
tags: gitlab, ubuntu, debian, linux
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/u999bba9dfz2n9hczh6p.jpg
---

Everytime I need to upgrade to the next big Gitlab CE release, I end up jumping through hoops, looking for specific steps or going through `.bash_history` to see what I've done in the past. This is a small self-note on what to do next time. 

So running

```shell 
sudo apt update -y; sudo apt upgrade -y; sudo apt autoremove -y;
```

lead me to a cryptic message

```shell
Preparing to unpack .../gitlab-ce_15.0.0-ce.0_amd64.deb ...
gitlab preinstall: It seems you are upgrading from major version 14 to major version 15.
gitlab preinstall: It is required to upgrade to the latest 14.10.x version first before proceeding.
gitlab preinstall: Please follow the upgrade documentation at https://docs.gitlab.com/ee/update/index.html#upgrade-paths
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_15.0.0-ce.0_amd64.deb (--unpack):
```

However I'm running `14.9.3` which is pretty recent, considering that I update my machines every few weeks.  The confusing part here is that there is no simple instructions in the error message or on the [support website](https://docs.gitlab.com/ee/update/index.html#upgrade-paths) as to what to do next. The more confounding thing is, that support website doesn't even mention version 14.10 as an option. 

_Support link outlines the upgrade path and which versions to use for an upgrade path, **but not how to do it**._

> ### Warning ⚠️
> The following command was executed on a system that was **FULLY** backed up using both [GitLab backup process](https://docs.gitlab.com/omnibus/settings/backups.html#backup) and a VM snapshot.
> Do this at your own risk 😳

Well turns out it's actually very simple on ubuntu/debian using apt for my GitLab:

```shell
# First I removed old backups that were taking up a lot of space
# from /var/opt/gitlab/backups/
sudo apt upgrade -y gitlab-ce=14.10.0-ce.0
``` 

This process may take a bit of time depending on how fast your VM is & how big your Gitlab install is. Took about 15 mins for me. 

> If you need to upgrade from an earlier version of GitLab - the same steps apply. You just need to follow the upgrade path outlined on the [support website](https://docs.gitlab.com/ee/update/index.html#upgrade-paths). **And NO you CANNOT skip steps, the result will be unpredictable.** 

Now we are all ready to install the latest GitLab CE, which can be done using a general command like so, if you like to risk it all 

```shell
sudo apt update -y; sudo apt upgrade -y; sudo apt autoremove -y;
```

or simply

```shell
sudo apt upgrade -y gitlab-ce
```

**P.S.:** Don't forget to reboot. 

**P.P.S.:** Reminder to Future Me - don't freak out if you see a 500 error response. GitLab takes 3-5 mins to fully come up after a full reboot.
React (Native?) project
Tags: react, reactnative, javascript, discuss
Published: 2022-05-24 22:12:19

## React Native for web?
At the moment we are migrating our Symfony only project to React frontend and symfony backend and plan to extend our platform with a React Native app for Android and IOS.

All is progressing as we would like, no issues so far and we're actually on track... However; this evening I started thinking why only reuse certain components (partially) if we can maybe reuse over 95% of the code or maybe 100%!?

### Outdated or no clear examples
So I went online and did a little research to see if it would benefit us to make the web app also in React Native... Sadly enough there's no clear answer and quite a bit of information is outdated..
At this point I want to hear some opinions or even better, real examples of why you should or shouldn't do this?

I saw some options using [expo](https://docs.expo.dev/workflow/web/) or [React Native Web](https://necolas.github.io/react-native-web/) etc..  
**But I want to hear your opinions and experiences!**

---

## Resources

Header image: [Hackr - React vs React Native](https://hackr.io/blog/react-vs-react-native)
Web Designer vs Web Developer
Tags: webdev, programming, css, html
Published: 2022-05-24 22:06:18

Many times the roles of a Web Designer and a Web Developer are often confused when this is focused on Frontend Development. Although these roles are very similar for organizations, each one has its particularities.

A Web Designer only designs in the strictest sense of the word. He doesn’t need any other tools besides HTML, CSS, SASS/LESS and CSS Frameworks and of course an intuitive sense of creativity as well.

The Web Designer works with the image of a website, its spaces, the shape of the elements that make up a website according to the concept that you want to manage for the client. All this is what makes up the Digital Identity of a website.

However, the Web Designer does not need to know programming languages such as Javascript or PHP, or generate functions or solve problems. In a strict sense he manages the image of a website through design. That’s all.


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

On the other hand, it is important to define very well the role of a web developer when he focuses on frontend development.

Once you have the design. The Frontend developer can build this website following the template of the web designer.

The Web Developer can use tools in common with the Web Designer such as HTML, CSS, SASS/LESS, and CSS Frameworks, among which are:
Bootstrap, Pure and Bulma.

However, the Frontend Developer differs from the web designer in building or generating functions, requiring the use of programming languages such as Javascript or PHP for the use of animations, banners and modals that require a dynamic and not static website.

Many times the Front End Developer must solve problems and conflicts and generate solutions depending on the interests and needs of the services required by the client.
Web Developer

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ic3lr50wk4j4ncbvx0ik.jpg)
Qué es React?
Tags: react, beginners, programming, javascript
Published: 2022-05-24 21:51:02

Desde su lanzamiento, su uso ha ido incrementando notablemente, convirtiéndose, a día de hoy, en una de las tecnologías front-end más utilizadas.
Podríamos definirlo como una librería de JavaScript para desarrollar interfaces de usuario.

El elemento más importante de React es el componente, que es, en esencia, una pieza de la interfaz de usuario. Como norma general, al diseñar una aplicación con React, lo que estamos haciendo es crear componentes independientes y reusables para, poco a poco, crear interfaces de usuario más complejas.

La web tradicionalmente se ha construido en HTML, JavaScript y CSS, separados en distintas carpetas. Eso hace que sea complicado escalar y extraer ciertas partes del código (especialmente JS y CSS) para migrar o reutilizar funcionalidades debido a las dependencias entre estos lenguajes.

React está basado en un paradigma llamado programación orientada a componentes en el que cada componente es una pieza con la que el usuario puede interactuar. Estas piezas se crean usando una sintaxis llamada JSX permitiendo escribir HTML (y opcionalmente CSS) dentro de objetos JavaScript.
Estos componentes son reutilizables y se combinan para crear componentes mayores hasta configurar una web completa.
Esta es la forma de tener HTML con toda la funcionalidad de JavaScript y el estilo gráfico de CSS centralizado y listo para ser abstraído y usado en cualquier otro proyecto.

En conclusion React es una librería JavaScript de código abierto enfocada a la visualización. Esta tecnología nos permite el desarrollo de interfaces de usuario de forma sencilla, esto es posible mediante componentes interactivos y reutilizables.
I gave an interview. Good fun!
Published: 2022-05-24 21:31:05

Back in March, I was interviewed for ["ArtemKuznetsovTV"](https://www.youtube.com/c/ArtemKuznetsovTV) channel. It's a Youtube channel about programming, immigration and all things in between, run by a FAANG software engineer from Russia.

We talked about my journey into tech and my experience in this industry so far. The interview was released yesterday, and felt like a blast from the past.

We shot the whole thing next to London Eye, it was a pretty unusual experience, with people walking past us, kids running around and posing for pictures, just a whole bunch of random stuff happening all around us. Definitely a step outside my comfort zone to record in such a busy location, but it turned out so nice! 

The interview itself is a bit on a the long side (see how British I am becoming in my understatements, but I do tend to speak too much, especially when I get anxious). Luckily, there are timestamps to help you navigate the recording. Let me know what you think.

P.S. If you'd like to invite me on your podcast or channel after watching this, I'm all for it. DM me on [Twitter](https://twitter.com/beetlehope) or [Linkedin](https://www.linkedin.com/in/beetlehope/) if you want to collaborate and record something fun on the topics of tech, immigration, foreign languages, books or career.


{% embed https://youtu.be/Ng6fPnWsYIQ %}
What I've learned about React so far..
Tags: javascript, webdev, beginners, react
Published: 2022-05-24 21:06:21

This is my first article about development, none the less, I want to share with you guys my experience learning about React so far and some tipocs that call my attention.

First of all. it was my first Javascript framework to learn and it was a little dificult on the begining since i couldn;t understand the component concepts and some usage 3 years ago, specifically it was hard for me to understand the class component concepts. 

After that. I started to study about React Hooks and it's easy to understand it. use it and imagine how this pieces of code could help us out to build amaizing pieces of software!

Some of the common React Hooks that i've learned so far:
useState: (Used to handle states as the name says)
UseEffect: (This is a good option to handle side effects into 
   our components, in other words, if something changes, this 
   hook can help us out to perform some tasks depending on 
   what changes.

useContext: This is so usefull to share information between components without following the component path (AKA Prop Drilling)


From my experience.. It could be challenging at the begining but my advice on this could be this. Don't give up... if you got frustrated... take a breath and get back to it later... this can be challenging but one you can understand it... it becomes easy.

Thank you for reading my article... this is my very first try to communicate something to the world.
Step by step
Tags: webdev, beginners, programming, productivity
Published: 2022-05-24 20:41:44

All journeys begin with putting the first step forward, or in our case, the first line of code online. This is the learning process of the web, to understand how each step affects the next ten later steps. It is all connected, by code obviously. 

Html is the basic structure of all websites from whence all future steps are determined and defined. Programming is about defined syntax for the best outcome. Css is then utilized to make any website into a mona lisa of binaries. It styles any site to the preference of the builder. The step of beautification is then its purview. Javascript then hold all the code in place to execute certain dictates written in code. This provides all end users with the ability to interact with any website. 

This is the beauty of code, it is all connected. One step can explain the final step, this then necessitates keenness in writing code. All lines of code should build up seamlessly from the previous line of code. This is by essence, step by step building.
Do you think Composable?
Tags: composable, beginners, k8s, opensource
Published: 2022-05-24 20:13:54

What is the first thing you imagine when you hear “composable”?  

I think it is something that can be easily modified, built, configured, and integrated. What are your thoughts on this? (Let me know in the comments below!)

Enterprises aiming to be more adaptive to their customer needs while staying resilient wish to be composable!

The question is, are you someone who believes in the simplification of design modules  and leveraging modules from other resources? That to quickly adapt you should be able to seamlessly swap those same modules in and out? Are you someone who is open to innovation and exploring new capabilities? Do you believe in cost reduction (for instance, with reusable modules)?

If you answered “yes” to any of the above, then building applications in a composable way is the solution for you! 

But how do you begin “thinking composable”?

It isn’t hard! You can start by focusing on which parts of your enterprise change quickly and frequently, such as customer/marketing segments or products, as they are most likely to benefit from composability. 

This is not going to happen overnight. It takes time to understand and adapt to composability, but gradually it becomes useful

First we need to understand the advantages of composability and how to “think composable” in a constructive way. But then how and where can we experiment with our composable thoughts?

I’ve got an answer for that, too! Entando has built an Application Composition Platform (ACP) that you and your organization can use to experiment with the idea of composability. You can start building composable applications with the Entando ACP. 

Entando’s mission is to standardize and orchestrate the composable approach and the composition process. It is the leading open-source Application Composition Platform for building cloud-native, composable applications on top of Kubernetes.

To give you a little more insight, the ACP is a set of technologies that enables teams to build, deploy, run and manage applications developed by composing and integrating components and business capabilities. 

If this interests you, here is a series of [blogs](https://dev.to/entando/part-1-what-is-entando-platform-cbb) and video tutorials to help you get started.

We at Entando are also working to build a community to create awareness about composable applications. If you’d like to learn along with us and contribute to our community, then Modular Squad is the perfect place for you! This is our [Discord Link](https://discord.gg/N64a3QMd9X). Come join us, and let’s build a composable future!
TenancyForLaravel FileSystem Bootstrapper asset Gotcha
Tags: laravel, todayisearched, vite
Published: 2022-05-24 20:09:14

> TLDR; If you are using the `FileSystemBootstrapper` on the `archtechx/tenancy` package and also the [Laravel-Vite](https://laravel-vite.dev) package, update your tenancy config (`tenancy.filesystem.asset_helper_tenancy`) to `false`. Otherwise your generated script/style tags after building assets will be returning a tenant-scoped asset URL.

Here is the context of the problem I was facing:

I am building a multi-tenant SaaS application using this tenancy package from [Tenacy for Laravel](https://tenancyforlaravel.com/). It has a concept of tenancy bootstrappers that modifies relevant framework defaults to make the application tenant aware. The [FileSystem Bootstrapper](https://tenancyforlaravel.com/docs/v3/tenancy-bootstrappers/) makes the Laravel `asset()` helper method return tenant specific assets through a `TenantAssetController`.
I also replaced Laravel Mix with [Vite](https://vitejs.dev/) and I'm using this [Laravel Vite](https://laravel-vite.dev/) package to make the integration easier. The package provides `@vite` directive to output all the necessary asset tags in your blade file. The underlying methods use the `asset()` helper method from the framework. Therefore, any generated asset URL is tenant-scope if I am under a tenant aware route. I am using VueJS for templating so my page ends up not being rendered correctly.

The solution is to update a tenancy config (`tenancy.filesystem.asset_tenancy_helper`) to `false`. The `asset()` helper revert to default. The tenancy package still provides `tenant_asset()` helper method for tenant specific assets.

I hope this helps someone out there facing the same issue and save you time.
The Open Source Effect: 7 key ideas
Tags: opensource, github, githubcopilot
Published: 2022-05-24 20:02:56

https://twitter.com/NikitaKoselev/status/1529189239690240000

Well, I'm following @bmuskalla 's advice, so I keep spreading the OSS goodness in my networks :)

Check my tweet to find 7 key ideas from his amazing talk + my thoughts & experience about these ideas.

There is even a surprise in the end.
There is also a challenge for those who dare to reach the last tweet in the chain :D

@brjavaman, take a look :)
Getting http status in curl
Tags: bash, curl
Published: 2022-05-24 19:43:58

---
title: Getting http status in curl
published: true
description: 
tags: #bash #curl
//cover_image: https://direct_url_to_image.jpg
---

How to get the http status code of curl in a script?

```bash

my_curl() {
  Red='\033[0;31m'
  Green='\033[0;32m'
  Color_Off='\033[0m'

  TEMP_FILE=$( mktemp )
  trap "rm -f $TEMP_FILE" EXIT
  curl -w "\n%{http_code}" -s "$@" > ${TEMP_FILE}
  body=$(cat ${TEMP_FILE} | sed '$d')
  status=$(cat ${TEMP_FILE} | sed -n '$p')

  if [[ $status = 2* ]]; then
    Color=$Green
  else
    Color=$Red
  fi

  echo -e "${Color}Status: $status${Color_Off}"
  echo $body
}

my_curl -X GET http://jservice.io/api/random
```
How to work with background images in Tailwind CSS
Tags: tailwincss, css, html
Published: 2022-05-24 19:43:00

*This post was originally posted on [Design2Tailwind](https://design2tailwind.com/blog/tailwindcss-background-image/).*

---

There are multiple ways to work with background images using Tailwind but I’ll show you the 3 most common (and recommended) ways to do it on your project.

## Via the tailwind config:

Let’s start the old-fashioned way, by adding it to the tailwind config. This is great if you want to reuse the image in multiple places in your project.

I recommend you add it in the **`extend`** object of your config, like this:

```javascript
  extend: {
      backgroundImage: {
        'hero': "url('../public/images/hero.jpg')",
      },
  }
```

Then in your HTML you use it like this:

```javascript
<div class="bg-hero"></div>
```

## Via the `style` attribute:

If you prefer to skip the config then you can just add it using the **`style`** attribute, like this:

```javascript
<div style="background-image: url('../public/images/hero.jpg');"></div>
```

This is good if you plan to add more inline styles to your element or even perform some conditional logic with the image.

## Via using an arbitrary value:

Now in V3, you can do this fancy syntax too. If you prefer not to use inline styles and have a single-use image then this is the best approach.

```javascript
<div class="bg-[url('../public/images/hero.jpg')]"></div>
```

## But you’ll also need these properties

Following our example of a hero background image, once you have your image showing on your page then you’ll also want to:
- Make it not repeatable by using **`bg-no-repeat`**
- Have it use all the available space by adding **`bg-cover`**
- Positioning it in the center by using **`bg-center`**
- Possibly make it parallax with **`bg-fixed`**

Here’s the finished markup for you:

```javascript
<div class="bg-hero bg-no-repeat bg-cover bg-center bg-fixed"></div>
```
Here’s also a [Tailwind Play](https://play.tailwindcss.com/oT80ySVJ6f) example you can play around with.

## Disable/change the image in specific breakpoints

This is a pro tip for you, for example let’s say that you want to disable the background image in tablets and use a different image for desktop, this is where the arbitrary value approach really shines:

```javascript
<div
	class="
		bg-no-repeat bg-cover bg-center
		bg-[url('../public/images/hero-mobile.jpg')]
		md:bg-none
		xl:bg-[url('../public/images/hero-desktop.jpg')]
"></div>
```

---

That’s it for this one! I hope you learned the multiple ways to use background images with Tailwind CSS and how to use them on your project.
Padrão Web
Published: 2022-05-24 19:34:08

Você sabia que as cores de um site são extremamente importantes para o acesso dos usuários? A W3C, companhia de padrões da Web estabeleceu um novo sistemas de cores recomendado para seu site, você pode acessar em: [W3C PADRÃO DE CORES](https://www.w3.org/TR/UNDERSTANDING-WCAG20/visual-audio-contrast-contrast.html)
To learn or not to learn
Tags: beginners, programming, codenewbie, productivity
Published: 2022-05-24 19:27:11

Most of the senior developers and engineers have made tons of videos on what they would have done differently when they started their journey into the world of programming.  Some of them particularly talk about learning the basic concepts of programming. 
Beginners most of the time start their journey by picking a certain programming language and then learn the syntax. Some even jump to learning frameworks like React, Django, Laravel without learning the programming language itself. In my opinion, thats a big mistake. 
Before learning any programming language,  make sure you understand basic concepts like

- variables 
- constant
- sequence structure
- control structure
- functions
- classes and objects 
- primitive data type and user defined data type
- array
to mention a few.

I have been a TA for almost 4 semesters and I have had the chance to introduce freshers to principles of programming. It just basics concepts like what I mentioned above and it is also theoretical. The course introduces students to programming concepts and prepare them for subsequent courses where they will learn specific languages like C++, PHP, Java, Visual Studio and Mobile app development with Flutter. 

I always advise newbies to learn the concepts first. This will prepare you to choose any language of your choice and do a lot with it even on their own. It helps you to switch from one language to another with relative ease.
Do not jump into learning any programming language without learning the basic concepts and do not learn any framework without learning the language behind it.
See you on the next one 👋.
I know there are lot of experienced developers and engineers here who can also share their experience when they first started and what really helped them.