teleren/devto huggingface dataset:
Deleting All Containers in One Command: Streamlining Container Management
Tags: docker, containers, opensource
Published: 2023-06-30 18:23:27

Container management is a crucial aspect of modern application development. Streamlining the process of removing multiple containers simultaneously can save time and enhance efficiency. In this blog post, we'll explore a Docker command that allows you to remove all containers at once, simplifying your container management workflow.

The Command:
To remove all containers, including both running and stopped ones, in one go, use the following Docker command:

```bash
docker rm -f $(docker ps -aq)
```

Benefits:
1. Time-saving: Instead of removing containers individually, this command eliminates the need for manual intervention, saving valuable time.

2. Consistency: Bulk removal ensures a clean and organized container environment, reducing the chances of overlooking any containers.

3. Automation-friendly: The command can be easily integrated into scripts and automation workflows for scheduled or automated container removal.

**Note: When using the `-f` flag with the `docker rm` command, running containers will be forcefully stopped and removed without giving them a chance to gracefully shut down. Please exercise caution and ensure that you want to remove all containers, including running ones, before executing the command.**

Conclusion:
By leveraging the power of Docker's command-line interface, you can efficiently remove all containers, including running ones, in one command. This streamlined approach simplifies container management, enhances productivity, and promotes consistency in your containerized environment.
Reading Tweets without being logged in
Tags: twitter, hacks, workaround
Published: 2023-06-30 18:20:11

---
title: Reading Tweets without being logged in
published: true
description: Use nitter.it instead of twitter.com to keep reading tweets without being logged in.
tags: twitter, hacks, workaround
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-06-30 18:18 +0000
---

