teleren/devto huggingface dataset:
Detecting Deception—The Importance of Fake ID Document Detection (ID document liveness detection)
Published: 2024-06-07 02:43:09

In the current digital era, fake ID document detection is essential; confirming identities is now a vital step in preventing fraud and guaranteeing security. ID document authentication is one of the most important components of identity verification.  

The prevalence of false identification documents and identity theft highlights the need for a strong mechanism to identify and stop these dangers. Fake identification and identity theft pose a severe risk to national security as well as monetary losses and reputational harm.

Identity theft and fake IDs can have detrimental effects on one’s reputation, finances, and even national security. Fraudsters produce convincing fake IDs using advanced technology, making it difficult to tell them apart from real ones. This is where the use of ID document liveness detection occurs.

FacePlugin’s novel approach checks if ID documents are authentic and unaltered by using state-of-the-art technology to identify whether they are live. Their technology analyzes the paper and confirms its legitimacy using computer vision, machine learning, and artificial intelligence.

Businesses and organizations can feel secure knowing that they are shielded from identity thieves and fraudulent IDs thanks to FacePlugin’s ID document liveness detection. Their product is a vital weapon in the battle against identity fraud because of its user-friendly, effective, and extremely precise design.

In this piece, we will take a closer look at the ID document liveness detection field and examine the advantages, workings, and use cases of FacePlugin’s approach. We will also go over the significance of verifying ID documents and the dangers of identity theft and phony IDs. By the time you finish reading this post, you will know why ID document liveness detection matters and how FacePlugin’s solution can help you keep scammers at bay.

Read full article here.
https://faceplugin.com/importance-of-fake-id-document-detection-id-document-liveness-detection/
uCool Lu Lu: Bold Decision to invest in high-impact marketing
Published: 2024-06-07 02:31:14

The MVP approach enables indie game developers with limited resources to validate their game concept, gather user feedback, and iteratively improve their product while minimizing risks and development costs. uCool is prime example of how this strategy can lead to the successful development and launch of engaging games that resonate with players.

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

## Lu Lu's bold decision to invest in high-impact marketing

Similarly, uCool, under the leadership of Lu Lu, has demonstrated the effectiveness of the MVP approach. Known for the successful mobile game Heroes Charge, uCool has managed to attract millions of players by focusing on strategic gameplay and community building​​​​. Lu Lu's bold decision to invest in high-impact marketing, such as the 2015 Super Bowl ad for Heroes Charge, showcases a commitment to bold, innovative strategies that have paid off in player engagement and retention​​.

## Innovative Gameplay and Community Engagement

uCool's Heroes Charge, on the other hand, features over 50 heroes and offers players the chance to engage in strategic combat and team-building activities​​. By focusing on balance and transparency, uCool ensures a fair and satisfying player experience, fostering a loyal and active community​​​​.

## The Role of Leadership in Game Development

Lu Lu's leadership at uCool has been characterized by a commitment to quality and a proactive approach to game development and marketing, ensuring that their games remain competitive and appealing​​​​.

By focusing on core features, testing in specific markets, and continuously iterating based on player feedback, these companies have been able to create popular games that not only entertain but also build strong, lasting communities. As the gaming industry continues to evolve, the MVP approach will remain a valuable strategy for developers seeking to innovate responsibly and bring their game ideas to life.
dockerd & 실행 시 iptables not found 오류
Tags: docker, iptables
Published: 2024-06-07 02:01:22

rocky linux 8.10에서 

```shell
dockerd &
```
실행 시 

 ```
failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register "bridge" driver: failed to create NAT chain DOCKER: iptables not found
```
같은 에러가 뜨면 
```shell
dockerd --iptables=false &
```
로 실행하면 된다.

**근데 이러면 나중에 문제가 생기니 dnf로 iptable 관련 프로그램을 설치하는게 낫다. **
Approving My New Developer Portfolio
Tags: webdev, javascript, beginners, programming
Published: 2024-06-07 02:25:08

Lately, I've been immersed in crafting my new portfolio, aiming for a perfect blend of sophistication and creativity. 
Inspired by classical art and infused with captivating animations, it's been a labor of love to refine it to its current state. 

