teleren/devto huggingface dataset:
DIYing a 3D printer
Published: 2023-08-31 05:59:20

Have you all had the experience of DIYing a 3D printer? I want to DIY a 3D printer by myself, but I don't know much, I only know that I need to prepare a suitable <a href=https://www.skysmotor.co.uk/category-100-b0-Stepper-Motor.html>stepper motor</a> first.
Bash script that helps you set up server configurations, create users, and set permissions
Tags: linux, devops, bash
Published: 2023-08-31 05:50:08

Certainly! An example of a Bash script that may be used to configure servers, create users, and establish permissions is provided below. Please exercise caution when running scripts that create or edit user accounts or alter server configurations. Check the script again and make any necessary adjustments.



**

#### Certainly! Here's an example of a Bash script that automates server provisioning using the ssh command.
**

```
#!/bin/bash

server_ip="your_server_ip"
server_user="your_username"
server_ssh_port=22


remote_commands=(
    "sudo apt update && sudo apt upgrade -y"
    "sudo apt install -y nginx"
    "sudo systemctl start nginx"
    "sudo systemctl enable nginx"
)

for command in "${remote_commands[@]}"; do
    ssh "$server_user"@"$server_ip" -p "$server_ssh_port" "$command"
    if [ $? -eq 0 ]; then
        echo "Command executed successfully: $command"
    else
        echo "Command failed: $command"
        exit 1
    fi
done

echo "Server provisioning completed."
```

**

#### Certainly! Below is an example of a Bash script that helps you set up, create users, and set permissions. 

**

```
#!/bin/bash

create_user() {
    username=$1
    password=$2
    
    sudo useradd -m -s /bin/bash $username
    echo "$username:$password" | sudo chpasswd    
    echo "User $username created successfully."
}

setup_ssh() {
    username=$1
    
    sudo -u $username ssh-keygen -t rsa -b 4096 -f /home/$username/.ssh/id_rsa -N ""
    
    sudo -u $username sh -c "cat /home/$username/.ssh/id_rsa.pub >> /home/$username/.ssh/authorized_keys"
    
    sudo chmod 700 /home/$username/.ssh
    sudo chmod 600 /home/$username/.ssh/id_rsa
    sudo chmod 644 /home/$username/.ssh/id_rsa.pub
    sudo chmod 644 /home/$username/.ssh/authorized_keys
    
    sudo chown -R $username:$username /home/$username/.ssh
    
    echo "SSH access set up for user $username."
}

if [ "$(id -u)" -ne 0 ]; then
    echo "This script must be run as root or with sudo."
    exit 1
fi

read -p "Enter the username for the new user: " new_username
read -s -p "Enter the password for the new user: " new_password
echo

create_user $new_username $new_password
setup_ssh $new_username

echo "User account setup complete."


```
Before September starts, I went back and remembered concat D;
Published: 2023-08-31 05:50:03

So, the last couple of days I've been able to study for a bit, I finished my photogram-like exercise, I used bootstrap and now I feel more familiarized with it, I also learned how to jump to different branches when using git on the terminal, and overall I think I learned how to "simplify" my code, which I think is ultimately what I'd be doing as a professional developer

ANYWAY, so I started taking back some of the basics on ruby (mainly classes) and I had completely forgotten about the concat method using ASCII Codes, I feel like, this would be an easy way to "impress" people who don't know anything about code haha, I'll try to do so with my sisters ☠️

I also checked how to deploy applications using fly, I tried to deploy my first solo project, however I decided not to do so since I have to change my code and make it more DRY now that I've learned how to do so.

I feel like every single time I learn something new in regards of coding, even if I go back to things I have already seen, I still feel like I've learned such an small amount of what being a developer is like while at the same time feeling like I've gotten a lot of information!

Ok I would like to write in a more technical way but I think that will come with time, for now I want to kind of have this space to write about my experiences with coding, and once I get more comfortable I will try to start writing in a more technical way

See yaaa!!

xoxoxox

Sinhue
Reactjs Online Job Support From India
Tags: webdev, beginners, programming, javascript
Published: 2023-08-31 05:32:35


It's great to hear that Online Job Support offers [ReactJS online job support](https://onlinejobsupport.net/job-support/reactjs-online-job-support/) and training services. They seem to have a team of experienced professionals who can assist with ReactJS projects. Yes, seeking assistance from your team can be beneficial if you're new to ReactJS or struggling with your project assignments. 

Online Job Support's certified consultants with 8+ years of project experience can provide valuable guidance and support to help you overcome challenges and complete your ReactJS projects successfully. Whether you need training to learn ReactJS from scratch or support for your ongoing projects, they claim to offer both services.

