teleren/devto huggingface dataset:
Quick config for Eslint and Prettier
Published: 2023-11-08 16:51:21

It can be a bit annoying to configure eslint to work together with prettier, because of some unwanted conflicts and because we need 2 configuration files and 2 extensions: .eslint and .prettier. There is a simpler way to do this, avoiding having 2 different files and reducing the chance of conflicts. Let's go:

Choose the settings that best suit your style

```sh
yarn eslint --init
```
we'll use prettier as an eslint plugin.

```sh
yarn add eslint-plugin-prettier prettier -D
```
add **prettier** in array of plugins

```sh
"plugins": [
    "react",
    "prettier"
 ],
```
add the **prettier** configs into 'rules' following this format, You are free to choose the styles that suit you best.

```sh
"rules": {
      "prettier/prettier": [
        "error",
        {
          "printWidth": 80,
          "tabWidth": 2,
          "singleQuote": true,
          "trailingComma": "all",
          "arrowParens": "always",
          "semi": false
        }
      ]
  }

```

the eslint file should look like this:

```js
module.exports = {
    "env": {
        "browser": true,
        "es2021": true
    },
    "extends": [
        "standard-with-typescript",
        "plugin:react/recommended"
    ],
    "overrides": [
        {
            "env": {
                "node": true
            },
            "files": [
                ".eslintrc.{js,cjs}"
            ],
            "parserOptions": {
                "sourceType": "script"
            }
        }
    ],
    "parserOptions": {
        "ecmaVersion": "latest",
        "sourceType": "module"
    },
    "plugins": [
        "react",
        "prettier"
    ],
    "rules": {
      "prettier/prettier": [
        "error",
        {
          "printWidth": 80,
          "tabWidth": 2,
          "singleQuote": true,
          "trailingComma": "all",
          "arrowParens": "always",
          "semi": false
        }
      ]
    }
}


```


##Conclusion

From this simple configuration, you can specify more eslint rules to suit your project.

Twitter: https://twitter.com/Thzinhdev
Eslint config: https://gist.github.com/Thiago-Mota-Santos/60ec2ba0c88d2ef00b9d8b9e590b1cf7#file-gistfile1-txt

Thumb by <a href="https://unsplash.com/pt-br/@ryanquintal?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Ryan Quintal</a> at <a href="https://unsplash.com/pt-br/fotografias/fotografia-de-close-up-de-lote-de-brinquedo-cubo-azul-US9Tc9pKNBU?utm_content=creditCopyText&utm_medium=referral&utm_source=unsplash">Unsplash</a>
Automate Your Database Changes with a CI/CD Pipeline
Tags: digitalocean, github, kubernetes, terraform
Published: 2024-01-12 13:33:17

---
title: Automate Your Database Changes with a CI/CD Pipeline
published: true
date: 2023-11-08 16:48:19 UTC
tags: DigitalOcean,github,kubernetes,Terraform
canonical_url: https://blog.shellnetsecurity.com/2023/11/664/github/automate-your-database-changes-with-a-ci-cd-pipeline/
---