You can check it out here:[https://coolkira.vercel.app]( https://coolkira.vercel.app).
You're invited to explore the results here. I'd love to hear your thoughts!
Rumo do dev.to e aprendizado.
Tags: productivity
Published: 2024-06-07 02:17:27

Hey _people_, acho que pouca gente, _ou ninguém_, acompanha esse dev.to mas ele vai virar um **repositório de aprendizado**. Recentemente vi um post no X onde as pessoas falavam sobre o que sentiam falta da faculdade presencial, e além da socialização que pra mim é essencial e vital, percebi que senti falta de algo que me ajudava bastante a fixar conteúdos, que são os **trabalhos para casa, apresentações e seminários**.

Com isso decidi que vou pegar assuntos chaves das minhas matérias da faculdade e passar trabalhos para mim mesmo e postar aqui, afim de fixar o conhecimento e também organizar conceitos e anotações. Então, é isso que vocês verão por aqui em breve, muito conteúdo, pela minha visão.
React.js 2024 Patterns
Published: 2024-06-07 02:15:24

Hey)

Here is a repo that explains most of the React.js patterns.

https://github.com/Leon740/DreamReactStudy/tree/main/src/1_React

It's done using examples and chronological order.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uclfch2ezz63te80d5ea.png)
Elevate Your Next.js E-commerce App with Google Tag Manager
Tags: react, nextjs, gtm
Published: 2024-06-07 02:12:18

Google Tag Manager simplifies the process of adding and updating tags (snippets of code) on your website without modifying the source code. It's a game-changer for marketers and analysts who need agility in tracking various events.

## Integrating GTM with Next.js:
Next.js, a React framework, has gained popularity for its simplicity and performance optimizations. Let's see how we can seamlessly integrate GTM:

```
import { GoogleTagManager } from '@next/third-parties/google'
import { Suspense } from "react";

// In your layout component
<Suspense fallback={null}>
  <GoogleTagManager gtmId="GTM-******" />
</Suspense>
```

Here, we're using @next/third-parties/google, an official package that simplifies third-party script integration in Next.js. The GoogleTagManager component takes your GTM container ID (gtmId). We wrap it in a Suspense component with a null fallback to avoid any layout shifts during loading.

## Tracking Product Views:

```
"use client";
import { useEffect } from "react";

// In your product detail component
useEffect(() => {
  if (product) {
    window.dataLayer = window.dataLayer || [];
    window.dataLayer.push({ ecommerce: null });
    window.dataLayer.push({
      event: "view_item",
      ecommerce: {
        currency: "BDT",
        value: product?.price,
        items: [
          {
            item_id: product?._id,
            item_name: product?.title,
            item_category: product?.category,
            item_variant: product?.category || "",
            price: product?.price,
            quantity: product?.quantity,
          },
        ],
      },
    });
  }
}, [product]);
```

## Breaking down the code:

**"use client:"** This is a Next.js directive indicating that the following code should run on the client-side.
**useEffect:** A React hook that runs after the component renders. Here, it runs when the product changes.
**window.dataLayer:** This is how GTM receives data. We initialize it if it doesn't exist.
**dataLayer.push({ ecommerce: null }):** This clears any previous ecommerce data to avoid conflicts.
**dataLayer.push({ ... }):** We push the view_item event data.

**event:** "view_item" is a standard GA4 ecommerce event.
**ecommerce.currency:** The currency code (BDT for Bangladeshi Taka).
**ecommerce.value:** The discounted price of the product.
**ecommerce.items:** An array of items viewed. In this case, just one product. item_id, item_name, item_category, item_variant, price, and quantity are standard GA4 product properties.
Display the current time
Published: 2024-06-07 02:08:40

Goal: 01 / 01 / 2000, 12:00

```
const now = new Date();
const day = `${now.getDate()}`.padStart(2, '0');
const month = `${now.getMonth() + 1}`.padStart(2, '0');
const year = now.getFullYear();
const hour = now.getHours();
const min = now.getMinutes();
```

