teleren/devto huggingface dataset:
🌎 Testing Approach for a Globalized Web Application
Published: 2023-03-02 00:30:00

Testing a globalized web application involves validating that it functions correctly in different languages and cultures. 

- 🌐 **Test with different locales**: A locale is a specific combination of a language and a region. When testing a globalized web application, it is important to test it with different locales. This can help to identify issues related to translation, formatting, and other aspects of globalization.
- ⏰ **Test with different time zones**: Testing a globalized web application with different time zones can help to identify issues related to date and time formatting, as well as time-sensitive functionality such as scheduling.
- 🌟 **Test with different character sets**: Different languages and cultures use different character sets, such as Latin, Cyrillic, or Chinese characters. Testing a globalized web application with different character sets can help to identify issues related to font rendering, character encoding, and other aspects of localization.
- 🔧 **Use automated testing tools**: Automated testing tools such as Playwright can help to streamline the testing process and ensure consistent testing across different locales, time zones, and character sets.


## 🚀 Playwright Example


```javascript

const { chromium } = require('playwright');

(async () => {
  const locales = ['en-US', 'es-ES', 'fr-FR']; // array of locales to test
  const browser = await chromium.launch();
  
  for (const locale of locales) {
    const context = await browser.newContext({
      locale: locale,
      timezoneId: 'America/Los_Angeles' // set the timezone to Pacific Time
    });
    const page = await context.newPage();

    await page.goto('https://myglobalapp.com');

    // Test the user interface
    await page.click('#btn-login');
    await page.fill('#username', 'myusername');
    await page.fill('#password', 'mypassword');
    await page.click('#btn-submit');

    // Test the functionality
    await page.click('#btn-menu');
    await page.click('#menu-item-1');
    await page.waitForSelector('#page-content');

    // Assert that the content is in the expected language
    const content = await page.innerText('#page-content');
    expect(content).toContain(getExpectedContent(locale));

    await page.close();
  }

  await browser.close();
})();

function getExpectedContent(locale) {
  switch (locale) {
    case 'en-US':
      return 'Welcome to my global application';
    case 'es-ES':
      return 'Bienvenido a mi aplicación global';
    case 'fr-FR':
      return 'Bienvenue sur mon application mondiale';
    default:
      return '';
  }
}
```
Fetching YouTube videos to your GitHub README with GitHub Actions
Tags: github, readme, beginners, showdev
Published: 2023-03-02 00:16:28

A profile README is a great way to introduce yourself and share more about your work and passions with visitors to your GitHub profile, and having a nicely designed one is way more exciting than having an empty or a boring profile.

