teleren/devto huggingface dataset:
Install the Azure CLI on a Raspberry Pi
Published: 2023-03-31 22:16:26

---
title: Install the Azure CLI on a Raspberry Pi
published: true
date: 2023-03-08 00:00:00 UTC
tags: 
canonical_url: https://jimbobbennett.dev/blogs/az-cli-rpi/
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ennogu2uk3wffklhbgh.png
---

I do a lot with Raspberry Pis, and sometimes I want all my tools installed in one place so I can use my Pi for everything, rather than flipping back to my Mac.

One thing I use a lot is Azure - funny really as I work for Microsoft! I often use the Azure portal as I prefer UIs to CLIs, but when working on a Pi I regularly use Raspberry Pi OS Lite, so don’t have a browser to use as I’m always in the terminal or VS Code. So I needed the Azure CLI on my Pi.

## Hardware

I’m currently doing everything on a Raspberry Pi 4 as I have a few of them (will trade one for a Lamborghini - no low ballers, I know what I have), so have one of these set up with Raspberry Pi OS Lite 32-bit. I’ve not tested this on 64-bit, but I’m guessing it should work.

## Pre-requisites

To install the CLI, you can’t just use the apt package - this only currently supports x86, not armhf. Instead it needs to be installed from an install script that installs a raw Python CLI. This has a few dependencies:

