This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| INSERT INTO config_icon(name, image_mdb) | |
| VALUES ('axis arrow info', 'mdi-axis-arrow-info'), | |
| ('baby buggy', 'mdi-baby-buggy'), | |
| ('beehive off outline', 'mdi-beehive-off-outline'), | |
| ('bell cancel', 'mdi-bell-cancel'), | |
| ('bell cancel outline', 'mdi-bell-cancel-outline'), | |
| ('bell minus', 'mdi-bell-minus'), | |
| ('bell minus outline', 'mdi-bell-minus-outline'), | |
| ('bell remove', 'mdi-bell-remove'), | |
| ('bell remove outline', 'mdi-bell-remove-outline'), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Processa patentes | |
| def get_despachos_patentes_INPI(ip_type, Patent): | |
| if ip_type == 'Patente': | |
| ip_id = Patent.objects.values_list('patent_id', flat=True).filter(active=True) | |
| if ip_id: | |
| for despatch in doc.iterfind('despacho'): | |
| for process in despatch.iterfind('processo-patente'): | |
| number = process.findtext('numero') | |
| if number in ip_id: | |
| qtd_finded += 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def get_actions(self, request): | |
| actions = super().get_actions(request) | |
| if 'delete_selected' in actions: | |
| del actions['delete_selected'] | |
| return actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Person(models.Model): | |
| first_name = models.CharField(max_length=30) | |
| last_name = models.CharField(max_length=30) | |
| age = models.PositiveIntegerField() | |
| def __str__(self): | |
| return self.first_name | |
| class Majority(models.Manager): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- 4. Criar link no template html --> | |
| <p> | |
| <a href="{% url 'blog:post_share' post.id %}">Share this post</a> | |
| </p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| update tabela | |
| set nome = (replace(replace(replace(regexp_replace((initcap(nome)), '[^A-zÀ-ú]', ' ', 'g'),' Do ', ' do '), ' De ', ' de '), ' Da ', ' da ')) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {% 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 %} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # _ _ _ _ _ | |
| # | | | | /\ (_) | | | | | |
| # | |__| | ___ _ __ ___ ___ / \ ___ ___ _ ___| |_ __ _ _ __ | |_ | |
| # | __ |/ _ \| '_ ` _ \ / _ \ / /\ \ / __/ __| / __| __/ _` | '_ \| __| | |
| # | | | | (_) | | | | | | __/ / ____ \\__ \__ \ \__ \ || (_| | | | | |_ | |
| # |_| |_|\___/|_| |_| |_|\___| /_/ \_\___/___/_|___/\__\__,_|_| |_|\__| | |
| # | |
| # https://www.home-assistant.io/docs/configuration/basic/ | |
| # Configure a default setup of Home Assistant (frontend, api, etc) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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 |