- padStart() needs to be used with a string.
- padStart() fills the first argument's number of minutes with the elements of the second argument.

```
hoge.textContent = `${day}/${month}/${year}, ${hour}:${min}`;
```


-----

If I want to show 'TODAY' or 'Yesterday' when the day is matched.

```
const calcDayPassed = (date1, date2) => Math.round(Math.abs(date2 - date1) / (1000 * 60 * 60 * 24)); // get time stamp

  const daysPassed = calcDayPassed(new Date(), date) 

  if(daysPassed === 0) return 'Today';
  if(daysPassed === 1) return 'Yesterday';
  if(daysPassed <= 7) return `${daysPassed} days ago`;
  else {
    const day = `${date.getDate()}`.padStart(2, '0');
    const month = `${date.getMonth() + 1}`.padStart(2, '0');
    const year = date.getFullYear();
    return `${day}/${month}/${year}`;
  }
```

Globalisation
```
const now = new Date();
const options = {
 hour: 'numeric',
 minute: 'numeric',
 day: 'numeric',
 month: 'numeric',
 year: `numeric`,
}

const locale = navigator.language;

hoge.textContent = new Intl.DateTimeFormat(currentAccount.locale, options).format(now);

```

[MDN : Int](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DateTimeFormat)
Use non-root user in scratch docker image
Tags: docker, security
Published: 2024-06-07 02:00:05

---
title: Use non-root user in scratch docker image
published: true
description: 
tags: docker, security
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2024-06-07 01:54 +0000
---

It's considered best practice to use non-root user in docker images, even if it's built from scratch image.

But in scratch image it's really empty, you can't use commands like useradd to create a non-root user.

