teleren/devto huggingface dataset:
Como configurar o n8n localmente com docker compose
Tags: n8n, opensource, docker
Published: 2023-10-05 18:21:03

## Clonar repositório n8n e configuração

```
git clone https://github.com/n8n-io/n8n-docker-caddy.git

cd n8n-docker-caddy
docker volume create caddy_data
sudo docker volume create n8n_data
```

## Editar arquivos de configuração
nano .env

```
# Replace <directory-path> with the path where you created folders earlier
DATA_FOLDER=/home/weverton/Projetos/n8n-local2/n8n-docker-caddy

# The top level domain to serve from, this should be the same as the subdomain you created above
DOMAIN_NAME=localhost

# The subdomain to serve from
SUBDOMAIN=

# DOMAIN_NAME and SUBDOMAIN combined decide where n8n will be reachable from
# above example would result in: https://n8n.example.com

# Optional timezone to set which gets used by Cron-Node by default
# If not set New York time will be used
GENERIC_TIMEZONE=Europe/Berlin

# The email address to use for the SSL certificate creation
SSL_EMAIL=example@example.com

```
nano docker-compose.yml

```
version: "3.7"

services:
  caddy:
    image: caddy:latest
    restart: unless-stopped
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - caddy_data:/data
      - ${DATA_FOLDER}/caddy_config:/config
      - ${DATA_FOLDER}/caddy_config/Caddyfile:/etc/caddy/Caddyfile

  n8n:
    image: docker.n8n.io/n8nio/n8n
    restart: always
    ports:
      - 5678:5678
    environment:
      - N8N_HOST=${SUBDOMAIN}.${DOMAIN_NAME}
      - N8N_PORT=5678
      - N8N_PROTOCOL=http
      - NODE_ENV=production
      - WEBHOOK_URL=http://localhost/
      - GENERIC_TIMEZONE=${GENERIC_TIMEZONE}
    volumes:
      - n8n_data:/home/node/.n8n
      - ${DATA_FOLDER}/local_files:/files
      
volumes:
  caddy_data:
    external: true
  n8n_data:
    external: true
```

nano caddy_config/Caddyfile
```
localhost {
    reverse_proxy n8n:5678 {
      flush_interval -1
    }
}
```

## Configuração de pasta
```
export DATA_FOLDER=/root/n8n-docker-caddy
mkdir -p /root/n8n-docker-caddy/.n8n
chown -R 1000:1000 /root/n8n-docker-caddy/.n8n
```

## Iniciar o Docker
```
docker compose up -d
```

tutorial em vídeo: https://youtu.be/fEP2r_V4Ehc?si=P46mNH-Jia61Drw8
List of great resources for your next Software Engineer Interview Prep - Front End Focused
Tags: programming, webdev, interview, productivity
Published: 2023-10-05 18:12:00

Front-end development and technical interviews can be challenging, but they're also incredibly rewarding. In this post, I've compiled a set of resources to help you navigate these challenges effectively. Whether you're a newcomer to front-end development or preparing for technical interviews, these resources will provide you with the knowledge and tools you need to succeed.

### Front-End Development Resources List

