teleren/devto huggingface dataset:
Continuous Integration doesn't work for mobile, because...
Tags: continuousintegratio, continuousdeployment, mobileapplicatoins
Published: 2022-09-11 08:49:48

---
title: Continuous Integration doesn't work for mobile, because...
published: true
date: 2022-03-18 00:00:00 UTC
tags: continuousintegratio,continuousdeployment,continuousintegratio,mobileapplicatoins
canonical_url: https://jhall.io/archive/2022/03/18/continuous-integration-doesnt-work-for-mobile-because.../
---

Yesterday I read these remarks, written by someone who had recently been introduced to “Continuous Integration”:

> Continuous Integration is pretty nice, but it’s not a one-size-fits-all solution. For example, in the mobile application domain, it’s not a solution at all because:
> 
> 1. Typical public app delivery is controlled by the vendor’s app store (Apple or Google)
> 2. Many users don’t like automatic updates
> 3. Daily updates are annoying, even if enabled.

These are all good points… except for one thing: **None of these things relate to Continuous Integration!**

They are, however, excellent reasons not to do Continous Deployment, which is a separate practice, that builds upon the practice of [Continuous Integration](https://jhall.io/whatisci/). This is actually the 8th reason (of 10) in my list of [10 Reasons Not To Use Continuous Deployment (And Why Most of Them Are Wrong)](https://jhall.io/nocd/).

* * *
_If you enjoyed this message, [subscribe](https://jhall.io/daily) to <u>The Daily Commit</u> to get future messages to your inbox._
Azure Policy - Trigger policy scan
Tags: azure, policy
Published: 2023-09-13 15:40:55

---
title: Azure Policy - Trigger policy scan
published: true
date: 2022-03-18 00:00:00 UTC
tags: Azure,Policy
canonical_url: 
---

When you create your own Azure Policies, it can be tedious to test them, as the evaluation is triggered by Azure.

It has been possible for some time to force its execution on the scope of a resource group or a subscription. Even if in our case, it is more about forcing on a test resource group than on a subscription in order not to impact your other policies.

To trigger an evaluation, you can use a PowerShell command like this:

```
# Subscription scope
Start-AzPolicyComplianceScan -AsJob

#Resource Group Scope
Start-AzPolicyComplianceScan -ResourceGroupName $rgName -AsJob

```

You can run without a Powershell Job, but the operation is very long, it’s why i recommend usage of Powershell Job in a development scenario

It is possible to do this also with a REST API

To do this, you need to use the following urls:

Subscription: **https://management.azure.com/subscriptions/{subscriptionId}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation?api-version=2019-10-01** Resource Group: **https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{YourRG}/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation?api-version=2019-10-01**

```
$token = Get-AzAccessToken
$authHeader = @{
    'Content-Type'='application/json'
    'Authorization'='Bearer ' + $token.Token
}

$subscriptionId = ""
$resourceGroup = ""

$restUrl = "https://management.azure.com/subscriptions/$subscriptionId/resourceGroups/$resourceGroup/providers/Microsoft.PolicyInsights/policyStates/latest/triggerEvaluation?api-version=2018-07-01-preview"

 Invoke-WebRequest -Uri $restUrl -Method POST -Headers $authHeader

```

And you will find this trace in your Activity Log:

![](https://woivre.com/images/2022/03/18/azure-policy-trigger-policy-scan-img0.png)

So no more excuses to take a coffee while waiting for the policy to be triggered.
Day 552 : Mega
Tags: hiphop, code, coding, lifelongdev
Published: 2022-03-17 23:59:31

_liner notes_:
- Professional : So many meetings today. Good thing I got a bunch of stuff done yesterday. I also did some stuff for my upcoming trip.

- Personal : So, last night, I created a draft status for the locations of my side project https://dwane.in so that I can work and test stuff without it showing up on the site. Deployed it once I got everything working. I also tested out the setup I wanted to use to conduct multi-camera video interviews. Once again the iPad mini has let me down. I thought I could plug in an audio source into with an adapter into the USB-C port since the device doesn't have an audio jack. Nope. Luckily I got a work around figured out that involves plugging directly into one of the cameras. So I purchased longer audio cables just in case.

![Overhead view of the coast of Haiku-Pauwela, HI, USA with a rocky shore with wave crashing and a field with various shades of green vegetation with a brown mud and dirt road cutting through it with a jeep on the road.](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kwm4v0addot5o3cj5dr5.jpg)

I made a social share image for https://dwane.in so it will show up when a link is shared to Twitter. Going to get that implemented. I also want to test a couple of cameras that I'll be using strapped to my backpack as I walk around to capture regular video as well as 360 video. I still want to test the livestream one more time using my Galaxy Z-Fold 3 since the iPad mini has been a continuous mega disappointment.

Have a great night!

peace piece
Dwane / conshus
https://dwane.io / https://HIPHOPandCODE.com
{% youtube XOKDkBzcD8c %}
O poder das expressões regulares em Python
Tags: python, beginners, regex, programming
Published: 2022-03-17 23:26:58

​​Expressões Regulares são padrões de caracteres que associam sequências de caracteres no texto e são essencialmente uma mini linguagem de programação altamente especializada que podem ser usadas para validar formato de email, senhas, cep, adicionar ou remover partes de uma string, etc. As ​​Expressões Regulares estão incluídas dentro do Python e disponíveis através do módulo ‘[re](https://docs.python.org/pt-br/3/library/re.html#module-re)’.

Neste tutorial irei criar uma simples extração do cep contido em uma string.

Primeiro vamos importar o módulo re:

```
import re
```

Vamos assumir que a variável endereço tem o seguinte valor:

```
endereco = "Avenida Nossa Senhora de Copacabana 558, Copacabana, Rio de Janeiro, RJ, 22020-001"
```

Eu quero extrair desta string que está na variável o CEP. Nós sabemos que o CEP é composto pelo seguinte padrão: `5 dígitos + hífen + 3 dígitos`. Com isso vamos compilar esse padrão utilizando `compile()` do módulo re.

```
padrao = re.compile('[0123456789][0123456789][0123456789][0123456789][0123456789][-]?[0123456789][0123456789][0123456789]')
```

O sinal de `?` indica que o caracter `-` é opcional.

Com o padrão compilado agora podemos verificar se em algum trecho da string existe um combina com o nosso padrão e vamos utilizar o método `search()`.

```
busca = padrao.search(endereco)
```

Em caso de sucesso `search()` retorna o objeto `Match` ou caso não há nenhuma ocorrência do nosso padrão na string retorna `None`. Sendo assim, vamos verificar e extrair string encontrada em nosso padrão compilado que neste caso será a informação do CEP.

```
if busca:
    cep = busca.group()
    print(cep)
```

Uma maneira mais simples e elegante de compilar este mesmo padrão para extrair o CEP pode ser escrita assim:

```
re.compile('[0-9]{5}[-]{0,1}[0-9]{3}')
```

Onde colocamos entre `-` o intervalo, entre `{}` a quantidade ou limites como no caso do hífen.

As Regex pode desempenhar um papel importante na fase de pré-processamento de dados. A biblioteca ‘[re](https://docs.python.org/pt-br/3/library/re.html#module-re)’ fornece várias funções que a tornam uma habilidade que vale a pena dominar. Deixarei aqui alguns links que podem ajudar nesse aprendizado.

https://docs.python.org/pt-br/3/howto/regex.html#regex-howto
https://docs.python.org/pt-br/3/library/re.html#module-re
Contact form without backend using JavaScript 💡
Tags: javascript, webdev, tutorial, html
Published: 2022-03-17 22:33:40

If you are a frontend developer who is not interested in backend development or you didn't start learning it yet (like me) and you want to make contact form working for your portfolio or your product website, this article is for you. 

**Why contact form?** There is a lot of reasons to use it on your website, Contact Forms Look Professional and make you reachable starting from the website instead of waiting for the visitor to contact you in social media that's may he is not active on, and that may probably cause to lose a possible customer. 

---


It's not hard, there are a lot of websites that offer this service all have a free🆓 and premium💸 plan, **how they work?**
Well basically when you sign up and start a form they gonna give you an **URL** to put it inside the action attribute of your form tag
```html
<form
  action="url"
  method="post"
>
 <!-- 
  Important to know ❗❗ 
  you should have:
   - inputs with the name attribute
   - button with type submit
 -->
</form>
```
but they have an annoying thing when the user submits the form they redirect him to another page.

![redirect the user](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/7xbozgkbg2gw2m6towcx.gif)

You feel like you can't control your website, you can customize the redirect page if you're using a premium plan (you cant do it for free with JavaScript 👇) but is recommended to show an alert or label with green color to let the user know that form was submitted.

**So how you do that?**
This is one of the reasons that's pushed me to share this , after some research, I come up with this solution. Give the form just an id property and we gonna working on it with JavaScript. 

⚠ don't forget to give your inputs **name property** 
```javascript
// we add event listener for click on send button
document.querySelector('button').addEventListener('click', (e) => {
  // stop the page from the reloading
  e.preventDefault();
  // selecting the form
  const contactForm = document.querySelector('#form');
  // the gold part 🔥
  let data = new FormData(contactForm);  
  fetch("url", { method: "POST", body: data });
  // inform the user that the form was submitted
  alert('Thank you, your form was submitted.');
  // clear the inputs
  contactForm.reset()
  // or if you want the redirect the user to another page (for free)
  // window.open('./thanks.html');
})
```
⚠ Don't forget to check inputs if valid before sending the email.


And this is a list of website that offer this service:

- [FormBold](https://app.formbold.com) 
- [Formspree](https://formspree.io/)   
- [FORMSUBMIT](https://formsubmit.co/) 

complicated to use :

- [EmailJS](https://www.emailjs.com/)
- [SmtpJS](https://smtpjs.com/)

---

I left this form below to let you test the process before you apply it on your website.  

{% codepen https://codepen.io/zougari47/pen/gOXQewm %}


That's it, I hope you found this article helpful, Thanks for reading.
Quem se sente seguro na internet?
Tags: braziliandevs, tutorial
Published: 2022-03-17 22:04:49

Quem é que se sente segura realizando transações na internet hoje em dia? Eu nem consigo contar nos dedos **a quantidade de pessoas que já sofreram algum tipo de golpe na internet**. Desde produtos que não existem em aplicativos até sites falsos que prometem produtos bem abaixo do preço. Na criatividade em como passar a perna em alguém o céu parece ser o limite. Já que eu não consigo acabar com todo os golpes de uma vez só, eu preciso descobrir como me defender.

Pensei esses dias e conversei com meus clientes sobre como todos que eu atendi neste mês tinham um padrão. Todos, sem excessão já tiveram algum problema com golpes, e de certa forma, lideram de formas diferente com esses traumas. **As pessoas mais jovens já aprenderam a lição, são “mais descoladas” e efetuam suas transações com segurança. Entretanto as pessoas mais velhas ainda se limitam por medo**.

A melhor solução que eu vi para esse tipo de problema é, **formalizar a transação no MEU TEMPO**. Se o vendedor me apressa ou o site coloca limite de tempo para eu finalizar a compra, eu PARO, RESPIRO e só termino a compra quando tenho certeza absoluta de que estou ciente de tudo que envolve aquela transação. Como eu já tenho mais prática com esse tipo de coisa e faço isso com mais frequência, eu concluo mais rápido. Porém quando algo é novo, eu não me permito afobar. (É claro que de vez em quando acontece, mas o importante é continuar tentando.)

Portanto, ao fazer compras, assinatura de contratos ou qualquer coisa que se não houver atenção pode se desdobrar em dor de cabeça, VÁ DEVAGAR, REVISE QUANTAS VEZES FOR NECESSÁRIO, SE SINTA 100% SEGURA, CONHEÇA BEM O QUE ESTÁ FAZENDO. Fazendo isso, **a tranquilidade chega de forma natural, pela confiança em nós mesmos.**
Help with video intercom doorbell
Tags: videointercom
Published: 2022-03-17 22:04:07

Hi I recently got a motorized front sliding gate and high front fence installed. I have been researching which [video intercom doorbell system](https://invictusxp.com/) to have installed but am confused about which brand/company to go with. I heard about many companies but don't know which one is reliable. I would appreciate any advice you can give me. Thanks in advance
Mobile Detect
Tags: mobiledetect, mobile, php
Published: 2022-03-17 21:50:29

Eu fiquei semanas estudando e testando o código PHP da Lib Mobile Detect e finalmente agora está do jeito que eu gostei de usar.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vd32al1ewa66u6ir721a.jpg)
The VAR, LET, and CONST Keywords in JavaScript.
Published: 2022-03-17 21:47:15


JavaScript updates in ES6 introduced use to new ways of declaring variables. As a new JavaScript developer, you have probably wondered about all this. VAR is the original way variables were declared before Ecmascript6 when added LET and CONST. In this piece, I will break them down for you. I will first start by defining some key terms that are associated with variables.

**Hoisting** – This means you can declare a variable before it is initialized.

**Local scope** - means that the declaration can only be used within the block of code it was declared inside.

**Global scope** - This means that the declaration can be used within and without the block, it was declared and initialized in.

**Block** - Code that has been grouped within curly brackets {}.

**Reassign** - To reassign is to change the value of a variable;

**Redeclare** - Writing the same variable with a different matter.
 
Here is a simplified table for your convenience indicating what can and cannot be done on the three of them :


![var screenshot.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1646422722195/isDPJXPeX.png)
Can you build a form in 2022
Tags: webdev, discuss
Published: 2022-03-17 21:39:20

> Me, Thinking out loud

👋 Hello there,

So the other day I was thinking, can one build the ultimate form?

What are the things to consider in an ultimate form?

while brainstorming I came up with the following (assuming its a large form with diverse inputs)

- Accessibility
- Focus control
- Autosave
- Dynamic fields
- Field Arrays
- Validation (basic, Regex)
- Transforms
- Dates controls
- Error management ie displaying error,,,
- Submit try policy/plan

What are tour thoughts?
Best "Code to Image Converter" on web 🧑‍💻
Tags: webdev, programming, productivity, tooling
Published: 2022-03-17 20:29:21

Hi guys 👋,

We, as software developers, like to share over knowledge throughout our network and one of the most frequent way to do it is to share **code screenshots**. For making it more attractive, it is popular to use code to image converters where you can add fancy backgrounds and customize the look of code block. I've developed a free tool on [10015.io](https://10015.io) for converting code blocks into images and it is one of the best on web with many customization options.

🔗 [https://10015.io/tools/code-to-image-converter](https://10015.io/tools/code-to-image-converter)

You can highlight all popular programming languages such as Javascript / Typescript, HTML, CSS, Java, C#, PHP, Python, Go , Kotlin, Swift, Ruby and so on. There are 50 different color themes available and you can select the font family from a list of 25 different monospace fonts. In addition, you can customize background color/image, font size, shadows and set the output image quality according to your needs. Here is a screenshot that is created with [code to image converter](https://10015.io/tools/code-to-image-converter) by 10015.io.

![convert code to image](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qislcsmqp2qmw3fj1j76.png)

I'm working on adding new features like file name, line numbers, personal or corporate branding. If you have any other suggestions about the tool, feel free to comment below.
Blazingly Fast Preview Environments for Temporal on Kubernetes
Tags: temporal, kubernetes, tutorial
Published: 2022-03-17 21:18:37

[Temporal.io](https://temporal.io) is a workflow engine that able to coordinate microservices and can be developed by writing code and we can use its parts over and over again with a modular architecture.

One engineer from [my team](https://www.qovery.com/team) has written [this tutorial](https://hub.qovery.com/guides/tutorial/deploy-temporal-on-kubernetes/) explaining how to deploy multiple environments of [Temporal](https://www.temporal.io) on a Kubernetes cluster This tutorial explains how to get one temporal instance per environment. 

Note: consider using [Temporal namespaces](https://docs.temporal.io/docs/server/namespaces/) if you do not want to spawn a full temporal cluster per environment. 

Happy reading.
Goals for Telescope
Published: 2022-03-17 21:14:03

We only have 2 more releases left till 3.0 and we need to focus on what we need to to be shipped before then.

## Which part of Telescope 3.0 do I own?
- I've had worked on creating different tests where `jest` did not touch on.
- I've worked on the eslint configuration. There are some work left to do and I want to get it done by this week.
- I will also focus on getting the search service.

## Who can I depend on if I need help?
- I can depend on everyone on the team. It is better than to rely on one or two people. 

## What are the risks that I see, which could prevent me from getting this shipped?
- Other than the time, a possible thing that might be preventing me from shipping could be the e2e test not working properly.
Generando datos de prueba rapidamente
Tags: tip, testing, php
Published: 2022-03-17 16:45:00

Durante las pruebas manuales, muchas veces se necesita ingresar datos de prueba en los formularios de los sistemas en los que trabajo. La carga mental de estar programando y probando generalmente afecta el pensar nuevos datos randómicos para datos de pruebas, y lo más fácil es usar datos ya predefinidos como "asdf", "qwerty", "test1", "test2", pero encontré una manera más fácil de generar estos datos.

La práctica que me ha ayudado a agilizar esta parte del  proceso de prueba manual es usar 2 herramientas, la una es un **expansor de texto**, la idea de este tipo de herramientas es minimizar el tipeado de información al usar shortcuts cuando se escribe algo, por ejemplo, si en tus emails siempre saludas o te despides con el mismo texto, puedes configurar al expansor para que al ingresar `:saludo` se auto expanda a `Hola, Te saluda Marcelo` ahorrandote tiempo y energía. Para esta parte uso [espanso](https://espanso.org/) es multiplataforma y muy fácil de instalar y configurar.

Para la segunda parte uso un **generador de datos falsos** [faker](https://fakerphp.github.io/) es una librería de PHP que permite generar datos de prueba, hay librerías simlares para otros lenguajes, pero esta me queda bien porque puedo instalarla como librería global con composer usando `composer global require fakerphp/faker` luego puedo usar directamente en la línea de comandos con: `php -r "require_once '/home/marcelo/.config/composer/vendor/autoload.php'; echo Faker\\Factory::create()->firstName();"` cada vez que ejecuto este comando me da un nuevo primer nombre.

Ahora al unir ambas tengo este tipo de definición en la configuración de espanso:


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

Cada vez que digito `:fn` en cualquier aplicación, se autoexpande a un nombre aleatorio, lo mismo con `:ln` en cualquier aplicación, se autoexpande a un apellido aleatorio, y de igual manera para `:city`, `:state`, `:address`, `:zip`.

Revisando la documentación de faker puedes agregar aún más shortcuts a espanso.
Setup Redis on Laravel project 💡
Tags: productivity, redis, laravel, webdev
Published: 2022-03-17 20:27:36

**DECK** has separate stacks for **Laravel** and **Redis**. So let's look at how we can set it up quickly. 

### First, choose a stack for Laravel
You can select either Nginx-PHP or apache-PHP or Laravel stack, add details like project name, PHP version, and select project path.
Hit save, and now you are done with the Laravel project setup. 🌟


### Second, choose the Redis stack
Enter a project name and hit save. 

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

Start the Redis stack and open the Actions & Insights panel and check the Redis Host and Port, now you are ready to add environment variables in your Laravel project .env file, like `REDIS_HOST`, `REDIS_PASSWORD`, `SESSION_DRIVER`.🎉

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

You can install Redis desktop manager [GUI client] like [AnotherRedisDesktopManager](https://github.com/qishibo/AnotherRedisDesktopManager) to check session data, queues, etc. Just use Host and post from the "Connect using external applications" section.
So the moment of truth 🥳

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


We will love to know your feedback about this quick setup 😊. [Install DECK today](https://get-deck.com) 💜