Update: [Nitter is broken right now](https://github.com/zedeus/nitter/issues/919)

OK, Twitter.com now doesn't allow you to read tweets without being logged in. You can circumvent the need to login by changing twitter.com to nitter.it though. 

So turn:
https://twitter.com/codepo8/status/1674835360516390912
into: 
https://nitter.it/codepo8/status/1674835360516390912

See it in action here:

![screencast of the hack in action](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gcvkh1eoliw8or6q9x4p.gif)
The Props Getters Pattern in React
Tags: uncategorized
Published: 2023-07-05 05:06:24

---
title: The Props Getters Pattern in React
published: true
date: 2023-06-30 18:07:41 UTC
tags: Uncategorized
canonical_url: https://codelila.com/the-props-getters-pattern-in-react/
---

Hello friends, In this blog post we are going to discuss about another design pattern in react that is the props getters pattern. Lets us get started with it.

## What is Props Getters Pattern

The Props Getters pattern is a technique in React that involves passing functions as props to child components, enabling them to access and modify specific properties or behaviors of their parent components. This pattern allows for more flexible and granular control over component interactions and enables better composition and reusability.

## Key Concepts and Principles

To grasp the Props Getters pattern effectively, it’s important to understand key concepts such as prop drilling, composition, and the principle of separation of concerns. Prop drilling refers to the process of passing props down multiple levels of components, which can become cumbersome and hinder code maintainability. The Props Getters pattern mitigates prop drilling by providing an elegant solution for accessing and manipulating specific props without the need to pass them explicitly.

## Benefits of Using the Props Getters Pattern

The Props Getters pattern offers several benefits, including:

1. Improved Component Composition: With the Props Getters pattern, components can access specific props or behaviors without the need for complex prop chains. This simplifies component composition and promotes code reuse.
2. Enhanced Code Readability: By encapsulating prop logic within the Props Getters pattern, the code becomes more readable and focused. The intention of each prop getter function is clear and separate from other concerns.
3. Greater Reusability: Components utilizing the Props Getters pattern become more reusable as they can be easily composed and customized based on specific requirements.

The post [The Props Getters Pattern in React](https://codelila.com/the-props-getters-pattern-in-react/) appeared first on [CodeLila](https://codelila.com).
PS script to fix WSL2 and VM network connectivity while using Cisco VPN
Published: 2023-06-30 18:05:18

Starting working remotely I realized that WSL2 loses network access once I connect to corporate network via VPN. This can be fixed by adjusting network connection metrics. To make it work ensure you start WSL2 before connecting to VPN. If you start WSL2 after you connected to VPN metric adjustment will not work. You will have to disconnect VPN and reconnect again and readjust metrics.

Script for metric re-adjustment

```powershell
# Get the ID and security principal of the current user account
$myWindowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal = new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
 
# Get the security principal for the Administrator role
$adminRole = [System.Security.Principal.WindowsBuiltInRole]::Administrator
 
# Check to see if we are currently running "as Administrator"
if ($myWindowsPrincipal.IsInRole($adminRole)) {
    # We are running "as Administrator" - so change the title and background color to indicate this
    $Host.UI.RawUI.WindowTitle = $myInvocation.MyCommand.Definition + "(Elevated)"
    $Host.UI.RawUI.BackgroundColor = "DarkBlue"
    clear-host
}
else {
    # We are not running "as Administrator" - so relaunch as administrator
   
    # Create a new process object that starts PowerShell
    $newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
   
    # Specify the current script path and name as a parameter
    $newProcess.Arguments = $myInvocation.MyCommand.Definition;
   
    # Indicate that the process should be elevated
    $newProcess.Verb = "runas";
   
    # Start the new process
    [System.Diagnostics.Process]::Start($newProcess);
   
    # Exit from the current, unelevated, process
    exit
}

Write-Output "Setting Cisco AnyConnect metric to 4000"
Get-NetAdapter | Where-Object { $_.InterfaceDescription -Match "Cisco AnyConnect" } | Set-NetIPInterface -InterfaceMetric 4000

Write-Output "Setting vEthernet (WSL* metric to 1"
Get-NetIPInterface -InterfaceAlias "vEthernet (WSL*" | Set-NetIPInterface -InterfaceMetric 1

Write-Output "Setting vEthernet (Default Switch) metric to 1"
Get-NetIPInterface -InterfaceAlias "vEthernet (Default Switch)" | Set-NetIPInterface -InterfaceMetric 1

Write-Output "Done!"
# echo "$PSScriptRoot"
# pause

start-sleep -seconds 2
```
Idea of self-elevated script taken from https://learn.microsoft.com/en-us/archive/blogs/virtual_pc_guy/a-self-elevating-powershell-script
AWS Community Builders Welcome Kit🎉
Tags: aws, machinelearning, community, cloud
Published: 2023-06-30 17:38:21

I’m glad to have received my 1st ever AWS CB welcome kit🥳. I look forward to continue my active participation and contribution in the AWS community. Special thanks to @jasondunn for the opportunity and incentives to motivate community builders. To learn more about the program, click this link https://aws.amazon.com/developer/community/community-builders/
Happy Friday Everyone & Cheers to the weekend 🎉

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


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

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

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

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/afizdyk2vt4bvvq4guyj.jpeg)
내가 점점 이상해 지는 것 같은데..
Published: 2023-06-30 17:37:20

바드랑 싸우고 이래도 되나.. ㅋㅋ

![Arguing chat with bard image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/em7bpv1pslu3uo7h8vhe.png)
VScode extension to format PHP using Typescript!
Tags: vscode, php, typescript, webdev
Published: 2023-06-30 17:29:01

It is true. I created a [VSCode plugin](https://marketplace.visualstudio.com/items?itemName=KalimahApps.taqwim) using Typescript to lint and format PHP files.

### Current status of PHP Linter tools
While PHP has been around for a long time, linting and formatting PHP files are not as supported or maitained as other languages (say Javascript or python).

PHP has built in linting switch `php -l`, but its only for syntax errors. It does not check for code style or formatting. This functionality can be easily added using many of the VSCode extensions.

In addition to that, there two popular libraries to lint/format PHP files:

1- **[PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)**
- Has [the most installs](https://packagist.org/packages/squizlabs/php_codesniffer/stats) on packagist.
- Not regularly maintained. Commits are few and far between.
- Has an outdated [documentation](https://github.com/squizlabs/PHP_CodeSniffer/wiki) (last updated in 2016).
- Uses `xml` for configuration which is an outdated format for configuration.

2- **[PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer)**
- Highly maintined and regularly updated.
- It has [fewer installs](https://packagist.org/packages/friendsofphp/php-cs-fixer/stats) than PHP Code Sniffer, but the margin is not that big.
- Has a [detailed documentation](https://mlocati.github.io/php-cs-fixer-configurator/#version:3.20) but it is still hard to navigate.
- Uses PHP for configuration which is a better format than `xml` but still not ideal.

Unfortunately, both libraries are not easy to configure and setup. Also, both libraries have a number of VSCode extensions, but they require the path to PHP executable to be set in the configuration, which is not as easy as it sounds, at least in my experience.

### This extension
PHPTaqwim (Arabic for correction) aims to be a simple and easy to use extension to lint and format PHP files. It requires no configuration and it works out of the box. It is also configurable if you want to customize it.


![PHPTaqwim warnings](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wkstwo7go29rlqlnd6kw.png)


Interestingly, it is written in Typescript, not PHP. This is the reason that it does not require PHP runtime to be installed on your machine. It uses [PHP Parser](https://github.com/glayzzle/php-parser) under the hood to get PHP AST and apply the rules.

It also comes as a [NPM CLI package](https://taqwim.kalimah-apps.com/docs/cli.html), so you can use it in your CI/CD pipeline.


{% cta https://marketplace.visualstudio.com/items?itemName=KalimahApps.taqwim %} PHPTaqwim on VSCode {% endcta %}
PostgreSQL: An Advanced Open-Source Relational Database
Tags: apacheage, postgres, database
Published: 2023-06-30 17:27:29

## Introduction
Postgres, also referred to as PostgreSQL, is an enterprise-class, open-source database system that has obtained considerable acclaim in the tech industry. Owing to its robust qualities, flexibility, and extensive community assistance, PostgreSQL is turning into a favored decision for many applications and organizations. This blog post talks about the history, features, and usual usage cases of PostgreSQL.

## A Brief History
The beginnings of PostgreSQL stretch back to 1986 when it was developed as the POSTGRES project at the University of California's Berkeley Computer Science department. Initially aimed at allowing for the support of multiple data types, it was renamed PostgreSQL in 1996 to emphasize the SQL support it had to offer. It continues to be improved and supported by an active community of contributors, known as the PostgreSQL Global Development Group, through the release of new versions of this open-source database.

## Features and Capabilities
- Relational and JSON Support
- Stability and Reliability
- Extensibility and Customization
- ACID Compliance

## Common Use Cases
- Web Applications
- General Purpose Transactional Database
- Geospatial Databases

## Conclusion
PostgreSQL is a robust, open-source relational database system with a wide array of features, stability, and possibilities. From web applications to transaction management or even geospatial data, PostgreSQL gives developers and organizations reliable and effective solutions. Growing through community support and development, this database is sure to remain a key part of the data landscape for a long time.

## Reference
[https://www.postgresqltutorial.com/postgresql-getting-started/what-is-postgresql/](https://www.postgresqltutorial.com/postgresql-getting-started/what-is-postgresql/)
What are Extension in PostgreSQL???
Tags: postgres, apacheage
Published: 2023-06-30 15:47:02

Extensions in PostgreSQL are modular add-ons that enhance the functionality of the core database system. They provide a way to extend the capabilities of PostgreSQL by adding new features, data types, functions, operators, and procedural languages.

The functionalities can range from simple utilities to complex features like full-text search, geographic information systems (GIS), data compression, auditing, and more. By installing the relevant extensions, users can customize their PostgreSQL installation to suit their specific needs.

Extensions can introduce new data types to PostgreSQL. For example, the hstore extension adds support for a key-value store data type, which can be useful for storing dynamic properties associated with database records. Similarly, the uuid-ossp extension provides a data type for universally unique identifiers (UUIDs). These additional data types enhance the flexibility and expressiveness of the database.

PostgreSQL supports multiple procedural languages, such as PL/pgSQL, PL/Python, PL/Perl, PL/Java, and more. Extensions can introduce new procedural languages, allowing developers to write database functions, triggers, and stored procedures in their language of choice. This flexibility enables developers to leverage their existing skills and integrate custom logic seamlessly within the database.

There are many such extensions like PostGIS for spatial and geographic data, pgcrypto provides cryptographic functions, citext extension provides a case-insensitive text data type in PostgreSQL. 

Apache AGE is such an extension for PostgreSQL that enables graph database functionality within the PostgreSQL. It allows users to store, query, and manipulate graph data using familiar SQL syntax. With this extension, users can model complex relationships, traverse graphs efficiently, and perform advanced graph queries using standard SQL.
AOT compilation: can or cannot make an @Input() property private
Tags: angular, typescript
Published: 2023-06-30 17:20:12

From https://angular.io/guide/aot-compiler#phase-2-code-generation , it's noted: 
> Decorated component class members must be public or protected. You cannot make an @Input() property private.

However on https://angular.io/guide/component-interaction#parent-calls-an-viewchild , we see the example of:
`@ViewChild(CountdownTimerComponent) private timerComponent!: CountdownTimerComponent;`

As discussed on https://stackoverflow.com/questions/63058971/is-it-okay-to-mark-input-as-private-or-readonly , "Private is only a compile-time construct" and "These constructs are only present in Typescript to aid the developers."

What's the reasoning for the "must be public or protected" from the docs?
What is Apache-Age Viewer
Tags: apacheage, ageviewer, postgressql
Published: 2023-06-30 17:19:58

Exploring, analyzing, and visualizing large-scale graph data can be a daunting task. To make it easier, Apache AGE has a PostgreSQL extension called Age Viewer. This blog post looks at Age Viewer's advantages and examines its various applications, illustrating its crucial role in the Apache AGE framework for managing graph data.

Age Viewer provides an intuitive graphical user interface that makes analyzing and visualizing graph data easy and fast. This tool provides efficient solutions for a wide variety of graph analysis tasks, enabling users to quickly gain insight into the underlying structure and relationships embedded in their data without any need for complex coding or SQL queries.

To begin using Age Viewer, you need to have an Apache Age graph database set up with data. Once that is ready, you can access Age Viewer via web browser.

To view your graph data, pick the visualization type you desire and use the filters and queries available. You can then interact with the visualization by zooming, panning, and looking into various parts of the graph. The interface has a graph canvas, a filter and query panel, and a sidebar with extra features.

Age Viewer is an intuitive web-based tool that helps users examine and visualize graph data from Apache Age. It offers a vast range of visualization settings, enabling users to query, filter, and explore the data easily. Age Viewer can be used effectively for a variety of tasks, including social network analysis, biological network examination, and general graph data analysis.
Is there any solution to my problem?
Tags: webdev, beginners, discuss, programming
Published: 2023-06-30 17:15:31

Tldr: What dev to work on, tried ml/blockchain/web/android. Anything else, fun and interesting?


My problem: I started with java+android back in 2019, and enjoyed making some apps got bored and switched to flutter because it made designing of apps fun then for some reasons wasn't able to continue, then placements seasons came and I started doing DSA. 

For dev part, everyone said to try on ml(absolutely hated it), web dev(got bored), block chain (not interesting), data analysis (boring) now due to work I had to work on spring boot and liked it. But don't see a great future in it plus for open source everyone just rants web dev, and I don't like it. Thinking of kotlin rn who knows when will I get bored of it.

Ps: I love coding and problem solving, so don't hate on me for earlier comments, I just really like to know what can I do more.
Agens-SQL: Empowering Scalable and Secure Data Management
Tags: apacheage, postgres, database
Published: 2023-06-30 17:09:52

Organizations in the present data-driven age are looking for secure and expandable database management systems (DBMS) to process and oversee their gaining volumes of data. Agens-SQL, an effective DBMS based on PostgreSQL, stands out amongst the rest with its broad selection of open source modules and sturdy features known for being the open source version of Oracle. This article delves into the benefits offered by Agens-SQL as well as its salient features that have made it perfect for various types of data management applications.

## Scalability and Open Source Packages
Organizations looking for optimal performance and efficiency can utilize Agens-SQL to tailor their database environment to meet specific requirements. With an array of open source packages on offer, along with scalability and reliability, the system provides additional modules allowing functionality such as Replication, Failover, Connection Pooling, and more. Such features shape a flexible platform that promises convenience and stability for users.

## Diverse Functions and Extensions
Agens-SQL provides a wide range of functions and extensions that make it particularly useful for businesses. Features such as window functions allow users to effectively rank, aggregate, and analyze time-series data. Data mining capabilities enable organizations to uncover hidden gems from their datasets - while extension functions provide developers with the flexibility to design custom solutions to suit individual needs.

## BI/DW Features and Data Security
Agens-SQL provides organizations with the ability to efficiently and securely process and analyze their data for use in business intelligence (BI) and data warehouse applications. Secure connections are facilitated through the support of SSL certificates, while access controls are managed through the use of roles and privileges as part of Kerberos authentication. This enables organizations to keep sensitive information protected from unauthorized use, allowing them to utilize their BI/DW capabilities confidently.


## Reference
[https://github.com/bitnine-oss/agens-sql#agens-sql-strength](https://github.com/bitnine-oss/agens-sql#agens-sql-strength)
AI Hackathon: Sentiment Analysis with Python Flask and Transformer
Tags: ai, python, beginners, hackathon
Published: 2023-06-30 16:59:07


Hey there, fellow AI/ML enthusiasts! 

I hope you're having a blast out there in the world of tech!

In case you don't know me, I'm Afshan, your programming buddy.I recently became a part of the AWS Community Builder program, and we just had our first AI hackathon. This blog is all about that hackathon.

## Getting Started in AI:
To be honest, AI is quite new to me,so participating in this hackathon was a great starting point for me to learn through hands-on practice.

## Hackathon Overview:

The AI hackathon welcomed individuals of all skill levels, from beginners to experts. It was a diverse and inclusive event that fostered collaboration and learning. I thoroughly enjoyed being part of this inclusive environment where knowledge-sharing and growth were encouraged.

## Project Focus: Sentiment Analysis with Transformer Framework

![Sentiment_UI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9yth7h2ztsqceamdasx3.png)

For the hackathon, my project focused on sentiment analysis, and it was a requirement to use the transformer framework. Leveraging this powerful framework, I built a sentiment analysis program that can analyze text and determine the sentiment conveyed—whether it's positive, negative, or neutral.


![Positive Result](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lzyj8dc6mws7fogwsdxp.png)

## Motivation: AWS Comprehend Service:

One of the significant motivations behind my project was the AWS Comprehend service. With AWS Comprehend, you can gain valuable insights by understanding customer sentiment, extracting key information, and analyzing documents on a large scale. It empowers you to decode the true meaning behind vast amounts of text, helping you uncover hidden patterns, trends, and actionable intelligence.


![Negative Emotion](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/1mwz2f7mzjjp7q2i2oyo.png)

## Challenges Faced: UI Designing:

While working on the project, I encountered several challenges in UI designing, as it's not my field of expertise. However, I gave it my best shot to ensure proper margin and padding. 

## Implications: Sharing the Tool with College Students:

This project is open to college students, who can make use of it in their graduation presentations. It provides an excellent opportunity for college students to incorporate this project into their academic work and showcase its functionality. Additionally, students have the freedom to enhance and customize the program according to their specific needs and requirements.


![students](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xazei7pmjdlvnjs02yvy.png)
## Key Learning:

I have learnt a lot about Generative AI and the transformer framework. Additionally, I had the opportunity to connect with brilliant minds in our industry during the hackathon. Interestingly, this event also made me realize the significance of improving my front-end skills... but let's just say I was only joking!😄


Github Project link: https://github.com/Afs514/AI_hackathon/