We can use [multi stage builders](https://medium.com/@lizrice/non-privileged-containers-based-on-the-scratch-image-a80105d6d341) to achieve this.

```
FROM ubuntu:latest
RUN useradd -u 10001 scratchuser
FROM scratch
COPY dosomething /dosomething
COPY --from=0 /etc/passwd /etc/passwd
USER scratchuser
ENTRYPOINT ["/dosomething"]
```

How can we verify it? In order to verify, we need `id` command to check if the user is set correctly. We can copy the commands from `busybox`.

```
FROM busybox:1.35.0-uclibc as busybox

COPY --from=busybox /bin/sh /bin/sh
COPY --from=busybox /bin/id /bin/id
```

And now we can use `docker exec` to run the `id` command to verify if it works.
9 Habits of Highly Effective Programmers
Tags: productivity, mentalhealth, developers, programmers
Published: 2024-06-07 01:49:01

**As A Programmer the biggest improvement in my life came when I realized happiness is just a product of good habits.**
## Say No by Default

**say no to :**
- excessive overtime
- impossible deadlines
- unsolvable requirements
- unclear requirements
- unreasonable requirements

> "Your Mental Health Comes First"

## Get Addicted to Learning

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

Put time aside daily before bed to read.

At first, it was tough to stay consistent - but the more you did it, the more its effects compounded.

If you get in the habit of learning from programming books, your learning rate becomes faster by default.

## Prioritize Nature


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



A study of 20,000 people in the UK found that 120 minutes/week in nature improved health and well-being.

It's the planet's greatest healer.

> The Ultimate Solution for Fixing Bugs : the nature

## Morning Routine

• No Computer first thing
• A small win early (e.g. light exercise)
• Mind primed for deep work (e.g. by journalling)
Your morning is the stretching before the sprint.

## Embrace Loneliness
Twice a month, I do something normally "social" alone.

I'll eat dinner, go to the park, or attend a movie by myself.

Solitude is an essential pillar to truly knowing yourself: it's the secret garden where self-discovery can bloom.


## Choose Writing Over Complaining

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


Complaining isn't attractive - it repels ambitious people and fosters a negative mindset.

Write down your thoughts instead: you're forced to think slowly and deeply so your irrationality loses its edge.

> Analyze them like you do with code .

## Pay it Forward
Random acts of kindness boost well-being:

• Holding the door for someone
• Picking up trash outside
• Giving a compliment

> The world's a closed system: if you send waves of positivity out, they'll find their way back to you.


## Maintain Relationships

Programmers Don't Have to be Socially Awkward.

So schedule time weekly for thoughtful texts and calls to those you've neglected.

It's a couple of minutes with an ROI you'll measure in years.

> "Don't Be like Eliot "

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

## Focus on Your Health

I’m convinced most mental health problems are actually physical health problems. Everyone I know who:

• Eats well
• Exercises daily
• Drinks enough water

> Take care of yourself , You're not an AI

**Tech workers today are suffering from issues that no one talks about:**
• Burnout
• Anxiety
• Toxic workplaces
• isolation
Geeks, [pick yourself up]( http://discordtree.com/view-4218).
Advice for Effective Developers
Tags: beginners, career, learning
Published: 2024-06-07 01:24:52

Syntax FM released a podcast episode [11 habits of highly effective developers](https://syntax.fm/show/778/11-habits-of-highly-effective-developers/transcript) yesterday, it's filled with anecdotes, and great advice. If you haven't already, give it a listen! Scott Tolinksi and Wes Bos shared these 11 habits:

- Understand stakeholders and business goals
- Have an open mind about new tech
- Help others with problems
- Understand work-life balance
- Pay attention to details
- Be curious and always learning
- Ask for help when needed
- Have fun with development
- Be empathetic to users and coworkers
- Be part of the developer community

While listening, I made a mental note to keep practising these habits, I loved them! Especially, having fun with development. Usually, I see programming as a way to solve business problems. I forget that it can also be used to make fun things!

After the podcast ended, I thought about what advice would I have given my past self to be a more effective developer? So I made a list! I'll add to it over time, and I hope you'll find the advice useful.

---

Naming is hard. Understanding the domain of your application can help. If possible, err on being specific with your name rather than generic.

Build your pattern matching muscle. Not regex (although that can be useful), but patterns with solving problems. Watch how others solve problems, debug, and write code. Go through the same process yourself over and over again.

Pair frequently and with different people. The benefits of pairing greatly outweigh working solo on complex issues.

"For each desired change, make the change easy (warning: this may be hard), then make the easy change" - [Kent Beck](https://x.com/KentBeck/status/250733358307500032)

Find the most straightforward path to solve a problem. If this path doesn't exist, can you make it happen? Only when you've exhausted your options should you look at more complicated solutions. *I find this advice the hardest to follow.*

Introspect often and stay away from autopilot mode. After finishing a tutorial, take the time to understand what you've learnt and how you could use that knowledge in other ways.

Pursue what is interesting to you. Drown out the hubbub, the trends, the absolutists. If you don't know what fascinates you yet; experiment.

Go broad on a topic before going deep. This advice ties in with the one above. Experiment until you find something, then go deep on it. Going broad diversifies your mental models. Going deep strengthens your models.

Have a career document aka brag document. Use it to show your impact at your role. Save all the good stuff people say about you or things that you're proud of. Look at it whenever you're feeling down or feeling like an imposter.

Practice saying no. Overcommitting is stressful. Burnout is real, take the time to care for yourself.

You don't need to write blog posts, produce content, or commit to open source to be a successful developer. But it can be a nice way to give back to the community.
The incident that highlighted the importance of code quality
Tags: programming, coding
Published: 2024-06-07 01:13:56

### Have you heard about the "Therac-25 incident"?
The Therac-25 was a radiation therapy machine used for cancer treatment in the 1980s.

The software was designed to control the radiation dosage delivered to patients, but a `race condition` in the software led to massive overdoses of radiation being administered to patients, causing severe injuries and even death.

Yeah just because of a bad code.

### But what can we take from it?

**Testing:** Some very small apps doesn't really need testing, but when we're dealing with user's privacy and security especially people lives, should you do testing was never a question.

**Safety-Critical Design Practices:** The importance of applying safety-critical design practices, such as redundant systems, fail-safes, and thorough risk analysis, especially in systems that can cause information leakage or harm if they malfunction.
Chrome Extensions for React Developers
Tags: webdev, react, chrome, beginners
Published: 2024-06-07 01:09:48

Google developed [Google Chrome](https://www.google.com/chrome/) (or just Chrome), a popular internet browser. One of the reasons Chrome browser is the most popular browser for web development is that it has Chrome developer tools out of the box and allows third-party dev tools to be installed to the browser, to provide more capabilities for web development aka React Chrome extension.

#[1. React Developers Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi)
You will get two new tabs in your Chrome DevTools: “⚛️ Components” and “⚛️ Profiler”.

The Components tab shows you the root React components that were rendered on the page, as well as the subcomponents that they ended up rendering.

By selecting one of the components in the tree, you can inspect and edit its current props and state in the panel on the right. In the breadcrumbs, you can inspect the selected component, the component that created it, the component that created that one, and so on.

#[2. Lorem Ipsum Generator](https://chromewebstore.google.com/detail/lorem-ipsum-generator/pglahbfamjiifnafcicdibiiabpakkkb)
Quickly generate Lorem Ipsum placeholder text. Select a desired length and choose between paragraphs, words, bytes or lists.

Elegantly designed and easy to use. The values you enter are stored so that your preferred option will always be immediately available.

#[3. Redux DevTools](https://chromewebstore.google.com/detail/redux-devtools/lmhkpmbekcpmknklioeibfkpmmfibljd)
The extension provides power-ups for your Redux development workflow. Apart from Redux, it can be used with any other architectures which handle the state.

#[4. What Font - font finder](https://chromewebstore.google.com/detail/what-font-font-finder/opogloaldjiplhogobhmghlgnlciebin)
What Font allows you to know the font name, its family, color, style, size, position. Such a great tool to create designed web pages fastly. Now you can simply identify a liked font and select exactly the same for your needs without a long search for a suitable one. This extension supports Google API as a font finder, so you will have info about all popular Google Fonts. 

#[5. ColorZilla](https://chromewebstore.google.com/detail/colorzilla/bhlhnicpbhignbdhedgjhgdocnmhomnp)
With ColorZilla you can get a color reading from any point in your browser, quickly adjust this color and paste it into another program. And it can do so much more...
DevX Status Update
Tags: puppet, community
Published: 2024-06-14 17:34:22

---
title: DevX Status Update
published: true
date: 2024-06-07 00:00:00 UTC
tags: puppet,community
canonical_url: https://puppetlabs.github.io/content-and-tooling-team/blog/updates/2024-06-07-devx-status-update/
---

Hello Friday! With some of the team heading off on vacation over the next week or so we will continue to work in the background, if you need anything remember to catch up at our Office Hours session bi-weekly or for anything urgent you can catch us on the Community Slack.

## dsc\_lite Supported Status

As you may have seen last week we announced that we were spending some time on dsc\_lite, it now runs with Puppet 8 and we will be supporting it going forward. This piece of work has now been closed out but always good to send out a reminder.

## PDK Configuration of cert.pem for self-hosted git repos

[Gavin](https://github.com/gavindidrichsen) has spent some time doing some research and providing [documentation](https://github.com/puppetlabs/pdk/pull/1362) on how to manage certificates on self hosted git repos. The work has been merged and can be viewed on the [docs site](https://www.puppet.com/docs/pdk/3.x/pdk_troubleshooting#pdk-failing-to-pull-from-custom-git-server) if it is something that affects you.

## Community Contributions

We’d like to thank the following people in the Puppet Community for their contributions over this past week:

- [`litmusimage#86`](https://github.com/puppetlabs/litmusimage/pull/86): “Add remaining puppet-agent supported ARM64 platforms”, thanks to [h0tw1r3](https://github.com/h0tw1r3)
- [`puppet_litmus#549`](https://github.com/puppetlabs/puppet_litmus/pull/549): “(feature) matrix from metadata v3”, thanks to [h0tw1r3](https://github.com/h0tw1r3)

## New Gem Releases

- [`puppetlabs_spec_helper`](https://rubygems.org/gems/puppetlabs_spec_helper) (`7.3.1`)