With that in mind, I’m happy to share a [detailed step-by-step video](https://www.youtube.com/watch?v=COLLcLNNm1E) on how to create a nice-looking GitHub profile README with GitHub Actions that automatically fetch YouTube videos directly from your channel. You’ll be surprised: it’s easier than it sounds. 

Also, the README of the video is designed from scratch, so, it might give you some ideas to implement in yours.

As always, any feedback is appreciated.
How to Fix FAILED-OUT OF ENERGY in TRON Smart Contract Transfer
Tags: tron, blog, steem
Published: 2023-03-02 00:02:02

@rme used the [Steem2USDT Swap](https://steemyy.com/steem2usdt.php)  and he reported a bug:

![image.png](https://cdn.steemitimages.com/DQmVvVeH1ChXcCiBzxJ5TrpUyjPTWV1MJ2vJtzjf9xtvV4t/image.png)

The system handles the transaction but [fails to broadcast](https://helloacm.com/how-to-send-transfer-usdt-on-tron-blockchain-using-tronweb/) to TRON blockchain because of a "OUT OF ENERY" error. The account has [staked more than enough TRX](https://helloacm.com/automate-freeze-balance-on-tron-blockchain-using-nodejs-with-tronweb-trongrid/) to gain energy and bandwidth, and it turns out it was because of a Recent Tron Network Upgrade (Proposal 83):
https://coredevs.medium.com/committee-proposal-83-679c6c139e19

The cost of energy to trigger a smart contract (TRC-20) transfer has increased by 1.2 times. And the FEE LIMIT parameter should be set to 30 TRX which is `feelimit = 30000000` (Unit: SUN)

With the change, the service is back to normal.

<hr/>

### [Steem](https://steemyy.com) to the Moon!
You can swap the STEEM/SBD to USDT (TRC-20) via [Steem2USDT](https://steemyy.com/steem2usdt.php)
Run Appwrite on a Raspberry Pi
Tags: appwrite, raspberrypi
Published: 2023-03-08 20:00:38

---
title: Run Appwrite on a Raspberry Pi
published: true
date: 2023-03-02 00:00:00 UTC
tags: appwrite, raspberry
canonical_url: https://jimbobbennett.dev/blogs/install-appwrite-rpi/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zz6gkh0c340mfnznaw7e.png
---

> TL;DR - use Raspberry Pi OS 64-bit if you want to run Appwrite on a Pi

I’ve started working on a personal project, so thought it might be fun to give [Appwrite](https://appwrite.io) a spin. Appwrite is an open-source app backend for web and mobile projects, you can think of it as a competitor to Firebase.

Rather than use a hosted version, or try to run it on Azure and burn through my credits, I decided to run it on a local server. I have a few Raspberry Pi’s kicking round, so thought Id try running it on there.

## Hardware

Appwrite claims to run on as little as 1 CPU and 2GB of RAM, so a Pi 4 with 4GB should be more than enough. I have one spare, so set it up.

## Raspberry Pi OS

The first thing to note is that Appwrite does run on Arm, but only Arm64. The ‘default’ Raspberry Pi OS is the 32-bit version, and Appwrite will not run on this. Instead, when you set up your SD card, you need to use Raspberry Pi OS 64-bit. In my case I’m using the lite version as I want to run this as a headless server.

![The Raspberry pi OS lite 64-bit option in the imager](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ko8os75vlseyczmyw4cm.png)

I installed this on an SD card, then booted up my Pi 4.

## Configuring the software

Appwrite runs as a docker container, so the first thing to do is install docker. The [convenience script](https://docs.docker.com/engine/install/debian/#install-using-the-convenience-script) from docker works perfectly on the Pi:

```bash
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh ./get-docker.sh
```

Takes a while, but this sets up docker. I then like to add the current user to the `docker` group to save `sudo`ing all the things.

```bash
sudo usermod -aG docker $USER
```

Now docker is installed, you can install Appwrite. Appwrite has 2 ways to do this - a quick install and a manual install. I decided to do the manual install in case I needed to configure things later.

You start by creating a folder to run from on your Pi, then downloading a docker compose and .env file:

```bash
mkdir appwrite
cd appwrite

curl -o docker-compose.yaml https://appwrite.io/install/compose
curl -o .env https://appwrite.io/install/env
```

From here, you can build the container and start it up:

```bash
docker compose up -d
```

This runs the container detached - as in it runs in the background, returning to the current session. If you close your shell it will stay running.

Once I had this running, I could then open Appwrite by accessing my Pi from a browser. Appwrite runs on port 80, so listens to default HTTP requests on the Pi. From there, create a new account to access the server.

![The appwrite login screen](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tgf3xhs9g6jvq8z1xbxj.png)
Flutter🐬Just One Command to Deploy to both Android and iOS
Tags: flutter, ios, android, shell
Published: 2023-03-01 23:48:29

# Automation Tasks

1. Increment of build number and version number
2. Build and deploy to iOS
3. Build and deploy to Android


So, let’s get started!
# Make .env
```.env
ANDROID_UPLOAD_LINK: https://~~~
```

# Make deploy.sh
```deploy.sh
#!/bin/bash

iosDeploy() {
  echo "🍎 iOS build started 🚀🚀🚀"
  flutter build ipa --release --export-options-plist=ExportOptions.plist
  echo "🍎 iOS build finished 🎉🎉🎉"
}

androidDeploy() {
  echo "🍏 Android build started 🚀🚀🚀"
  flutter build appbundle
  open -R ./build/app/outputs/bundle/release/app-release.aab
  open $ANDROID_UPLOAD_LINK
  echo "🍏 Android build finished 🎉🎉🎉"
}


# Increment version
perl -i -pe 's/^(version:\s+\d+\.\d+\.\d+\+)(\d+)$/$1.($2+1)/e' pubspec.yaml

source .env
# Deploy
iosDeploy &
androidDeploy &

wait
echo "Both builds finished 🎉🎉🎉"
```

# Grant executive authority to deploy.sh
```
chmod +x deploy.sh
```


# Try the command! 🦄
```
./deploy.sh
```

SAYONARA
Day 704 : 1st of the Month
Tags: hiphop, code, coding, lifelongdev
Published: 2023-03-01 23:19:08

_liner notes_:
- Professional : Had a couple of meetings. Helped out a couple of people in the community channel. Wrote what I did to update a demo to use new credentials and provided a link to the code. Sat in on a talk prep session. Took a company training. Next thing I knew, the day was over.

- Personal : Went through some tracks for the radio show. Did some refactoring of my side project to not hardcode the URL to make calls to the back end. This way, it will work the same if another person installs it without having to set it manually. Also cleaned up some code. Then I went to bed and watched a couple of episodes of Spy x Family.

![A valley in Yosemite, CA, United States with a bunch of pine trees and stone mountains in the distance under blue skies](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/irf8o559ltwl77aumqpi.jpg)

Going to try and do a rerun of last night. I thought I was going to a meetup to stream it, but it got cancelled. Going to use my new found time and be productive. About to go through tracks for the radio show. The plan for the side project is to be able to save real location and event data and have it show up on the site in another place. It's also the 1st of the month so I'm going to pay my bills.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube 4j_cOsgRY7w %}
AFFiNE the new Knowledge-base is evolving quick - awesome successor of Notion, Miro, Trello and Monday...
Tags: webdev, notion, miro, trello
Published: 2023-03-01 23:15:50

AFFiNE the new Knowledge-base is evolving quick - awesome successor of Notion, Miro, Trello and Monday...
 
get more infos at  affine.pro/blog

About all the projects and development efforts behind AFFiNE - BlockSuite and OctoBase and more!
Software Companyaffine.pro/blog


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




![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/6ako5zu7dzyar3wvh8l5.png)
A TUTORIAL ON TECHNICAL WRITING (CHAP 1)
Tags: tutorial, writing, beginners, career
Published: 2023-03-01 23:13:34

## Preamble
Anyone can take this tutorial. This tutorial covers every aspect of technical writing you need to know. If you're looking to get started in technical writing, this tutorial is for you.

## Introduction
At the end of this chapter you'll be able to answer the following:
- what is technical writing
- why is technical writing important
- who is a technical writer

Technical writing is educative writing. Technical writing is for educating readers about the following:
- a piece of technology
- concepts unknown to them
- how to perform specific technical tasks

Technical writing is an excellent skill to have as a student, a junior engineer, or anyone starting out in a technical role.

Technical writing is regular English writing. If you have basic English writing skills, you can become a good technical writer. It only took me one tutorial to get started on my technical writing journey.

Who are your readers? Your readers will mostly consist of the following:
- engineers
- computer science students
- developers

Technical writing focuses solely on educating readers rather than publicizing or selling readers a product.

Technical writing is just as important to you as it is to technological companies. Freelance technical writing is a lucrative source of income. Technological companies need technical writing as a part of their product lifecycle. As technology continues to grow daily, technical writing plays a very important role in educating the technical populace on existing tech products, concepts and solutions.

Technical writing is a rewarding and fulfilling career path. With technical writing, you get paid to learn. You also get to discover amazing new technology way before others find them. If you're tech savvy and you like writing, technical writing is for you.

If you've made it this far, I'm sure you can answer the third question, who is a technical writer. You'll be right, a technical writer is an individual who writes articles or documentations about technology. As a technical writer you can work freelance or under a company. Entry level technical writers can earn as high as $4k monthly.

Congratulations, you've made it to the end of this chapter. By now you should be able to identify what technical writing is, the importance of technical writing, and who a technical writer is. In the next chapter, you'll learn how to get started as a technical writer and in subsequent chapters you'll learn how to go about writing various types of technical documents.
3 Free Scripts to help you secure AWS!
Tags: aws, devops, security, cloud
Published: 2023-03-01 23:08:11

3 Free Scripts to help you secure AWS!

Introduction
The below scripts can help you secure your AWS cloud by:

The Scripts
The scripts can be found here: [Securethelogs Github](https://github.com/securethelogs/Amazon-Web-Services).

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




Each script has a different purpose as explained below:

**AWS-Scan-Open-SG:** Security groups help isolate networks and protect resources. By default open rulesets are created, and if kept will bring risk to the resources and VPC.

This script will flag these security groups and even show linked Instances (Ec2).

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




**AWS-Scan-Regions:** Not knowing what “we” are running is one of the biggest risks to a cloud user. Developers using cheaper regions, or “processes” going under the radar.

This script will highlight common resources and where they are being used. This will allow you to review and hopefully remove if they are a waste ($), or bring risk.


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



**AWS-Scan-Risky-S3:** S3s are a common cause of data loss for companies using AWS. Having default configurations can bring risk to the data so plugging these gaps is a must.

This script will help prioritise which buckets to review and those most exposed. This includes configuration of those public facing:


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/egyhuagxde82l7aj2a37.png)
How do I implement liveness detection in Python to prevent fraud
Tags: python, machinelearning, webdev
Published: 2023-03-01 22:58:53

## Introduction

In today's digital world, fraud prevention is a top priority for businesses. One of the ways to prevent fraud is to use liveness detection technology, which can determine if a person is a real human or a computer-generated image. 

In this article, I will show you how to implement liveness detection API in Python to prevent fraud in less than 5 minutes.

## Sign up for an API key

First, you need to sign up for an API key from a [liveness detection](https://luxand.cloud/liveness-detection-api) service provider. After signing up, you will receive an API key, which you will use to access the liveness detection API.

## Install required libraries

To use Luxand.cloud API, you need to install the Requests library in Python. You can install it using pip, by running the command: "pip install requests"

## Call Liveness Detection API

To call the liveness detection API, you need to send a POST request to the API endpoint with the user's photo. The API will analyze the photo and return a response indicating whether the user is alive or not.

Here is a sample Python code to call the Liveness Detection API:

```
import requests
import json

url = "https://api.luxand.cloud/photo/liveness"

headers = {
    "token": "<YOUR_API_KEY>"
}

files = {
    "photo": open("<PATH_TO_YOUR_PHOTO>", "rb")
}

response = requests.post(url, headers=headers, files=files)

if response.ok:
    result = json.loads(response.content)
    if result['result'] == "real":
        print("User is alive.")
    else:
        print("User is not alive.")
else:
    print("Error occurred while calling API.")
```

## Use the Response

Once you receive the response from the API, you can use it to authenticate the user. If the user is alive, you can proceed with the authentication process. If the user is not alive, you can reject the request and prevent fraud.

## Conclusion

In just 5 minutes, you have successfully implemented liveness detection in Python using Luxand.cloud API. With this simple addition to your authentication process, you can prevent fraud and protect your application from spoofing attacks. 

This guide is just the beginning, and we encourage you to explore further and find other ways to leverage the power of Luxand.cloud API.
🔬 Gitlab 15.8 analysis w. endoflife.date, grype, (x)eol 🐋
Tags: devops, security, docker, productivity
Published: 2023-03-01 22:58:36

## ❔ About

Gitlab recently [released `15.9`](https://github.com/endoflife-date/endoflife.date/pull/2566) version:

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

This opens a opportunity to take a closer look at upgrade opportunities, security and End of Life concerns **as part of maintenance process.**

> **so we can compare `15.8` w. `15.9` (ie. why we should invest time in upgrading).**

## 🎯 What you'll learn

With this live demo, you will:

- Discover with me (live) [`xeol`](https://github.com/noqcks/xeol)
- See the whole "behind the scene" process of maintenance and documentation process.
- Learn how to produce charts from cli with [`grype-contribs`](https://github.com/opt-nc/grype-contribs) : 

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/64t7euzz2cmf0ijmaasj.png)](https://github.com/opt-nc/grype-contribs/blob/main/JQ_TRICKS.md)

... and also deal with very efficient `DEVOPS`/ `DEVSECOPS` tools.

## 🧰 Tools

- [`eol`](https://github.com/hugovk/norwegianblue)
- [`grype`](https://github.com/anchore/grype)
- [`syft`](https://github.com/anchore/syft)
- [`xeol`](https://github.com/noqcks/xeol)
- [`opt-nc/grype-contribs`](https://github.com/opt-nc/grype-contribs)
- [`jq`](https://stedolan.github.io/jq/)

## 👆 (Noobs) Notice about `xeol`

Wthin `xeol`, getting the message:

> "No eol found"

means **everything is fine** for you around end of life cycle management 😅

{% embed https://github.com/noqcks/xeol/issues/38 %}

## 🎞️ (Live) Demo

{% youtube 2tTqo1TZCyA %}

## 💡 `xeol` trick : `--fail-on-eol-found`

We can trigger a fail on `xeol` when an `EOL` is found:

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qneknrw3qylb8ea7ew0n.png)](https://github.com/noqcks/xeol/pull/12)

## ♾️ `xeol` GitHub Action

If you want to check `EoLs` as part of the CI, just check this:

[![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vaqj7b0737amol5cxabg.png)](https://github.com/marketplace/actions/xeol-end-of-life-eol-scan)

## 📑 Related stuff

- https://github.com/noqcks/xeol/issues/38
- https://github.com/endoflife-date/endoflife.date/pull/2568
- https://github.com/endoflife-date/endoflife.date/pull/2569
Global Error Management in Nuxt.js Projects
Tags: javascript, axios, vue, nuxt
Published: 2023-03-01 22:19:17

Today, frontend projects have become more complex and dynamic compared to the past. Therefore, we have to consider many parameters while developing a frontend project. One of these parameters is error management.

With a error management, our project will not crash in the face of undesirable situations, the cause of the error will be shown to the user and the user experience will be increased.

In a frontend project, it is important to show the user the information about the operations that the application performs or cannot for some reason. This information can be displayed to the user with the snackbar.

![Snackbar example](https://cdn-images-1.medium.com/max/2000/1*oUJwX7SKbLUYOgxCa31r4w.png)

If you are developing a frontend project with Nuxt.js and you are making HTTP requests with axios, it is very easy to catch and process errors caused by HTTP requests globally with [Axios Interceptors](https://axios.nuxtjs.org/helpers/).

### What are Axios Interceptors?

Axios interceptors are functions that are called on every HTTP request or response. HTTP requests and responses can be handled with the help of these functions before they are handled (by “then” or “catch”) within the application.

### Global Error Management with Axios Interceptors

With axios-module, a special version of Axios for Nuxt, it is possible to do global error management with a simple plugin that you add to your project.
For this, respectively;

 1. Let’s create the axios.js file in the Plugins folder and include it in nuxt.config.js.
{% gist https://gist.github.com/muhammederdinc/cadb8de9b1a8ff692c7eb18dc4c7ac81.js %}
2. We can now catch and manage HTTP errors with $axios.onError. Also, onRequest, onResponse, onRequestError and onResponseError can be used together with onError as needed.
{% gist https://gist.github.com/muhammederdinc/52cb67bbc3fd99c8443d7d868817e1c3.js %}
HTTP requests and responses along with global error handling will help us build a clean and maintainable architecture. In addition, it will be much easier to eliminate possible errors and add new features, and the maintenance cost of the project will decrease.

### References:

* [https://axios.nuxtjs.org/helpers/](https://axios.nuxtjs.org/helpers/)

* [https://axios.nuxtjs.org/extend](https://axios.nuxtjs.org/extend)

* [https://material.io/components/snackbars#anatomy](https://material.io/components/snackbars#anatomy)