- [libffi](https://sourceware.org/libffi/)
- [Python 3.6 or later](https://python.org)
- [OpenSSL](https://www.openssl.org/source/)

Run the following to ensure everything is installed:

```bash
sudo apt install libffi-dev python3-dev python3-pip openssl
```

## Install the Azure CLI

Once the pre-requisites are installed, you can use a handy script from Microsoft to install the CLI:

```bash
curl -L https://aka.ms/InstallAzureCli | bash
```

Run this with all the defaults.

This adds the `az` command to the `/home/pi/bin/` folder, and gives you an option to add this to your path, which you should accept. You’ll then need to manually restart your shell or run `exec -l $SHELL` to restart it.

## Login

Once installed, you can log in with `az login`. It’s smart enough to realize you don’t have a web browser, and take you through the device login path, giving you a code. Head to [https://microsoft.com/devicelogin](https://microsoft.com/devicelogin) and enter the code given to get logged in!
🌱Using Forem as an intranet website, yay or nay?
Tags: discuss, help, productivity, webdev
Published: 2023-03-07 23:16:33

**I'm looking into building an intranet website and is researching on available options. There are two solutions that I have at the moment:**
- DIY the website. This offers customizability but come at the cost of overhead such as development and maintenance time.
- Use an existing open-source forum solutions like Forem, Discourse, NodeBB, etc. This cut down the overhead, but also reduces customizability (no tailored UX?) and might not scale well when requirements evolve.

**Which options would you suggest? And what else should I consider? The draft requirements can be seen below:**
- There are 2 main classes of users: Authors, and readers. The authors have right to create contents (articles, videos), while the readers can only consume content. A user can only be one or another.
- More advanced access control list: E.g., only authorized users can see the content.
- Good user experience (navigation, search, organization, etc.) Cloud file-directory based options such as Google Workspace has become an obstacle for non-technical users in this specific environment.
- Targeted audience: Certain type of content can be promoted or pin to dashboard of targeted audience.
- User profile.
- SSO.
- Optional: Scheduling (calendar), and location (map) features.
Day 708 : The Moment
Tags: hiphop, code, coding, lifelongdev
Published: 2023-03-07 23:00:40

_liner notes_:
- Professional : Pretty good day. Had a couple of meetings. Finalized a couple of things so I could set the tasks to done. Then worked on my Proof of Concept. I was able to get it deployed and got a very simple password checking function. Not bad. Next will be to add and pull dates from a settings file.

- Personal : Last night, I went through some tracks for the radio show. Got the saving to and reading from a settings file for my side project and started working on adding photos. Ended the night watch an episode of "Vinland Saga" and "Spy x Family".

![A forest in Harz, Germany with tall skinny trees with a setting sun shining through the barks](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/zm7j8ljaz3ga0b5use27.jpg)

Going to do a replay of last night. Next up is to get a photo uploaded for my side project. I also want to add the ability to favorite some locations. Waiting for the moment where I can get all the functionality worked out so I can work on making it looks nice. Also want to watch a couple of episodes of "Spy x Family" and go through some tracks.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube CiJy-9RIESI %}
Daily UX Writing Challenge Day 4
Tags: beginners, ux, uxwriting
Published: 2023-03-04 02:14:46

[Day 1](https://dev.to/fuwa/daily-ux-writing-challenge-day-1-50la) | [Day 2](https://dev.to/fuwa/daily-ux-writing-challenge-day-2-4d6p) | [Day 3](https://dev.to/fuwa/daily-ux-writing-challenge-day-3-3cog)


![Scenario: A user is in their favorite supermarket. They open the supermarket’s app on their phone to see what’s on sale and are greeted by a promotion.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w11n2l3iu00pzk4yi6ab.png)

Had a bit of trouble with this one as I wasn't too sure what the tone of voice should be, I might redo this one after a bit of research but got a 15hr shift at work tomorrow so I need to get to sleep. 


How I came up with my solution:
Made the header short and clear - straight to the point without revealing the flat fee so that when the user reads it they will want to find out more.
The body I emphasized on the delivery fee being a flat rate twice since the scenario mentions the user being a person who went on the app to check for sales, so they are someone who's sensitive to price. 
Finally, the CTAs. I learnt that one way to make a user click on what you want is to give them a single option but make it seem like it's a choice (I feel like this is copywriting territory). You either choose the promo or never see it again. 
Thinking about it now I feel 'No, Thank you' might be better…
Learn with me C# and .NET Lesson Review
Published: 2023-03-07 22:56:27

This is a review from my Day 1 studies of C# and .NET. If you missed the last post with the objectives and resources check it out here ➡️ https://dev.to/melissapw/learning-c-and-net-10ce. 

**What is a programming language?**

_Programming languages like C# let you write instructions that you want the computer to carry out._

- The purpose of a _programming language_ is just like any other language such as English, Mandarin, Spanish, etc. it is way for a computer to understand a human. Programming languages allows humans to communicate to computers in a way humans can read and understand. 

- Instructions you write in a programming language are called **source code or code**.

- The computer can’t understand the code until it is compiled into a format that the computer understands.

- A **complier** acts as a bridge for translating human readable instructions into computer-understandable instructions. 

**What is Syntax?**
**Syntax** are the rules for writing code. 
Just like our language has rules for punctuation, sentence structure, etc, computer languages has rules too.
The rules define keywords, operators, and  their combination to form programs. 

**First line of code review**
Console.Write.Line(“Hello World!”);
____________________⬆️
The text in the quotes are called a **literal string**. Which means it is literally what you want sent to the output.

Console.Write.Line(“Hello World!”);
__⬆️ 
The Console part is called a **class**.  

**Classes** are a way to represent an object.  Methods live inside of classes and to target it you must know which class it is in. 

The . separates the class name _(Console)_ and the method_( WriteLine()_ ).

The . is a **member access operator**. It is how you navigate from the class to its methods.

The _WriteLine()_ part is called a **method**.
You can distinguish the methods because they will always have a set of  parentheses() which are known as **method invocation operator**. So to invoke your method you must have the (). 

Some methods need input parameters and some don’t. 

The ; semicolon is the **end of statement operator**; and tells the complier you’ve finished the command. A **statement** is a complete instruction.
Deploying Next.js apps to Netlify
Tags: nextjs, hosting, netlify
Published: 2023-03-07 22:44:46

---
title: Deploying Next.js apps to Netlify
published: true
tags: ['nextjs', 'hosting', 'netlify']
canonical_url: https://sevic.dev/nextjs-deployment-netlify/
---

This post covers the main notes for deploying to Netlify and domain setup.

### Prerequisites

- Next.js app bootstrapped

### Deployment

Add a new site, import the Git repository, set up environment variables, and trigger the deployment.

The deployed project will be available at the `<PROJECT_NAME>.netlify.app` URL.

The deployment happens every time new changes are pushed to the production branch.

Preview will be available for every pull request commit.

### DNS setup

A purchased domain is needed. You can buy it at [Namecheap](https://namecheap.com/) website.

Add a domain at the Site settings &rarr; Domain management &rarr; Domains page.

Go to Account &rarr; Dashboard &rarr; Manage &rarr; Advanced DNS page for the purchased domain on the Namecheap website. Create two records
- `A` record with `@` host to point to Netlify server IP address with the specified value (`75.2.60.5`)
- `CNAME` record with `www` host to point to Netlify load balancer with the specified value (`apex-loadbalancer.netlify.com`)

It might take some time for the changes to apply.

### Boilerplate

Here is the [link](https://sevic.dev/nextjs-starter?ref=devto) to the boilerplate I use for the development.
Announcing the First Release Candidate of HydePHP: A Laravel-Based Static Site Generator
Tags: hydephp, php, laravel
Published: 2023-03-07 22:36:32

## Release Announcement 

We're excited to announce the first release candidate of HydePHP, a Laravel-based static site generator! HydePHP is a powerful and flexible tool that allows you to build static websites with ease, using the familiar syntax and functionality of the Laravel framework.

### What is HydePHP?

HydePHP is a static site generator that is built on top of Laravel, one of the most popular PHP frameworks out there. This means that if you're already familiar with Laravel, you'll find HydePHP to be very intuitive and easy to use.

### Release Candidate

With this release, we're one step closer to the first stable version of HydePHP. We encourage you to try out this release candidate and provide any feedback you may have, so that we can continue to improve the tool and make it even better.

### How to Install

To get started with HydePHP, you can install it using Composer with the following command:

```bash
composer create-project hyde/hyde --stability RC
```

### First Stable Release

We're planning to release the first stable version of HydePHP exactly one week from now, on March 14th, 2023. In the meantime, please give this release candidate a try and let us know what you think. Thanks for your support, and happy building!

### More Information

You can also visit our website at [HydePHP.com](https://hydephp.com/) for more information, or follow us on Twitter at [@HydeFramework](https://twitter.com/HydeFramework) for updates and news.


_Disclaimer: We would like to clarify that HydePHP is an independent open-source project and is not affiliated with or endorsed by Laravel or its creators._
How to compress a large video without losing quality using FFmpeg with Termux
Tags: video, beginners, tutorial
Published: 2023-03-07 22:13:14

Here is the Video Tutorial if you don't like reading.

https://m.youtube.com/watch?v=w4Hz0Kh0NXE&feature=youtu.be

If you are a content creator like me you will understand the pain and data it takes to upload 1GB of video which is probably about 20 minutes long or so. 
You usually get this problem if you are recording on a device with a high refresh rate.

I have been searching all through the internet for a perfect solution that will be able to compress some of the video content which I create for YouTube without losing quality and alas, I was able to bump into ffmpeg.

With this tool, I was able to compress a 250mb video to just 14mb!! 
Without losing quality and fast too! So let's get started.

**What is ffmpeg?**

FFmpeg is an open-source video and audio editor tool that can cut, chop, join, mux, and transcode almost any media format.

It is also a very reliable method of performing automated video processing.

**Prerequisites**

To get started you need to have the following:

- An android phone (Android 10 and above)
- Termux App

**Installing termux**

Termux is an application that allows you to run Linux commands and applications on your smartphone without needing to install a Linux distro. It contains lots of features which you will find interesting.

To download termux follow this [link](https://f-droid.org/en/packages/com.termux/).
Download and install the app on your phone and then run the below commands.

`pkg upgrade`

To install ffmpeg, run:

`pkg install ffmpeg`

A storage access permission is required for Termux in order for it to be able to access shared storage (such as /sdcard or /storage/emulated/0). Since it is not required for the program to operate normally, access to it is not provided automatically, and the user is not prompted to authorize it when the application is started.

Now, grant permission to Termux to access your storage device by running.

`termux-setup-storage`

Next, navigate into the folder that has your large video file which you want to compress.

`$ cd storage/shared/AzRecorderFree/`

Then run the below command:

`ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4`


Replace "input.mp4" with the name of your large video file.
You can also replace the output name with something else, doesn't matter.

It will take a couple of minutes for FFmpeg to run the conversion. 

Enjoy.
Drupal 10 Poll Module | 2023
Tags: webdev, php, tutorial, beginners
Published: 2023-03-07 22:08:46

{% embed https://youtu.be/Rz1yJA1HSIA %}

The Poll module at https://www.drupal.org/project/poll is great but doesn't work with Drupal 10 unless you use the 8.x-1.x-dev version.

Watch as I walk through creating a poll and explain every step.
How to find what changed between two Phoenix versions
Tags: elixir, phoenix
Published: 2023-03-07 21:46:36

**TL;DR:** Just use [Phoenix Diff](https://www.phoenixdiff.org/).

---

[Phoenix generators](https://hexdocs.pm/phoenix/mix_tasks.html) are great and flexible because they don't have any magic into it. You can easily change the generated code. However, this flexibility comes with a price: When something changes, it can be hard to find out what you need to change in your generated code as well.

As someone new to Elixir & Phoenix, that's an issue I'm often facing - and so is [Greg Coladarci](https://elixirforum.com/u/coladarci), who [posted about this on the Elixir Forum](https://elixirforum.com/t/the-future-of-upgrading-phoenix-liveview-apps-with-generated-code/54404).

That's how I found out about [Phoenix Diff](https://www.phoenixdiff.org/), a tool created by [Navin Peiris](https://github.com/navinpeiris) and maintained by [Aaron Renner](https://github.com/aaronrenner). Thank you, [Matt Jones](https://elixirforum.com/u/al2o3cr/summary), for the [tip](https://elixirforum.com/t/the-future-of-upgrading-phoenix-liveview-apps-with-generated-code/54404/3)!
Analyze Video and Extract Data using Amazon Rekognition
Tags: aws, cloud, awscommunity, 100daysofcloud
Published: 2023-03-07 21:20:39

[66/100] #100DaysOfCloud Today, I analyzed a sample video and extracted metadata using Amazon Rekognition.

Amazon Rekognition Video is an API that you can use to analyze videos. With Amazon Rekognition Video, you can detect labels, faces, people, celebrities, and adult (suggestive and explicit) content in videos that are stored in an Amazon Simple Storage Service (Amazon S3) bucket. You can use Amazon Rekognition Video in categories such as media/entertainment and public safety. Previously, scanning videos for objects or people would have taken many hours of error-prone viewing by a human being. Amazon Rekognition Video automates the detection of items and when they occur throughout a video.

As a developer, the automatic metadata from video footage can be used in applications to improve marketing and advertising efforts, create a searchable video library, or set up sports tracking to provide rich analytics for sport games.

You can try do it by yourself by following the steps from the link below: [GitHub](https://github.com/aaditunni/100DaysOfCloud/blob/main/Journey/066/Readme.md)
Presentazione
Tags: nestjs
Published: 2023-03-07 21:10:44

NestJS è un framework back-end versatile utilizzato nello sviluppo e production ready, utilizza Typescript per la scrittura del suo codice.

Production ready: Ovvero da traduzione pronto per la messa in produzione,  sono dei framework che preparano  sia scaffolding che  tutto ciò che ti serve in modo che alla fine dello sviluppo puoi caricare direttamente in produzione.

Typescript: Un linguaggio che non è un linguaggio ma un integrazione del linguaggio Javascript es6... esnext portando novità la più importante la tipizzazione delle variabili e altre  che succede spesso che vengono prese in considerazione dalla Ecmascript società che si occupa dei rilasci delle versioni di Javascript nelle vesioni aggiornate e integrazioni dello stesso.

Struttura del progetto


- node_modules ( cartella dove sono contenuti i moduli di nodejs )
- src ( cartella dove sono contenuti i file dell'app )
	- app.controller.spec.ts ( tutti i file che hanno il .spec non sono altro che file di test di codice )
	- app.controller.ts ( controller dell'app )
	- app.module.ts ( modulo  app )
	- app.service.ts  ( service app )
	- main.ts ( file di bootstrap dell'applicazione ) 
- test ( cartella dove sono contenuti i test e2e )
- .eslintrc.js ( file di lint per il codice )
- .gitignore ( file dove sono scritti tutti i file o cartelle da ignorare nel repository )
- nest-cli.json ( file di configurazione cli di nestjs )
- package.json ( file dove sono contenute tutte le dipendenza di nodejs )
- README.md ( file di markdown per git [scrivi qui le info dell'app ] )
- tsconfig.build.json ( file di build d json )
- tsconfig.json ( file di configurazione di typescript )
- yarn.lock ( solo se hai scelto di usare yarn e non npm per l'installazione )
Rails Routing for Dummies (and geniuses, too!)
Published: 2023-03-07 21:01:43

The big selling point for using Ruby on Rails is that Rails makes it more convenient to maintain a database of information, right? You might've heard that before if you've been looking into learning Ruby. But How exactly is that ease-of-use created?

Rails works well because it was built on RESTful conventions - meaning, it abides by the standardized names of CRUD action methods. To be fully clear, those are: #index and #show, which display all instances of the model and display a single instance of the model respectively; #create, which creates a new instance; #update and #edit, which alter the attributes of a single instance; and #destroy, which deletes an instance of the model. By using the rails generator in the terminal, you can basically create a new resource that already conforms to restful guidelines. It works like this:

    $rails g resource User first_name last_name email image 
    website

This will generate a new resource, User, with its RESTful routes model, and migration already defined. Check the "/config/routes.rb" path to see that the routes are defined there using the resources method. It doesn't explicitly mention them, but they're working behind the scenes for sure. It's definitely a powerful tool! To see all of the restful routes available to you, just type in the terminal as follows:

    $rails routes

and the terminal output will give you every available route that you can use for the models you've generated.  One thing we don't want to do, however, is create any unnecessary routes. Certain models should only be able to perform certain actions, right? If we automatically enable every new model to perform all of the CRUD actions, then that can possibly become a security risk in the future. The way that we prevent this from happening is to use the keyword "only" within the routes file.

    resources: User, only: [:index, :show, :create, :destroy]

With this specified in the routes file, if you decide to take a second look at the rails routes, you'll see things have changed: now, only the routes we've explicitly mentioned in the routes file are included. This gives us greater control over which CRUD actions each model is able to perform.
#DEVDiscuss: CI/CD Pipelines
Tags: devdiscuss, devops, cloud
Published: 2023-03-07 20:59:35

*image created by [Margaux Peltat](https://www.patreon.com/margauxpeltat) for the [Chilled Cow YouTube channel](https://www.youtube.com/watch?v=lTRiuFIWV54)*

Time for #DEVDiscuss — right here on DEV 😎

{% embed https://dev.to/pavanbelagatti/learn-how-to-setup-a-cicd-pipeline-from-scratch-for-a-go-application-4m69 %}

Inspired by @pavanbelagatti's [Top 7](https://dev.to/devteam/top-7-featured-dev-posts-from-the-past-week-4964) post, tonight’s topic is...Continuous Integration and Continuous Delivery/Deployment (CI/CD) pipelines 🔁



---

Questions:
- **In your opinion, what are the pros and cons of using CI/CD in development?**
- **Which tools are you using for CI/CD?**
- **How is your pipeline set up? How could it be improved or simplified?**
- **Any triumphs, fails, or other stories you'd like to share on this topic?**
How To Create A Mobile App Using Vite, Vue and Ionic Capacitor In 8 Minutes Including Explanation
Tags: ionic, vite, vue, mobile
Published: 2023-03-07 20:18:50

_This is now the 3rd or 4th blog/video I have done on this and i think it gets easier each time!!_

> [**All Videos Related to This Series**](https://www.youtube.com/playlist?list=PL2PY2-9rsgl1qJS3CBrbJxmbLBDBa2E1x)

[Capacitor](https://capacitorjs.com/) is an open-source native runtime for building Web Native apps. Create cross-platform iOS, Android, and Progressive Web Apps with JavaScript, HTML, and CSS.

[Vite](https://vitejs.dev/) is a build tool that aims to provide a faster and leaner development experience for modern web projects. It consists of two major parts:

In 8 minutes I explain how to create a vue js project with vite and convert it to a mobile application and deploy it to a simulator with live-reload for an efficient development process.

{% youtube K_OwSHPxT-A  %}

You can create your mobile application without using Ionic Framework Components so that is not included in this process, but leave a comment below if it is something you would like to see. 

Also, this same process should work with ReactJS and ViteJS

### Note
99.99% of this was done using the Ionic VS Code Plugin but there was an edit to the `package.json` file that was needed to get [live-reload](https://capacitorjs.com/docs/guides/live-reload) working.

Live Reload is useful for debugging both the web portion of an app as well as native functionality on device hardware or simulators. Rather than deploy a new native binary every time you make a code change, it reloads the browser (or Web View) when changes in the app are detected. - _from capacitor website_


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

line 11 previously said `npm run dev`


### Links
- Ionic Capacitor - https://capacitorjs.com/
- Vite - https://vitejs.dev/
- Ionic VS Code Plugin - https://marketplace.visualstudio.com/items?itemName=ionic.ionic