If you require their services, it would be advisable to contact Online Job Support directly for more details, such as pricing, availability, and the specific support they can provide.
Securely copy secret.pem file from local to a remote machine.
Published: 2023-08-31 05:21:45

1. locate secret.pem file `/home/Jasper/MyDocuments/secrets/secret.pem`
2. Copy secret.pem file from local to remote machine

- List files in present folder
```
/home/Jasper/MyDocuments/secrets/ ls
Jenkins_default.png  secret.pem
```
- Copy secret.pem file from local to remote machine
```
scp -i /home/Jasper/MyDocuments/secrets/secret.pem /home/Jasper/MyDocuments/secrets/secret.pem ubuntu@5.54.193.106:/home/ubuntu
```
- Output: 
```
The authenticity of host '5.54.193.106 (5.54.193.106)' can't be established.
ED25519 key fingerprint is SHA256:qOMD/OD6lMLFEkqiuodkj0XNTCw3kPgdQ8ljzoeGHh98.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? y
Please type 'yes', 'no' or the fingerprint: yes
Warning: Permanently added '5.54.193.106' (ED25519) to the list of known hosts.
secret.pem   
```

- SSH from bastian host to another host in private subnet `ssh -i secret.pem ubuntu@10.10.0.1`

```

Welcome to Ubuntu 22.04.2 LTS (GNU/Linux 5.19.0-1025-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  System information as of Thu Aug 31 05:32:50 UTC 2023

  System load:  0.0               Processes:             99
  Usage of /:   20.8% of 7.57GB   Users logged in:       1
  Memory usage: 26%               IPv4 address for eth0: 10.0.135.36
  Swap usage:   0%

 * Ubuntu Pro delivers the most comprehensive open source security and
   compliance features.

   https://ubuntu.com/aws/pro

Expanded Security Maintenance for Applications is not enabled.

0 updates can be applied immediately.

Enable ESM Apps to receive additional future security updates.
See https://ubuntu.com/esm or run: sudo pro status


The list of available updates is more than a week old.
To check for new updates run: sudo apt update

Last login: Thu Aug 31 05:25:56 2023 from 10.0.26.238
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.

```
 

- In Ubuntu - create an "index.html" file and host in python
`vim "index.html"`

```
<!DOCTYPE html>
<html>
<head>
<title>MyApp</title>
</head>
<body>

<h1>This is from private app hosted in subnetg</h1>
<p>This is a paragraph.</p>

</body>
</html>
```

- run python3 server to host index.html application

```
ubuntu@ip-10-0-135-36:~$ python3 -m http.server 8000

```
How to Create Secure, Collaborative and Productive Digital Workspaces Whitepaper, powered by HP
Tags: devops, career, webdev, javascript
Published: 2023-08-31 05:18:21


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

Overview:
The workplace has changed significantly over the past few years with the rapid adoption of hybrid work. Organizations across all industries can leverage digital workspaces to implement hybrid work models that (1) provide employees with a superior user experience, (2) meet security, productivity and employee satisfaction goals for the business, and (3) are manageable for IT.

4 Key Takeaways:

How to Deploy Digital Workspaces & Address Hybrid Challenges
Adding Layers of Security with Digital Workspaces
4 Best Practices & 6 Use Cases of Digital Workspace Success
2 Digital Workspaces Success Stories
Complete the form [HERE](https://www.developer-tech.com/resources/2023/aug/16/productive-digital-workspaces/) to download!

Looking for more? [Click Here](https://bit.ly/3OQf7uo)

click the link to discover the resource powered by HP: [Ultimate Guide to Implementing Digital Workspaces with HP Anyware](https://bit.ly/3OQf7uo), powered by HP.

alternatives: [HERE!](https://www.developer-tech.com/resources/2023/aug/16/implementing-digital-workspaces-guide/)
How to do effective code reviews ?
Tags: codereview, softwaredevelopment, javascript, webdev
Published: 2023-08-31 05:10:27

Code reviews are important, everyone knows that. But very few engineers pay attention to the process unless they are forced to. 

As an engineering leader one of your job is to ensure the health of your codebase. A good code review process will help you maintain right balance between developer velocity and high code quality. 

## Train your engineers for code review

Do not assume that everyone knows the code review process. Different engineers come from different backgrounds. Every new engineer on the team must be presented with highlights of your code review process. All of them must be asked to work as code reviewers as well even if they may not have sufficient context. 

## Create a process for PR request documentation

Always force developers to write details PR request descriptions. Take advice from senior developers as to what this template for description may look like. 

## Create a readability program

Google has a readability program for their engineers. Each developer is required to either go through a code readability program or always add a readability reviewer to the code reviews. 

It might not be possible for you to create such process but you can use standard static analysis tools to force certain basic code hygiene on the developers. 

## Automate as much as you can

With things like LLMs the code generation has become extremely powerful. Use it for your advantage. Insist on using assistive ai like Github Copilot to help developers write code that is more in line with your organization standards. Then use static analysis tools and services such as [SonarCube](https://www.sonarsource.com/) to do automated checks. 

## Code Reviews for Frontends

For front end code such as react you also need to have a process to do some tests that are hard to catch via unit tests. Things such as accessibility must be tested and [code review process must ensure that accessibility testing has occurred](https://www.frontendeng.dev/blog/13-how-to-review-cls-of-junio-developers). 


## Conclusion

As an engineering leader always think deeply about code quality and the process which adds more code to your code repository.
Mathew Payne, GitHub: Protecting code while nurturing user experience
Tags: webdev, programming, tutorial, github
Published: 2023-08-31 05:08:38

Developer caught up with [Mathew Payne](https://bit.ly/3OQf7uo), Principal Field Security Specialist at GitHub, to discuss the platform’s security strategies and how they aim to strike a balance between robustness and a seamless user experience.

At the heart of GitHub’s security philosophy lies a commitment to safeguarding user code. Payne emphasised that a major focus is on securing the code created by both users and developers.

“The first thing that we focus on at GitHub is the security of our users,” says Payne. “My focus has always been on securing the code that my users and customers write.”

Balancing security features with user experience is a challenge GitHub acknowledges. Payne highlighted the significance of reducing false positives, which can discourage developers from using security tools.

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

“If I’m producing too many [false] results from my tool, my developers are going to start really pushing back,” explains Payne. “And we want to be partners with those developers, not against them.”

GitHub’s integration of security processes into developers’ daily activities helps streamline the experience. This includes automatically detecting vulnerabilities during pull requests and promptly communicating potential issues before they reach production.

Addressing emerging security threats, [GitHub](https://bit.ly/3OQf7uo) acknowledges the escalating concern over the software supply chain. Payne gives the example of the Moq library, which drew criticism earlier this month for including the data-collecting ‘SponsorLink’ in its latest release.

GitHub remains vigilant against unauthorised access to repositories and the inadvertent exposure of sensitive data. By the end of this year, GitHub will require all developers to enable one or more forms of 2FA after compromised accounts led to package takeovers......[Read more](https://bit.ly/3OQf7uo).
Managed services
Published: 2023-08-31 05:04:52

Managed services refer to the practice of outsourcing specific IT functions or business processes to third-party service providers. This arrangement allows organizations to offload the responsibilities of monitoring, maintaining, and managing various aspects of their technology infrastructure or operations. 

Typically, managed services encompass a wide range of offerings, including but not limited to, network management, security services, cloud computing, data storage, backup and recovery, and technical support. By partnering with managed service providers (MSPs), businesses can leverage their expertise and resources to enhance efficiency, reduce operational complexities, and focus on their core activities.

MSPs deliver these services through service level agreements (SLAs), defining the scope, responsibilities, and performance metrics. This contractual arrangement ensures that the organization receives consistent and reliable support, often with 24/7 monitoring and rapid issue resolution. Managed services can be particularly beneficial for small and medium-sized businesses that may lack the internal resources or expertise to handle these functions independently. Overall, managed services offer a strategic approach to technology management, allowing businesses to optimize their operations and stay competitive in the dynamic digital landscape.
Google’s latest APIs focus on fighting climate change and its effects
Tags: productivity, devops, opensource, beginners
Published: 2023-08-31 05:02:49

In a bid to further its commitment to environmental sustainability, [Google](https://bit.ly/3OQf7uo) has announced the launch of a suite of new sustainability APIs at the Google Cloud Next event.

The new APIs provide developers with real-time insights into solar potential, air quality, and pollen levels, aiming to collectively reduce carbon emissions by 1 gigaton annually by 2030.

One of the highlights is the Solar API, an evolution of Google’s 2015 Project Sunroof. This initiative harnessed location, sunlight, and navigation data to estimate the energy generation of solar panels installed on roofs worldwide.

Building upon this foundation, the Solar API employs advanced AI models and modern mapping techniques to analyse rooftop angles, slopes, shade from nearby trees, and historical weather data. This enables accurate predictions of solar energy production without the need for on-site inspections, benefitting both homeowners and solar installation companies.


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

Yael Maguire, VP and GM of Geo Sustainability at Google, said: “Demand for solar has been rising a lot in recent years… we saw a lot of opportunity to bring this information and technology to businesses around the world.”

Expanding on its environmental initiatives, Google is also extending the Air Quality layer into a dedicated API.

The Air Quality API, initially proven crucial during the 2021 California Wildfires, aggregates data from various sources—including government monitoring stations, meteorological data, sensors, and sate....[Read more](https://bit.ly/3OQf7uo).
Improving App Quality with Risk-Based Testing
Tags: riskbasedtesting, appquality, risktesting
Published: 2023-08-31 04:58:31

Risk-based testing is a strategic approach to software testing that acknowledges the varying levels of risk associated with different components of an application. By focusing testing efforts on high-priority areas, software development teams can enhance the quality, functionality, and overall reliability of their products. This approach not only ensures efficient resource allocation but also contributes to the timely delivery of high-quality software that meets the needs and expectations of end-users. In the dynamic landscape of software development, risk-based testing has emerged as a valuable tool in the pursuit of software excellence.

Read More @ [https://tenjinonline.com/improving-app-quality-with-risk-based-testing/](https://tenjinonline.com/improving-app-quality-with-risk-based-testing/)
How to Increase Website Traffic & Site Visitors in 2023
Tags: webdev, beginners, tutorial, seo
Published: 2023-08-31 04:45:24

**[Website traffic](https://bit.ly/3Ph7miy)** is a vital driver of overall business growth, so it’s important to learn multiple methods to increase your website traffic.

It improves your rankings, which in turn generates even more traffic. Traffic allows you to measure marketing methods, improve search engine credibility, gather audience insights, and the most important benefit, gain more customers. Yet when searching for how to increase traffic to your website, you’ll quickly realize there are countless methods and ideologies out there. Where do you even begin?

In order to understand how to increase traffic to your eCommerce website the right way, you need to focus on attracting quality website traffic. Traffic means nothing if your engagement is stagnant and conversion rates are plummeting. That’s where we come in. The following are 15 effective ways you can boost traffic in a way that will ultimately impact the bottom line and also increase online sales numbers.

Use SEO to Increase Your Website Traffic
Search engine optimization (SEO) is one of the most impactful and valuable things you can do to drive organic traffic to your website. There are countless tactics you can use on each webpage to increase its rank in search engines, resulting in more visitors.

Consider every aspect of your site and do thorough keyword research. Ensure you’re producing optimized, high-quality content that your potential customers are searching for (more on this a bit later). Make sure you’re making the most of every bit of text on your...[Read more](https://bit.ly/3Ph7miy).
Possible reasons for slow page transitions in NextJS
Published: 2023-08-31 04:29:08

Page transitions in Next.js can take longer than expected for several reasons. It's important to analyze and address potential bottlenecks to optimize the performance of your Next.js application. Here are some common reasons and possible solutions:

**Slow Server-Side Rendering (SSR) or Generation:**
   
   If your pages have complex rendering logic, require heavy data fetching, or involve a lot of dynamic content, they might take longer to render. Consider optimizing your data fetching methods, using memoization, and improving your server's response time.

**Inefficient Data Fetching:**

   Data fetching methods like `getServerSideProps`, `getStaticProps`, or `useEffect` on the client-side can impact performance. Ensure that you're only fetching the data that's essential for the initial view and avoid unnecessary fetching or computations.

**Large Assets:**

   Large images, videos, or other media assets can slow down page loading. Optimize and compress your assets to reduce their size and improve loading times.

**Slow API Calls:**

   If your page relies on external APIs, slow responses from these APIs can delay page rendering. Consider implementing caching strategies, error handling, and loading indicators to provide a better user experience.

**JavaScript Bundle Size:**

   A large JavaScript bundle can slow down client-side rendering. Use code splitting and dynamic imports to load only the necessary JavaScript for a specific page. Additionally, minify and gzip your JavaScript files.

**Client-Side Rendering (CSR) Delays:**

   If you heavily rely on CSR, it might take time for JavaScript to execute and render on the client side, especially if the client has slower devices or limited resources. Consider using server-side rendering or static site generation for better performance.

**Third-Party Libraries:**

   Third-party libraries can impact your page performance. Evaluate whether all libraries are necessary and if there are lighter alternatives that can be used.

**Poorly Optimized CSS:**

   Large or unoptimized CSS files can slow down page rendering. Use techniques like critical CSS, CSS minification, and CSS-in-JS to optimize your styles.

**Network Latency:**

   High network latency can affect the time it takes to load assets, data, and resources. Use CDNs and server locations closer to your target audience to reduce network latency.

**Server Load and Scaling:**
If your server is overloaded or not appropriately scaled, it can lead to slow rendering times. Monitor your server's performance, and consider using tools like load balancers and autoscaling.