Skip to content

Instantly share code, notes, and snippets.

View maxwellamaral's full-sized avatar
😀

Maxwell Anderson maxwellamaral

😀
View GitHub Profile
@maxwellamaral
maxwellamaral / .gitlab-ci.yml
Created July 3, 2022 17:45 — forked from Mastermind-U/.gitlab-ci.yml
Django gitlab.ci
image: docker:latest
services:
- docker:dind
stages:
- build
- test
- deploy
@maxwellamaral
maxwellamaral / instructions.md
Created August 2, 2022 23:52 — forked from bubba-h57/instructions.md
Configuring Jetbrains Gateway and WSL

Step 1: SSH Daemon

In your WSL instance, re-install OpenSSH server as follows.

sudo apt remove --purge openssh-server
sudo apt install openssh-server

Edit /etc/ssh/sshd_config (e.g. sudo vi /etc/ssh/sshd_config) and add the following lines to the bottom of the file. Ensure you replace WSL_ACCOUNT_NAME with your WSL2 account name.

@maxwellamaral
maxwellamaral / README.md
Last active August 3, 2022 13:21 — forked from djfdyuruiry/README.md
WSL 2 - Enabling systemd

Enable systemd in WSL 2

This guide will enable systemd to run as normal under WSL 2. This will enable services like microk8s, docker and many more to just work during a WSL session. Note: this was tested on Windows 10 Build 2004, running Ubuntu 20.04 LTS in WSL 2.

  • To enable systemd under WSL we require a tool called systemd-genie

  • Copy the contents of install-sg.sh to a new file /tmp/install-sg.sh:

    cd /tmp
@maxwellamaral
maxwellamaral / google_fit.md
Created September 6, 2022 12:35 — forked from maxwellcc/google_fit.md
Integrando sensores do MiBand Fit ao Home Assistant

Integrando o MiBand Fit ao Home Assistant

Esta integração foi realizada em jul/2022 utilizando o Home Assistant v. 2022.6[^1].

Estas anotações foram criadas baseando-se no post do Google Home Brasil e em Google Calendars

  1. Abra o aplicativo Zepp. Selecione a opção 'Perfil' na parte inferior direita. Selecione a opção 'Adicionar contas' e, depois disto, selecione 'Google Fit' e faça o acesso.
  2. Crie as entradas googlefit_client_id e googlefit_client_secret no seu arquivos secrets.yaml;
  3. Para obter os googlefit_client_id e googlefit_client_secret, deve-se seguir os passos abaixo:
  • Entrar no site do Google Developers Console com a mesma conta utilizada na integração do Google Fit junto ao aplicativo Zepp;
@maxwellamaral
maxwellamaral / readme.md
Created September 6, 2022 12:35 — forked from maxwellcc/readme.md
List of Tuya devices with codes for Home Assistant
@maxwellamaral
maxwellamaral / procedimento.md
Created September 6, 2022 12:36 — forked from maxwellcc/procedimento.md
Erro 'Elemento não encontrado' ao tentar utilizar ou converter uma distro Linux do WSL 1 para o WSL 2.

Erro 'Elemento não encontrado' ao tentar utilizar ou converter uma distro Linux do WSL 1 para o WSL 2.

WslRegisterDistribution failed with error: 0x80070490
Error: 0x80070490 Elemento não encontrado.

Olá! Eu estive um pouco angustiado com esse problema e como eu não encontrei uma solução, eu resolvi tentar por conta própria. Eu estou usando Windows 10 21H2 e esta tentativa foi realizada em 21/05/2022. Eu segui estes passos e obtive sucesso:

  1. Eu desinstalei as distros utilizando o comando > wsl --unregister <Distro>
  2. Eu desinstalei o Docker
@maxwellamaral
maxwellamaral / ha-uninstall.sh
Created September 6, 2022 12:36 — forked from maxwellcc/ha-uninstall.sh
Uninstaller for Home Assistant Supervised on Debian 10/11
#!/usr/bin/env bash
sudo systemctl disable apparmor
sudo systemctl disable hassio-apparmor.service
sudo systemctl disable hassio-supervisor.service
sudo systemctl daemon-reload
sudo systemctl reset-failed
sudo rm /etc/systemd/system/hassio-supervisor.service
sudo rm /etc/systemd/system/hassio-apparmor.service
@maxwellamaral
maxwellamaral / configuration.yaml
Created September 6, 2022 12:36 — forked from maxwellcc/configuration.yaml
Configurando o home assistant para gerenciar o sistema de consumo de energia elétrica
# _ _ _ _ _
# | | | | /\ (_) | | | |
# | |__| | ___ _ __ ___ ___ / \ ___ ___ _ ___| |_ __ _ _ __ | |_
# | __ |/ _ \| '_ ` _ \ / _ \ / /\ \ / __/ __| / __| __/ _` | '_ \| __|
# | | | | (_) | | | | | | __/ / ____ \\__ \__ \ \__ \ || (_| | | | | |_
# |_| |_|\___/|_| |_| |_|\___| /_/ \_\___/___/_|___/\__\__,_|_| |_|\__|
#
# https://www.home-assistant.io/docs/configuration/basic/
# Configure a default setup of Home Assistant (frontend, api, etc)
@maxwellamaral
maxwellamaral / config.html
Created September 6, 2022 12:37 — forked from maxwellcc/config.html
Requerido para evitar erros de validação no crispy quando usar formulários do Django
{% block js %}
<script>
{# Requerido para evitar erros de validação no crispy quando usar formulários do Django #}
$("#id-configForm").attr('novalidate', 'novalidate');
</script>
{% endblock %}
@maxwellamaral
maxwellamaral / remove_all.bat
Created September 6, 2022 12:37 — forked from maxwellcc/remove_all.bat
Apagando tudo no docker
docker ps -a | awk '{print $1}' | xargs docker stop
docker ps -a | awk '{print $1}' | xargs docker rm -f
docker images -a | awk '{print $3}' | xargs docker rmi -f
docker volume ls | awk '{print $2}' | xargs docker volume rm
docker network ls | awk '{print $2}' | xargs docker network rm
docker ps -a
docker images -a
docker volume ls
docker network ls