Rotina de emissão automática de notas fiscais.
As notas fiscais podem ser emitidas automáticamente pelo sistema conforme as receitas desde que cumpram os requisitos para a emissão automática listados abaixo.
Rotina de emissão automática de notas fiscais.
As notas fiscais podem ser emitidas automáticamente pelo sistema conforme as receitas desde que cumpram os requisitos para a emissão automática listados abaixo.
Nome: Eco Launch Inspiração: Angry Birds e Cut the Rope
Objetivo: Salvar animais de uma floresta poluída, lançando sementes que regeneram o ambiente e libertam os bichos presos.
Ideia: Um puzzle ecológico que combina física, estratégia e conscientização ambiental.
| #!/usr/bin/env bash | |
| # | |
| # Script para criar um usuário no Ubuntu e configurar o diretório HOME | |
| # Autor: Thiago Zilli Sarmento | |
| # Uso: | |
| # sudo ./create_user_with_home.sh <nome_usuario> [grupo_adicional] | |
| # | |
| # Exemplo: | |
| # sudo ./create_user_with_home.sh asapadm sudo | |
| # |
Este guia mostra como permitir que o usuário thiagozs execute o freshclam sem precisar de permissões de root, corrigindo o erro:
ERROR: Failed to open log file /var/log/clamav/freshclam.log: Permission denied
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
ERROR: initialize: libfreshclam init failed.
ERROR: Initialization error!
| .PHONY: help | |
| ## ENVIRONMENT VARIABLES | |
| VERSION_FILE = release-candidate.txt | |
| SEMVER ?= 0.1.0 | |
| CURRENT_VERSION := $(shell [ -f $(VERSION_FILE) ] && cat $(VERSION_FILE) || echo $(SEMVER)) | |
| # Self-Documented Makefile | |
| # https://marmelab.com/blog/2016/02/29/auto-documented-makefile.html | |
| help: | |
| @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' |
| package dynscan | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "reflect" | |
| "strings" | |
| "time" | |
| "github.com/google/uuid" |
These days Linux supports a lot of devices. However, occasionally you will find a device that works but only for a while, requiring a reboot to work again. This is often due to the device itself not behaving according to the USB standard, and that's more often than not caused by misbehaving USB suspend.
The proper way of fixing this would be either a workaround in the driver or, God forbid, a fix in the device's firmware. But quite often nobody does anything, so what's left is to do the improper. And the easiest improper fix is to disable USB autosuspend.
For the command line, just add usbcore.autosuspend=-1 to GRUB_CMDLINE_LINUX_DEFAULT:
sudo sed -i 's/GRUB_CMDLINE_LINUX_DEFAULT="[a-z ]*/& usbcore.autosuspend=-1/' /etc/default/grub| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <!-- FONTS --> | |
| <link rel="preconnect" href="https://fonts.googleapis.com"> | |
| <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| package main | |
| import "fmt" | |
| func solution (seconds int) string { | |
| if seconds == 0 { | |
| return "now" | |
| } |