teleren/devto huggingface dataset:
Speed up your Slow Website Due to Google AdSense Ads
Published: 2023-04-08 23:59:54

This code only works on blogging templates, and I haven't tried it on the WordPress platform. It is possible at another time to put code for the WordPress platform.

So you have to follow the steps to put the code in your form correctly.

For this to work, you'll have to delete the JavaScript code from all of your ad units, but you can try it out on a single page to see if it works for you.


- Above the </body> tag, we put the following code as it is after copying it.
- Don't forget to change the ID <XXXXXXXXXX> with your AdSense ID

```
window.addEventListener("scroll" , LoadAdsence)
  function LoadAdsence(){
  if(window.pageYOffset > 5){
    let ScriptCret = document.createElement("script")
    ScriptCret.setAttribute('async' , 'async')
    ScriptCret.setAttribute('crossorigin' , 'anonymous')
    ScriptCret.setAttribute('src' , 'https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXX')
    Selector('body').append(ScriptCret)
  }
  if (window.scrollY > 5) {
    window.removeEventListener("scroll", LoadAdsence);
  }
  }
```

- Now save the template.
- Add AdSense ad units to your site without adding the following script.

```
<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-XXXXXXXXXXXXX" crossorigin="anonymous"></script>
```

Full Article [Tech Notice](https://www.tech-notice.com/2022/06/the-best-solution-to-speed-up-your-slow-site.html)
🍓Building a Lego Raspberry Pi case for robotics 🦾
Tags: lego, raspberrypi
Published: 2023-04-08 22:28:52

This post is my notes for attaching a raspberry pi to Lego to run power functions / powered up motors and hopefully start by build a train!

- Ive got the track - purchased ✅
- Train motor - purchased ✅
- A pi 3 B+ - lying around should I swap for a 0 W2?
- A power supply ❌
- A builder hat or BrickPi if still available and compatible ❌
- A method of attaching a pi to base plate without glue or modifications to either or.


## Thinking outside of the brick
 I raided my sons Lego today to try and find some suitable standoffs. You may have wondered  about bars, all bar like elements have a diameter of 3.18mm (Lego has crazy tolerances and intentions beyond accident) that means that all hands, clips, bricks with holes, jumpers you name it they all fit around that size. Not only do I find that fascinating I thought maybe the pi’s standoff holes may fit a bar… sadly I was mistaken they are a hair to large.

As far as I know there aren’t many things smaller in lego as I mentioned, after many desperate attempts (including bananas) to find some Lego, I searched deep in my brain, and thought > What about minifigures? I took off the hands and used the reverse end and it fits! It fits so well I built a hole scaffolding around it.


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

As you can see the severed hands of minifigure stumps wearing the pi like a bracelet 😬, the “bone” of the wrists serve as compression fittings and the bar underneath is now supporting the pi with full adjustment in all directions! it’s good to know that the plate size (ice blue) is perfect but the pi needs to be on 2x2 jumpers to offset its position, this isn’t stressing any parts which is crazy!

I’m going to change the design a little, adding cross bars underneath and 1x1 clips mounted straight onto the base, I will continue to use those pieces with the skinny tiles wall as they allow the pi to fit.

I’m also thinking about making this even smaller if the pi zero w 2 can drive the motors and run code fast enough!

Many thanks 🙏 
I’m an AFOL now it seems
Modules in Prestashop, Easy and Fast!
Tags: pretashop, php, modules, tutorial
Published: 2023-04-08 22:27:24

---
title: Modules in Prestashop, Easy and Fast!
published: true
description: ALl you need to know for create a module for PS. 
tags: #pretashop, #php, #modules, #tutorial

# cover_image: https://ibb.co/8g3vZYQ
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-26 20:49 +0000
---

## Prestashop Module 

PrestaShop (PS) is a free and open source content management system... Go to the more important, Present you a small ***command line interface*** to create a new module for PS in a sample command  

1. [Install my development environment](https://dev.to/rhonalchirinos/install-my-development-environment-in-prestashop-4nb6)
2. Create a module for PS
3. Understand how to work hooks in PS
4. How to create release of my module
5. I don't know that put here.

I have been working with PS not because i want to if not why do I need...

Good luck
"Secret Weapons: 10 VS Code Extensions You Didn't Know You Needed"
Tags: vscode, javascript, webdev, beginners
Published: 2023-04-08 22:09:31

When working in visual studio code there are certain extensions that can make life easier and can make you complete a task in a short period of time. Welcome to 10 visual studio code extensions that simply make your life way easier.

**1. Live Server**
This is by far one of the most important extensions especially when you are just getting started with web development. It simply allows making it possible when you save your HTML file it automatically refreshes in the browser.

**2.Debugger for Chrome**

This one is also very useful because allows you to debug JavaScript in the Chrome browser.

**3.Prettier**

This one has saved a lot of time. It formats and arranges your code properly so you do not have to do it manually with spaces and tabs.

**4.Path IntelliSense**

We all know that remembering file names can all be challenging well not anymore, this extension autocompletes file names for you as you type, saving you time and effort.

**5.Auto Rename Tag**

There are sometimes when you mistakenly a wrong HTML tag and you want to change it, you will have to rename both tags but with this extension, you rename the opening tag and it automatically renames the closing one. It feels so nice!

**6 Console Ninja**
 
It allows see console.logs in visual studio code, you will definitely find the one useful if you are a javascript developer!

**7. GitLens:**
 This extension makes you more efficient when working git and it is literally called git supercharged.

**8.React/svelte/vue/angular**
You are going to need to download an extension for the framework you use, whether that being React, svelte, etc because it will massively make your life easier!

**9.IntelliSense for CSS class names**
This extension provides autocomplete suggestions for class names in your CSS, saving you time and effort.

**10.npm**
This extension Integrates with the npm package manager, allowing you to install and manage packages directly from Visual Studio Code.

Bouns
AWS sam #2: sam local + logs
Tags: aws, sam, dynamodb
Published: 2023-10-20 08:14:07

---
title: AWS sam #2: sam local + logs
published: true
date: 2023-04-08 22:01:51 UTC
tags: aws,sam,dynamodb
canonical_url: https://olcortesb.hashnode.dev/aws-sam-local-start-api-logs
series: AWS lambda con sam
---

En una entrada anterior, [Link](https://dev.to/aws-espanol/aws-sam-1-sam-local-dynamodb-ddk), comentaba como configurar una serie de _lambdas_ + _api Gateway_ que necesita acceso a una _Dynamo DB_ todo local(en nuestra pc). Es un escenario común en _serverless_ probar localmente nuestras funciones antes del deploy o durante el proceso de desarrollo mientras sea posible.

En esta ocasión agregaremos la posibilidad de agregar un registro de _logs_. Retomando el escenario anterior [Link](https://dev.to/aws-espanol/aws-sam-1-sam-local-dynamodb-ddk) , tenemos un conjunto de lambdas configuradas con _AWS sam_ y queremos ejecutarlas localmente teniendo acceso a los `logs` de la aplicación.

```bash
sam local start-api -p 3002 --log-file logfile.txt
```

Como vemos, agregamos un parámetro para que los _logs_ que ejecutemos dentro del código de nuestras lambas: `--log-file logfile.txt` en este parámetro simplemente definimos el nombre del archivo donde queremos que se vuelquen los de las lambdas.  
Si ejecutamos las llamadas a la _api_ que levanta `local start-api` en el puerto `3002` veremos en el archivo `logfile.txt` tendrá los _logs_ en el mismo formato que aparecerá en [CloudWatch](https://aws.amazon.com/es/cloudwatch/).

```bash
$ more logfile.txt
START RequestId: c7b9cad9-70cd-4e1e-b205-6c58ee9c3d18 Version: $LATEST
2023-04-08T21:32:58.959Z c7b9cad9-70cd-4e1e-b205-6c58ee9c3d18 INFO Hello World from logs!
END RequestId: c7b9cad9-70cd-4e1e-b205-6c58ee9c3d18
REPORT RequestId: c7b9cad9-70cd-4e1e-b205-6c58ee9c3d18 Init Duration: 1.54 ms Duration: 1348.28 ms Billed Duration: 1349 ms Memory Size: 128 MB Max Memory Used: 128 MB
```

En este punto podemos apreciar que posiblemente la ejecución local de las lambdas sin "deploy" previo, en los casos que sea posible, es una de las mejores funciones que ofrece _AWS sam_.

¡Gracias, hasta la próxima!

### Referencias

- [https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-start-api.html](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/sam-cli-command-reference-sam-local-start-api.html)

- [https://aws.amazon.com/es/serverless/sam/](https://aws.amazon.com/es/serverless/sam/)
Save Time and Improve Security with These Password Managers for Small Businesses
Tags: webdev
Published: 2023-04-08 21:25:54

The Different Types of Password Managers
There are a few different types of password managers, and each has its own set of features and benefits. Here's a look at the different types of password managers and how they can help small businesses:

1. Desktop Password Managers - Desktop password managers are installed on a single computer <a href="https://theaznews.com/business/password-manager-for-small-business">Password Manager for Small Business</a> and can be used to manage passwords for multiple accounts. They're typically more secure than web-based password managers because they're not connected to the internet, but they can be less convenient to use.

2. Web-Based Password Managers - Web-based password managers are similar to desktop password managers, but they're accessed through a web browser instead of being installed on a computer. They're often more convenient to use than desktop password managers, but they're also less secure because they're connected to the internet.

3. Mobile Password Managers - Mobile password managers are designed for use on smartphones and tablets. They usually have fewer features than desktop or web-based password managers, but they can be more convenient to use since people always have their mobile devices with them.

4. Enterprise Password Managers - Enterprise password managers are designed for businesses with multiple users. They typically include features like centralized management and security controls, making them more secure than other types of password managers. However, they can also be more complex to use and may require IT support.

Complete Information Here >>>> https://theaznews.com/business/password-manager-for-small-business/
Survivorship Bias in Data Engineering
Tags: beginners, datascience, ai
Published: 2023-04-08 21:23:06


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

Are you tired of seeing the context of data engineering stories and how they lead to success? Well, be ready to dig deeper into the world of **"Survivorship bias in data engineering"**. 
 
So the term "Survivorship bias" was initiated by the statistician "Abraham Wald" at Columbia University, who started the analysis of the research and development on World War II combat aircraft and specifically recommended places for reinforcement against enemy attacks.
 
First, let's see the major problem here: data getting generated every millisecond, customer touchpoints, and whatever happens worldwide. Every time, it leaves a digital footprint, as you might think right now. Oh yes, data engineering has helped to gain a massive amount of data from a technical perspective, called "data pipelines," leading to remarkable findings and business success. But haven't you heard about numerous failed small-scale and large-scale projects that never make it to the spotlight? They do not get talked about because, well, they are failures.
 
However, there will be more! As we focus on the term Survivorship bias here, the data ecosystem that exists and how we used to train machine learning models come into the limelight. Mostly, we focus only on the data that leads to successful models, neglecting the rest of the data to cut the mustard. So, the machine learning models will basically learn from a biased dataset.
 
Now, I know what you are thinking: "Is there a better way" or "What can we do other than the usual process". Well, first, stop thwarting the projects that are so-called "failed" and give a little attention to where they have gone wrong and try to learn from them. Again, it's better to perceive than to do what we usually do because divergent thinking can be more mindful and involves actively seeking out examples of failed projects.
 
Currently, we are living in the hype cycle of AI; it's essential to keep an eye on where we are heading, and in terms of solution bias, we can welcome the chaos and unpredictable data engineering. It's hard to depend on only the success stories, and you must be prepared to divert and cope when things go wrong. And hey, maybe we can even find some humor in the failures along the way.
 
Folks, I hope you got some sense of the not-so-glamorous side of data engineering. But do not discourage you. Always welcome failure; try to intercept it and learn from it. No one knows your failed project will lead to something amazing (or at least a good laugh).
Docker Commands
Tags: docker, dockercommands, dockerimages, microservices
Published: 2023-04-08 21:14:39

## docker --version

Used to check your docker version

```
docker --version
```

## docker pull

Which pulls the image from the repository to your local environment

```
docker pull redis # It will pull redis image
```

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


## docker ps

It gives running container details.

```
docker ps
```

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


## docker start

Restart a stopped container.

```
docker start 7aaaa6322b5f # write container id or name
#OR
docker start sad_hugle
```

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


#Note: CONTAINER ID and NAME is randomly generated. Check your CONTAINER ID and NAME by running the docker ps command.


## docker stop

Use to stop running container

```
docker stop CONTAINER_ID 
# OR
docker stop NAMES
```

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


## docker run

Which combines pull and start, pulls the image if it's not locally available and then starts it right away.

```
docker run node #It will pull and start the node container
```

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

## docker run -d

Run the container in detached mode. This means that the container will run in the background and the console output will not be shown in the current terminal session.

```
docker run -d redis
```

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


## docker ps -a

Which gives you all the containers no matter if they're running currently or not.

```
docker ps -a
```

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


## docker run -p6000:6794

Allows you to bind the port of your host to the container

`-p` => port

`6000` => The port of Host

`6794` => The port of the container


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

## docker images

Which gives you all the images that you have locally available.

```
docker images
```


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

## docker rm

Remove a Container

```
docker rm CONTAINER_ID

#OR

docker rm NAME
```


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

#Note: You can't remove running container directly first stop the container using `docker stop CONTAINER_ID`

## docker rmi

Remove images

```
docker rmi IMAGE_ID 

#OR

docker rmi IMAGE_NAME
```

```
docker rmi -f IMAGE_ID  # -f means forced fully remove image

#OR

docker rmi -f IMAGE_NAME
```

#Note: Delete all dependent containers to remove the image


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

Thanks for reading !!
Bạn đã biết hết những tác dụng tuyệt vời về trà chưa ?
Tags: detox, tea, healthydebate, food
Published: 2023-04-08 21:11:05

 Bạn có phải tín đồ thưởng trà không? Các loại trà detox giảm cân bằng những sản phẩm từ thiên nhiên đang được rất nhiều người áp dụng. Vậy bạn đã biết hết những lợi ích của trà mang lại chưa? Với xu hướng thị trường thực tế sản phẩm sạch ngày càng mở rộng thì sự xuất hiện của các thương hiệu mới ngày càng nhiều. Nhưng không phải thương hiệu nào cũng bán hàng uy tín và chất lượng. Điều này khiến người tiêu dùng ngày càng hoang mang, lo lắng. Vì vậy, có rất nhiều người muốn tự làm việc tại nhà để đảm bảo an toàn vệ sinh và an tâm trong quá trình sử dụng. Sau đây cùng RaVe Healthy Food điểm qua những công dụng tuyệt vời của trà mà có thể bạn chưa biết nhé!
https://raveheatlyfood.com/nhung-tac-dung-tuyet-voi-cua-tra/
Web:https://raveheatlyfood.com/
How to keep your strength as a software developer?
Published: 2023-04-08 20:15:46

Nowadays it is very difficult to maintain the strength as a software developer. Aside from keeping up with technological developments, even monitoring them has become difficult. Therefore, if software developers do not have certain features, they may become an “depreciated” developers in a very short time.I would like to briefly explain these features

1. **Invest in your knowledge. Invest in periodically**. Create period to focus on personal development. It is very difficult to work and develop your skills at the same time
2. **Try to swim in different lanes and learn.** This makes you a more valuable developer. Furthermore, you become resistant to changes in technology. The technology that you are an expert can easily become worthless tomorrow.
3. **Don’t risk yourself with being a technology fan**. Don’t invest all your capital (time and money) on a certain technology. Always hold alternative investment fields in other hand.
4. **Learn the new programming language with certain periods as time goes on**.It will be better choose to learn the language that has different paradigms than the paradigms you currently use. If you are using Java, C # then learning an imperative language such as C will improve your skills.
5. **Read technical books periodically**.Often, developers prefer to read blog posts and documentation rather than reading books.Remember that the language documentation aims to explain the general rules.A book written by another programmer in that language teaches you the problem-solving technique and prevents you from wasting time with unnecessary information about that language or technology.
6. **Have a group of developers that you can discuss**. Exploring other developers thoughts and learning their perspective can give you amazing ideas.
7. **Do not wait the some new technology become popular**. Just start to learn immediately. This move is risky but it can create a big opportunity in time
Passion and Tech
Tags: passion, learning
Published: 2023-04-08 20:49:16

# Embracing Passion in Tech: A Path to Success
*Passion is the driving force that fuels us to reach our goals and pursue our dreams.* When it comes to the field of technology, passion is even more important as it constantly evolves and requires continuous learning and development. In this article, we will explore how embracing passion can help us in achieving our goals in tech.

---

## Finding Your Passion
The first step in embracing passion in tech is to identify what it is that you are truly passionate about. This can be done by exploring different aspects of technology and finding the areas that you find the most interesting and engaging. For example, you may be interested in web development, mobile app development, or data analytics. Once you have identified your passion, you can then focus on developing the skills and knowledge needed to excel in that area.

## Studying with Passion
When we study with passion, we are able to absorb information more easily and effectively. This is because our brain is more receptive to information when we are engaged and interested in the subject matter. When we approach our studies with passion, we are able to make connections and see patterns that we may not have noticed otherwise. This allows us to have a deeper understanding of the subject matter and to develop our skills more quickly.

## Embracing the Learning Process
One of the most important aspects of embracing passion in tech is to embrace the learning process. Technology is constantly evolving, and we must be willing to learn and adapt as new technologies emerge. When we approach our learning with passion, we are more likely to embrace the challenges that come with learning new things. This means that we are more likely to persevere when faced with obstacles, and we are more likely to seek out new opportunities to learn and grow.

## Connecting Passion and Goals
When we connect our passion with our goals, we are more likely to achieve success in tech. This is because we are more motivated to work towards our goals when we are doing something that we love. When we are passionate about our work, we are more likely to put in the time and effort needed to achieve our goals. This means that we are more likely to achieve success in our careers and to make meaningful contributions to the field of technology.

### Conclusion
In conclusion, embracing passion in tech is essential to achieving success in this field. By finding our passion, studying with passion, embracing the learning process, and connecting our passion with our goals, we can achieve great things in the world of technology. So, if you are passionate about tech, embrace it, and use it to drive you towards your goals.

> [my learning journal](https://emkay.netlify.app)