I first started talking about building a database CI/DI pipeline in my previous post, How to Build a CI/CD Pipeline for Your Database. That previous post was focused more on the infrastructure that would be managed by the DevOps team. Now I want to focus on efficient database management with CI/CD. In this post, I’m ... [Read more](https://blog.shellnetsecurity.com/2023/11/664/github/automate-your-database-changes-with-a-ci-cd-pipeline/ "Automate Your Database Changes with a CI/CD Pipeline")

The post [Automate Your Database Changes with a CI/CD Pipeline](https://blog.shellnetsecurity.com/2023/11/664/github/automate-your-database-changes-with-a-ci-cd-pipeline/) appeared first on [My Battles With Technology](https://blog.shellnetsecurity.com).
🚀 Nuxt CMS: Why to Use It - The Ultimate Guide 🚀
Published: 2023-11-08 16:45:39

Are you diving into web development with Nuxt.js and searching for the perfect CMS to streamline your workflow? Or perhaps you're new to the world of CMS and want to make an informed choice for seamless content management? Look no further! Welcome to the ultimate guide to Nuxt CMS, where we unravel why it's the ideal choice for your Nuxt.js projects.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g72ty7m0aytgicoxurpo.jpg)
Find out more about:

- Why Nuxt.js
- What the heck is Nuxt CMS, and why choose it?
- Empowering Nuxt.js with a headless CMS
- Nuxt CMS example: Contentful
- Nuxt CMS example: BCMS
- Nuxt CMS benefits
- Nuxt CMS use cases (or what to build)
- How to start Nuxt CMS with Nuxt.js and BCMS

🌐 Read the full guide: [Nuxt CMS: The Ultimate Guide](https://thebcms.com/blog/nuxt-cms-the-ultimate-guide)
Short ideas AI and music
Tags: ai, music
Published: 2023-11-08 16:44:13

The use of artificial intelligence (AI) in creating personalized music playlists can greatly enhance the overall ambiance and customer experience in various types of establishments. Here's how:

**Tailored Music Selection**: AI algorithms analyze customer preferences, demographic data, and emotions to create playlists that cater to the unique tastes of the audience. This ensures that the music resonates with customers, making them feel more comfortable and engaged.

**Mood Enhancement**: AI can dynamically adjust the music based on the mood of the establishment. For example, it can play lively music during busy hours in a café or restaurant to create an energetic atmosphere, while switching to softer, soothing tunes during quieter times to encourage relaxation.
Improved Customer Engagement: When customers hear songs they enjoy, it enhances their overall experience and encourages them to stay longer. This can lead to higher customer satisfaction and potentially increased sales.

**Brand Consistency**: AI-driven playlists can align with a brand's image and values, ensuring a consistent experience across multiple locations. For instance, a luxury hotel chain can maintain a sophisticated ambiance through AI-curated music.

**Cost Efficiency**: AI reduces the need for human DJs or manual playlist curation, making it a cost-effective solution for establishments aiming to offer customized music experiences.


**Data-Driven Insights**: AI can gather data on music preferences and customer behavior, providing valuable insights for businesses to refine their strategies and gain a better understanding of their clientele.
"Mastering WordPress Development: Tips and Tricks for Success"
Tags: webdev, programming, beginners, css
Published: 2023-11-08 16:40:58

Introduction:
Are you a WordPress developer looking to enhance your skills and take your projects to the next level? In this post, we'll explore some valuable tips and tricks that can help you become a more proficient and efficient WordPress developer. Whether you're a beginner or a seasoned pro, there's always room for improvement in the world of WordPress development.

1. Choose the Right Tools:
One of the first steps in becoming a successful WordPress developer is selecting the right set of tools. From code editors and version control systems to local development environments, making the right choices can significantly impact your workflow and productivity.

2. Master Custom Themes and Plugins:
WordPress development often involves creating custom themes and plugins. We'll delve into best practices for building these essential components and explore ways to optimize their performance for a seamless user experience.

3. Stay Updated with WordPress Core:
WordPress evolves, and it's crucial to stay up-to-date with the latest changes in the core. We'll discuss how to keep your projects compatible with the latest WordPress versions and leverage new features effectively.

4. Security Matters:
Security is a top priority when developing for WordPress. Learn how to secure your themes, plugins, and websites to protect against common vulnerabilities and keep your client's data safe.

5. Performance Optimization:
Nobody likes a slow website. We'll cover techniques for optimizing your WordPress sites, including image compression, caching, and code optimization, to ensure lightning-fast load times.

6. Debugging and Troubleshooting:
Discover effective methods for debugging and troubleshooting issues that may arise during development. From using the built-in debugging tools to employing third-party plugins, we'll help you diagnose and resolve problems swiftly.

Conclusion:
Becoming a successful WordPress developer is an ongoing journey. By following the tips and tricks outlined in this post, you can enhance your skills and deliver outstanding WordPress projects. Keep learning, experimenting, and staying updated with the latest developments in the WordPress ecosystem to stay at the forefront of your field.
[Freelancer Marketplace on Fiverr](https://go.fiverr.com/visit/?bta=874162&brand=fiverrcpa&landingPage=https%3A%2F%2Fwww.fiverr.com%2Fsearch%2Fgigs%3Fquery%3Dweb%2520developer%26source%3Dtop-bar%26ref_ctx_id%3D23ba170df2e7dcfb4f2b76d255d4760f%26search_in%3Deverywhere%26search-autocomplete-original-term%3Dweb%2520developer)
Why Are Major Technology Companies Opposing The EU’s Proposed Cyber Resilience Act?
Tags: cybersecurity, news, webdev, learning
Published: 2023-11-08 16:40:57

The European Union has proposed the [**Cyber Resilience Act**](https://www.techdogs.com/tech-news/td-newsdesk/why-are-major-technology-companies-opposing-the-eus-proposed-cyber-resilience-act), aimed at **enhancing the cybersecurity of smart devices connected to the internet**. Under the proposed law, companies will be required to assess these devices for cybersecurity risks and take appropriate measures to address identified issues within a span of five years or the expected product lifespan. Non-compliance could result in fines of up to 15 million euros or 2.5% of the company's global turnover.

The move comes in response to increasing ransomware incidents and cyberattacks that have exposed vulnerabilities in software, network equipment, and operating systems. The EU argues that compliance with these requirements could save companies up to 290 billion euros annually in cyber incident costs.

However, major industry players, including **Ericsson, Siemens, Schneider Electric, Nokia, Robert Bosch, ESET, and industry group DigitalEurope**, have expressed concerns. They fear that the proposed laws may disrupt supply chains, similar to pandemic-related disruptions. The rules would also apply to importers and distributors of connected devices. In a joint letter to EU officials, these companies warned of potential bottlenecks in European supply chains and suggested focusing on fixing known vulnerabilities before assessments and allowing more flexibility for self-assessment of cyber risks.

The EU is set to negotiate the terms of the proposed draft on **November 8**, which will determine its adoption into law. The concerns raised by industry giants highlight the ongoing debate over balancing cybersecurity requirements with potential economic impacts.
How it went Today?
Tags: coding, programming
Published: 2023-11-08 16:31:41

_**Today, November 8, 2023**_, I followed my usual routine, tackling the daily programming challenges on both Leetcode and GeeksForGeeks. Fortunately, both problems posed today were relatively straightforward, requiring little effort.

Despite it being a workday, I spent the usual hours at college from 9 AM to 5 PM. College, however, tends to be monotonous and often feels like a time sink. To make the most of my day, I decided to revisit some essential subjects that are crucial for future placements, and so I delved into the world of Operating Systems.

After my academic endeavors, I returned to my dormitory, refreshed myself, and took a short nap. As a personal challenge, I've set out to conquer the Blind 75 Leetcode questions, which are notorious for their difficulty. Today, I made significant progress by completing the Tree section of the Blind 75 Leetcode Sheet.

And that's a wrap for my day!

Sincerely,
Abhishek 😉
Create High Quality Images And Videos With GenmoAI
Tags: ai, images, videos
Published: 2023-11-08 16:27:13

[Genmo AI:](https://socialmarketing90.com/genmo-ai/) The Best AI Tool for Content Creation, Unleash Your Creativity

[Genmo AI](https://socialmarketing90.com/genmo-ai/) stands out as a true game changer in the ever-changing world of artificial intelligence. Today, we're excited to present you to Genmo AI, the best AI tool in the business, built to help creators like you create exceptional movies, photos, and 3D models.

> Genmo AI's Potential: Redefining Content Creation

Consider a tool that may effortlessly transform your creative visions into reality. Genmo AI is here to help make that happen. This AI-powered wonder is your key to unlocking unlimited creative possibilities, whether you're a professional or an aspiring artist.

> How Genmo AI Works

Visit the [Genmo AI website](https://socialmarketing90.com/genmo-ai/) and sign up for a free account. 
If you want to use the new features i.e Genmo Chat, you need to be on the waitlist.
Click on ‘Use our Classic Alpha experience.’
Hit ‘Get Started.’
On the next page, select ‘Create.’ In case you have images that need to be enhanced, click on ‘Upload.’
Now, in the caption section, enter the prompt to generate the images. For instance, we used ‘a dancing peacock.’ Click on ‘Generate Image‘ to get your image.

> Genmo AI Creation: Unleash Your Imagination

[Genmo AI](https://socialmarketing90.com/genmo-ai/) frees you from the constraints of traditional design and content development processes. It is more than a tool; it is a revolution. 

[Genmo AI](https://socialmarketing90.com/genmo-ai/) has your back whether you're a visual artist looking to create gorgeous photographs, a videographer looking for eye-catching videos, or a 3D model enthusiast pushing the boundaries of design.

> Say Goodbye to Restrictions on Content Creation

You're embracing the future of content creation with [Genmo AI](https://socialmarketing90.com/genmo-ai/). Say goodbye to creative constraints and hello to limitless possibilities. Thanks to [Genmo AI](https://socialmarketing90.com/genmo-ai/), you've entered a realm where your imagination knows no limitations.
Day 9 Adapters in Android and Questions
Published: 2023-11-08 16:21:12

Today I learnt about adapters in android which is used to  connect a data source and a view. Here is an example of how to implement a basic adapter. 

```
// adapterview
ListView listview = findViewById(R.id.listview);

//data source 
String[] arr = {"WOW","9","DAYS","OVER"};

//Array Adapter
ArrayAdapter<String> arr_adapter = new ArrayAdapter<>(
this, 
android.R.layout.simple_list_item_activated_1,
arr); 

//connect the view 
listview.setAdapter(arr_adapter);
```

I also solved some coding questions. 
I will make a GitHub repo for my 100 days of code tomorrow.
Wednesday Links - Edition 2023-11-08
Tags: java, jvm, docker, git
Published: 2023-11-08 16:18:08

JEP 461: Stream Gatherers (14 min)🏞️
https://openjdk.org/jeps/461

Who killed the JVM? Attaching a debugger twice (4 min)🔌
https://mostlynerdless.de/blog/2023/11/01/who-killed-the-jvm-attaching-a-debugger-twice/

How to find dead code in your Java services (8 min)☠️
https://foojay.io/today/how-to-find-dead-code-in-your-java-services/

Controlling JIT Compiler Overhead to Avoid CPU Autoscaling (14 min)🎩
https://foojay.io/today/controlling-jit-compiler-overhead-to-avoid-cpu-autoscaling/

Slim Docker Images for Java (7 min)🚢
https://piotrminkowski.com/2023/11/07/slim-docker-images-for-java/

SSL hot reload in Spring Boot 3.2.0 (4 min)♨️
https://spring.io/blog/2023/11/07/ssl-hot-reload-in-spring-boot-3-2-0

Anti-patterns in event modelling - Clickbait event (7 min)🪤
https://event-driven.io/en/clickbait_event/

Kotlin 1.9.20 Released (3 min)🎉
https://blog.jetbrains.com/kotlin/2023/11/kotlin-1-9-20-released/

Content negotiation in practice (13 min)🤝
https://softwaremill.com/content-negotiation-in-practice/

Confusing git terminology (15 min)😕
https://jvns.ca/blog/2023/11/01/confusing-git-terminology/
Flip Card Effect CSS
Tags: html, css, snippets
Published: 2023-11-08 16:09:07

---
title: Flip Card Effect CSS
published: true
description: A hand css effect for cards which rotate on hover
tags: #html #css #snippets
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-11-08 15:59 +0000
---


```html

<div class="maincontainer">
	<div class="thecard">
		<div class="thefront">front of card</div>
		<div class="theback">back of card</div>
	</div>
</div>
```

```css

.maincontainer {
	position: relative;
	width: 250px;
	height: 350px;
	/*background: green;*/
}
.thecard {
	position: absolute;
	width: 100%;
	height: 100%;
	transform-style: preserve-3d;
	transition: all 0.5s ease;
	/*background: yellow;*/
}
.thecard:hover{
	transform: rotateY(180deg);
}

.thefront {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility:hidden;
	background: #ffc728;
	color: #333;
	/* Styling up the card */
	text-align: center;
	font-family: sans-serif;
	border-radius: 20px;
	font-size: 1.2rem;
	font-weight: bold;
}
.theback {
	position: absolute;
	width: 100%;
	height: 100%;
	backface-visibility:hidden;
	background: #5fcf80;
	color: #fff;
	transform: rotateY(180deg);
	/* Styling up the card */
	text-align: center;
	font-family: sans-serif;
	border-radius: 20px;
	font-size: 1.2rem;
	font-weight: bold;
}
```
Quick Tip: Checking if a Number is in Range
Tags: miniscript, programming, beginners, tip
Published: 2023-11-08 15:58:02

This is the first in what I hope to be a frequent series of "quick tip" posts, in which I highlight some simple but useful trick that you may not know about [MiniScript](https://miniscript.org) or [Mini Micro](https://miniscript.org/MiniMicro).

Today, it's that boolean operators in MiniScript can be chained — and this turns out to be a really useful way to check if a number is within some valid range.

Suppose you're asking the user for a number from 1 to 100.  If they enter a number outside that range, you want to print an error and ask again.  The naive approach looks like this:

```
while true
	num = input("Enter a number from 1 to 100: ").val
	if num >= 1 and num <= 100 then break
	print "Out of range; try again."
end while
```

This works perfectly fine.  But it's not quite as clear or concise as this (pay attention to the `if` line):

```
while true
	num = input("Enter a number from 1 to 100: ").val
	if 1 <= num <= 100 then break
	print "Out of range; try again."
end while
```

You may have seen this sort of notation in school, something like _a < x < b_, which means "_x_ is between _a_ and _b_".  Our code above does the same thing: the `if` statement says "if _num_ is between 1 and 100 inclusive, then break out of the loop."  (It's inclusive because we used `<=` rather than just `<`.)

It's a simple pattern, but a surprisingly common one.  In the  [100 BASIC games ported to MiniScript](https://dev.to/joestrout/100-basic-computer-games-ported-to-miniscript-3oj3), we used this sort of pattern 136 times.  Here are some examples I found:

`if 0 < numPlayers < 5 then break`

`if 0 < num <= historicalBattles.len then break`

`if 1 <= shotType <= 4 then return`

`return 0 < x <= n and 0 < y <= n`

`if 1 <= x <= n and 1 <= y <= pile[x] then break`

`return 0 < xy[0] < 11 and 0 < xy[1] < 11 and self.shipAt(xy) == null`

Especially when you're checking two variables (often X and Y coordinates, or indexing into some 2D array), as in the last few examples above, this concise range check makes your code considerably simpler and easier to grok.

Of course it works with strings, too.  Use cases for this are a bit harder to come by, but you could certainly imagine a menu with options labeled A through M, and an input loop like:

```
while true
	choice = input("Enter selection (A-M): ").upper
	if "A" <= choice <= "M" then break
end while
```

So, this is a handy trick whenever you need to check whether a variable is between two limits (inclusive or otherwise).  Now that you know this exists, I bet you'll find uses for it surprisingly often.  Happy coding!
JavaScript Memoization: Boosting Performance with Caching
Tags: javascriptperformance, javascriptmemoization, codeoptimization, webdev
Published: 2023-11-08 15:46:56

JavaScript Memoization Enhancing Performance with Caching
In the world of programming, performance is a crucial factor that determines the responsiveness and efficiency of applications. JavaScript, a dynamic and versatile language, offers various techniques to optimize code and enhance performance. Among these techniques, memoization stands out as a powerful tool for improving the efficiency of recursive functions.

##What is Memoization?

Memoization is an optimization technique that involves storing the results of previously executed function calls in a cache. This cache, often referred to as a memo table, allows the function to retrieve cached results for subsequent calls with the same arguments, eliminating the need for redundant calculations.

##Benefits of Memoization

Memoization offers several notable benefits:

-Performance Enhancement: Memoization significantly improves the performance of recursive functions by avoiding repetitive calculations. This is particularly beneficial for functions that involve complex computations or are called frequently with the same arguments.

-Memory Optimization: By storing cached results, memoization reduces the memory overhead associated with repeated function calls.

-Code Simplification: Memoization can simplify code by eliminating redundant calculations, making it easier to understand and maintain.

##Pitfalls of Memoization

While memoization offers significant benefits, it is important to consider its potential drawbacks:

-Increased Memory Usage: The memo table can consume additional memory, especially for functions with a large number of unique arguments.

-Maintenance Overhead: Maintaining the memo table can introduce additional complexity and maintenance overhead.

-Limited Applicability: Memoization is most effective for recursive functions that perform expensive calculations and are called repeatedly with the same arguments.

##Sample Implementation

Let's consider a classic example of memoization, the factorial function. The naive recursive implementation involves repeated calculations, leading to performance degradation for larger numbers.

```javascript
function factorial(n) {
  if (n === 0) {
    return 1;
  } else {
    return n * factorial(n - 1);
  }
}
```
By memoizing the factorial function, we can significantly improve its performance:

```javascript
const memo = {};

function factorialMemoized(n) {
  if (n in memo) {
    return memo[n];
  }

  if (n === 0) {
    return 1;
  } else {
    const result = n * factorialMemoized(n - 1);
    memo[n] = result;
    return result;
  }
}
```
In this example, the memo object stores the cached factorials, eliminating redundant calculations.

##Conclusion

Memoization is a powerful technique for improving the performance of recursive functions in JavaScript. By carefully considering its benefits and potential drawbacks, developers can effectively utilize memoization to enhance the efficiency of their code.