[Frontend Interview Handbook](https://www.frontendinterviewhandbook.com/): A comprehensive guide to frontend development interview preparation.

[Great Frontend](https://www.greatfrontend.com/): A collection of resources, articles, and tools for frontend developers.

### Algorithm and Data Structures

[LeetCode - 75 LeetCode Problems](https://leetcode.com/studyplan/leetcode-75/): A study plan on LeetCode that covers 75 essential coding problems.

### JavaScript Interview Preparation

[Google Tech Dev Guide - JavaScript](https://techdevguide.withgoogle.com/paths/interview/?programming_languages=javascript): Google's technical interview preparation guide with a focus on JavaScript.

### General Software Engineering Interviews

[Tech Interview Handbook](https://www.techinterviewhandbook.org/software-engineering-interview-guide/): A comprehensive handbook covering software engineering interview topics.

### React Technical Interview

[Prepare for React Technical Interviews](https://www.freecodecamp.org/news/prepare-for-react-technical-interviews/): A guide to help you prepare for technical interviews focused on React.

Feel free to explore these resources to enhance your front-end development and interview preparation skills. Remember these resources are your companions on the exciting journey of front-end development and technical interview mastery. As you navigate through the code and algorithms, always keep in mind that every challenge you face is an opportunity to grow. Stay curious, stay persistent, and let your passion for learning light your way to success. The tech world is yours to conquer!




Cover Photo by [ThisisEngineering RAEng](https://unsplash.com/@thisisengineering?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash) on [Unsplash](https://unsplash.com/photos/woman-in-blue-tank-top-standing-beside-white-wall-TXxiFuQLBKQ?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash)[^1].

[^1]: Attribution: This photo is provided by [ThisisEngineering RAEng](https://unsplash.com/@thisisengineering) on [Unsplash](https://unsplash.com/photos/woman-in-blue-tank-top-standing-beside-white-wall-TXxiFuQLBKQ). Used under the Unsplash License.
Higher order components in React
Published: 2023-10-09 18:38:44

---
title: Higher order components in React
published: true
date: 2023-10-05 18:09:30 UTC
tags: 
canonical_url: 
---

Any developer trying to attend a React interview will come across the question What are HOCs? from their interviewer, and this question will give the notion to the interviewer whether you are a good front-end engineer specializing in React. Following my previous article on Higher-order functions, we will look at Higher-order Component patterns in React with some examples.

Lets say you have some reusable logic that you want to use across all your components, there are several patterns to achieve that and one such pattern is the HOC pattern. Look at the following example,

```
function withCenterStyling(Element) {
    return (props) => {
        const styles = {
            display: "flex",
            alignItems: "center",
            justifyContent: "center"
        }
        return <Element {...props} styles={styles} />;
    }
}

```

Here, the `withCenterStyling` is a HOC, what it does is that it takes another React Functional component and returns a new overridden functional component.

💡

A functional component is nothing but a function that returns some HTML which is referred to as JSX.

So the `withCenterStyling` component can be reused for any component that requires a center alignment, which promotes code reusability. This is Higher order Components, Simple!

But that example is very basic, lets take another example.

```
// imagine there is a loading spinner component existing
import Loading from "./Loading.tsx";

function withLoader({ Element, url }) {
    return (props) => {
        const [data, setData] = useState(null);

        async function loadData() {
            const jsonData = await fetch(url);
            const response = await jsonData.json();
            setData(response);
        }

        useEffect(() => {
            loadData();
        }, [])

        if (!data) return <Loading />;

        return <Element {...props} data={data} />;
    }
}

```

Uff! That is a lot of code but lets break it down. As you know by now, a HOC will take in a react component and return another react component. So here, the `withLoader` will take in a component and a URL. So the idea here is that the data will be fetched from the provided URL and the fetched data will be passed to the component. During the fetching time, a small loading spinner should be displayed. This will be very useful because showing Loading progress while fetching data is such a common activity.

So here the higher-order component is doing the data fetching and conditionally shows the loading spinner if the data is not yet received! See, Its that simple.

So this is HOC in React. It will be really useful when the React Component Architecture is well maintained. HOCs can also be incrementally added to an existing codebase so If you want to impress your team lead or colleagues, explain this concept, take up the refactoring task, implement HOCs and break the UI in the production! All the best!!!!!
Increase Social Media Engagement
Tags: socialmedia, webdev, beginners, tutorial
Published: 2023-10-05 18:08:21

In the rapidly evolving digital landscape, a strong online presence is essential for individuals, businesses, and content creators alike. Social media has become a pivotal platform for connecting with audiences, and YouTube, as one of the world's largest video-sharing platforms, stands at the forefront of this revolution. At our company, we understand the significance of YouTube and the impact it can have on your brand, visibility, and engagement. That's why we offer a comprehensive suite of Social Media Marketing (SMM) services, with a special focus on increasing YouTube views, engagement, and watch time, all while ensuring that your metrics are as real as they come.

YouTube Views Increase:

YouTube views serve as a critical metric for the success of your video content. The more views you have, the higher your video ranks, making it more discoverable to a wider audience. Our team of experts employs proven strategies to organically boost your YouTube views. We do not rely on questionable methods that could harm your channel's reputation. Instead, we leverage our industry knowledge and experience to drive genuine views, ensuring that your content is seen by the right people.

Engagement Enhancement:

High engagement levels on your YouTube videos are indicative of viewer interest and interaction with your content. Likes, comments, and shares are the lifeblood of a successful YouTube channel. Our SMM services are designed to foster real engagement by connecting your content with the right audience. We facilitate meaningful interactions, encouraging viewers to like, comment, and share your videos, which, in turn, increases your video's visibility and credibility.

Watch Time Boost:

YouTube's algorithm rewards videos with longer watch times, as it signifies that viewers are finding the content valuable and engaging. Our watch time enhancement strategies focus on retaining viewers throughout your videos, ultimately increasing the total watch time on your channel. This not only improves your video rankings but also paves the way for monetization opportunities and long-term growth.

Real Metrics, Not Shortcuts:

We prioritize the authenticity of your YouTube metrics. Unlike some providers who resort to artificial methods that can jeopardize your channel's integrity, we strictly adhere to ethical practices. Our SMM services are designed to deliver real results from real viewers, ensuring that your engagement, views, and watch time are genuinely earned. We believe that building a sustainable online presence is rooted in trust, and our commitment to real metrics reflects that ethos.

[Website](https://theytlab.com/)
Grow Youtube Views And Engagement
Tags: smm, socialmedia, marketing, grow
Published: 2023-10-05 18:06:02

We offer SMM services, especially YouTube views and engagement.

_**

> Specialized SMM services tailored to enhance your YouTube presence.
> Expertise in increasing YouTube views to boost video visibility.
> Strategies to generate more likes, comments, and overall engagement.
> Drive targeted traffic to your YouTube channel for greater exposure.
> 
**_
[](https://theytlab.com/)













[](https://theytlab.com/)
Need your help to decide which post should I write about next
Tags: discuss, javascript, typescript
Published: 2023-10-05 17:54:09

Hi All,
I would like your help deciding what to write my next article about I have a few:
1. Styled components vs CSS modules. (or name  CSS modules the replacement of Styled components)
2. using git filter-branch to remove .env (names didn't decided yet).
3. how to upload to s3 using gitlab ci.
4. NestJs guide.
5. Is over-sh bun is still mature enough to use instead of nodejs
6. how to rebuild a graphql sent by the user.
7. microtask javascript (how promises works).
8. Dynamic import and how it improve performance 

If you have any other topic you think would be good idea I would like hear your opinion
A Love Letter to Python
Tags: python, programming, beginners
Published: 2023-10-05 17:52:45

I began my programming journey in undergrad during the spring semester of 2018. The first programming class I took in undergrad was titled _Intro to Python_. I was a first-year student, still 18 years old, and finally achieving a goal that I had set years prior. Although I have played around with other languages before—C#, Ruby, HTML/CSS—I was far too green to really understand what I was doing. Additionally, I had no instructor to guide me nor answer any questions that I had. So, during this spring semester, it was finally my time to shine.

Python was the first programming language that I have formally learned and built applications with. I found it to be one of the easiest languages to learn as a newbie since its syntax is comparably uncomplicated, it has an extensive set of libraries and is a great way to introduce students to programming with an interpretive language. Moreover, you can also learn the basics of Object-Oriented Programming before learning an OOP language like Java or C++. By the end of the spring semester, I was able to create simple data structures—lists, dictionaries, tuples— and learn why Python is so largely utilized. Web scraping, data analysis, and server architecture were just the beginning of the many concepts that Python conquers so eloquently.

After learning Python, I learned Java, C/C++, JavaScript and several other languages to date. I will admit, though, that it was a _huge_ learning curve switching from Python to Java due to how strictly OOP it is. While exploring the other aforementioned languages, I learned that Python wasn’t as perfect as I had originally assumed. Compared to Java, it’s not nearly as fast or powerful. From creating simple GUIs to large projects like MineCraft, Java has definitely taken the world by storm since its birth in 1995. Nevertheless, it still has its disadvantages when compared to Python and its dynamic nature.

As many of you may know, Python was born in 1991 (Which is insane for me to consider, along with Java because they’re both older than me!) and has grown exponentially since. In the last 32 years, its library sets have blossomed, open source Python resources are now ubiquitous, and developers continue to push the boundaries of Python as we currently know them.

I knew that I wanted to join the software development community since I was in the 8th grade. Although I didn’t have exposure to computer science theory prior to undergrad, I am very happy with the journey that I have traveled. Learning Python has allowed me to understand the basics of software development, create applications & websites, dip my toes into the world of Artificial Intelligence and so much more. Now, as an early career dev, I can utilize my years of work and practice to create anything I set my mind to. Which is _really_ awesome to be able to say! Python set the foundation for my software development career, and for that, I genuinely love it and am very grateful for it. I am thrilled to see where it’ll lead me next!
Using PostgreSQL With Laravel
Published: 2023-10-05 11:42:41



![Using PostgreSQL With Laravel](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gy62qkrmovnfxr7yz6ev.png)

In this article, I'll illustrate how to establish a connection between Laravel applications and a PostgreSQL database.

**What advantages does PostgreSQL offer over the MySQL Database Engine?**


MySQL is a relational database management system that lets you store data as tables with rows and columns. It’s a popular system that powers many web applications, dynamic websites, and embedded systems. PostgreSQL is an object-relational database management system that offers more features than MySQL. It gives you more flexibility in data types, scalability, concurrency, and data integrity.

**1. Installation**
Download PostgreSQL to your pc from

https://www.postgresql.org/download/

Then Install.

**2. php.ini**
MySQL is the default therefore there’s need to activate PostgreSQL for use with PHP on your pc by editing the php.ini

Search for these two lines within your php.ini and remove the “;” in front of each:

```
;extension=pdo_pgsql
;extension=pgsql
```
to (notice that “;” was removed)

```
extension=pdo_pgsql
extension=pgsql
```
**3. .env**
Change the following as appropriate within the Laravel’s .env file (all the defaults are ok except DB_DATABASE and DB_PASSWORD that you may have to change):

```
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=database_name
DB_USERNAME=postgres
DB_PASSWORD=your_choosen_password
```

**4. config/database.php**

Go to Config/database.php and change the following lines.

```
'default' => env('DB_CONNECTION', 'pgsql'),
```
**4. Migration** 

Create your migration files as usual and run the migration.
Algora – Open source coding bounties
Tags: opensource, programming, rust, typescript
Published: 2023-10-05 17:15:06

**Taken from our HN Launch** (https://news.ycombinator.com/item?id=37769595)	

Hey everyone! I'm Ioannis, together with Zaf we are building [Algora.io](https://console.algora.io/) to help OSS projects reward their contributors & grow their communities.
1 min demo: https://twitter.com/algoraio/status/1641560954746839042

The context: contributing to open source helps developers gain experience, grow their networks & land jobs while helping maintainers ship product updates and push their projects forward for the whole community

The problem: there's too much work to be done in open source and not enough people contributing. Introducing payments can make contributing more accessible & benefit both sides, however today paid open source is scarce, low trust & high friction

Our solution: we built an app that streamlines open source bounties on Github

To date, OSS projects on the plaftorm have awarded **$65,785 (600 bounties)** to **188 contributors** from **48 countries**

Right now, 43 OSS projects (mainly Typescript, Rust & Scala) have made **242 bounties ($46,899)** **available to solve**

To create bounties in your project, simply register, install our app in your repo(s) and use the /bounty command on issues

To solve bounties, submit a PR including the /claim command & connect with Stripe/Alipay to receive payouts

We also started a COSS founder podcast to share lessons & advice for building open source companies: https://youtube.com/@algora-io

We think it's now a great time to welcome new contributors & maintainers on the Algora platform - happy Hacktoberfest!

We are really excited to hear your feedback/questions and connect further: our emails are ioannis@algora.io & zafer@algora.io

Thank you!
Searching for home cooked food? Then, why fear when we are here.
Tags: food
Published: 2023-10-05 17:07:50

 For those looking for home-style meal delivery in Chennai, App GOOD FOOD is the best choice. We recognize how challenging it can be to move away from home to further your education or job. The best home-cooked food is offered by App Good Food, with monthly delivery being an alternative. For senior citizens who can't prepare, our home-cooked meal delivery service in Chennai is ideal. Whether you're a vegetarian or not, you can easily afford to consume nutritious, home-cooked food that you can tailor to your tastes with the aid of the App Good Food cuisine. You could possibly save time and money by using our online home food service in Chennai.
99 berufliches Vorwärtskommen: Die Überzeugung ausarbeiten.
Published: 2023-10-05 17:00:00

Moin Moin,

Sollten die letzten Beiträge bzgl. [der Restzeit→](https://dev.to/amustafa16421/94-berufliches-vorwartskommen-die-restzeit-146k) und [der Gewissheit→](https://dev.to/amustafa16421/97-berufliches-vorwartskommen-uberzeugung-und-gewissheit-4cfb) dich zum Grübeln gebracht haben, so möchte ich dir vergewissern, dass dies nicht ungewöhnlich ist. Es sind wichtige Angelegenheiten, die man sich gut überlegen sollte. Der Austausch soll uns allen – also auch dir – helfen, in diesen Punkten Klarheit zu erlangen.

In diesem Sinne…

Lass uns mittels Kommentaren austauschen.

Beste Grüße,
Mustafa

Oder auch mittels E-Mail: mustafa.kevin.dwenger@posteo.de
Betreff: Austausch
PHPStorm Tips #9 : Zoom ton code
Tags: phpstorm, productivity, php, webdev
Published: 2022-08-23 09:58:33

La tempête PHP [a introduit en 2022.2 une petite fonctionnalité pratique](https://blog.jetbrains.com/phpstorm/2022/08/phpstorm-2022-2-is-now-available/#Keyboard_shortcut_to_change_the_font_size_globally) quand on partage son écran via un call : **zoomer globalement sur le code et pouvoir reset à la valeur par défaut**.

![Video montrant le zoom sur le code](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fl5gwv7ga284olk3a4ib.gif)

🧐 Le zoom **persiste si on change de fichier**, pas comme avant.

Pour s'en servir, il va déjà falloir éditer les raccourcis, direction keymap dans les settings pour chercher ces 3 là :

![Screenshot des keymaps](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jqworjb8aw8oouxdvmtv.png)

- **Increase font size in all editors** (ex: `Ctrl`+`Shift`+`=`)
- **Decrease font size in all editors** (ex: `Ctrl`+`Shift`+`-`)
- **Reset font size** (ex: `Ctrl`+`Shift`+`0`)
James Barzini Swindon: Your Digital Marketing Ally
Published: 2023-10-05 16:48:26

Have you ever wondered about [James Barzini Swindon](https://jamesbarzinyswindon.com/)? It's not a mystery but rather a valuable partner for businesses in the digital world. Let's take a closer look at what James Barzini Swindon is all about.

## 1. What is James Barzini Swindon?

James Barzini Swindon is not a person; it's a company that resides in the United Kingdom (UK). They have a unique skill set in something called digital marketing. Think of them as digital marketing experts who help businesses succeed on the internet. They're like the guiding star that leads businesses through the digital universe.

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

## 2. The Beginning of the Journey

James Barzini Swindon embarked on its journey back in 2014. This means they've been helping businesses for quite a while now. Since their inception, they've been working diligently to assist businesses in growing and achieving success online.

## 3. Who's Leading the Way?

Every company has someone at the helm, and at James Barzini Swindon, it's none other than James Barzini Swindon himself. He's the leader, often referred to as the CEO (Chief Executive Officer). James is the visionary who founded the company and ensures that everything runs smoothly.

## 4. The Magic They Perform

James Barzini Swindon has a unique knack for a range of digital marketing services, including:

SEO Magic: They make sure a business's website appears prominently on Google when people search for things.
Social Media Sorcery: They help businesses make friends and become known on platforms like Facebook, Instagram, Twitter, and LinkedIn.
Ad Wizardry: Sometimes, they create ads that lead people to visit a business's website and potentially make a purchase.
Content Enchantment: They craft captivating content that keeps people engaged and informed online.
Web Wonders: They ensure a business's website looks fantastic and functions smoothly, so people enjoy using it.
Email Spells: They send emails that keep customers coming back for more magical experiences.

## 5. Why Choose James Barzini Swindon?

Businesses choose James Barzini Swindon because they have a unique expertise in making businesses shine online. They have years of experience and are dedicated to helping businesses succeed on the internet.

So, whether you're a small business or a large corporation, James Barzini Swindon is like your trusted guide, helping you navigate the digital world and making your business thrive in the online realm.