Skip to content

Instantly share code, notes, and snippets.

View eder-projetos-dev's full-sized avatar

Éder Luís Britto Garcia eder-projetos-dev

View GitHub Profile
@eder-projetos-dev
eder-projetos-dev / test_html.py
Last active February 10, 2023 12:45 — forked from marcoscastro/test_html.py
Python - Gerando arquivo HTML5 com acentuação correta no Linux e no Windows
import datetime as dt
agora = dt.datetime.now()
data = agora.strftime("%d-%m-%Y")
hora = agora.strftime("%H:%M")
codigo_html = f'''
<!DOCTYPE html>
<html>
<head>
@eder-projetos-dev
eder-projetos-dev / exemplo-css-interno.html
Last active February 12, 2023 13:37
CSS - Estilizando margens, background-color e títulos. Utilizando css interno com a tag style.
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<style type="text/css">
body {
background-color: rgb(245, 245, 245);
margin-top: 5%;
margin-left: 5%;
margin-right: 5%;
}
@eder-projetos-dev
eder-projetos-dev / gist:a9b90791467df80755610e37c52a793a
Last active February 14, 2023 11:14
PHP - Valores de escape "Content-type: text/plain"
<?php
header("Content-type: text/plain");
// pular linha
echo "Isso aqui vai ficar na primeira linha \n E isso na segunda linha \n";
// Tab
echo "Testando o tab \t aqui \n";
<?php
$nome = "Apuleio";
// %s -> string
printf("O nome é %s <br>", $nome);
// %d -> int
@eder-projetos-dev
eder-projetos-dev / pip_install_debian.txt
Last active February 22, 2023 21:06
Python - Instalação do PIP no Debian 11
sudo apt install python3-pip
python3 -m pip install --upgrade pip setuptools wheel
pip --version
@eder-projetos-dev
eder-projetos-dev / gist:5f4ea8de8afbce261d45799cfbc32cb5
Created February 24, 2023 13:03
Debian - Criar usuário, trocar senha, adicionar e remover usuário de um grupo
# Criar um novo usuário
sudo useradd -d /home/desenvolvimento -c "Desenvolvimento" desenvolvimento
# Adicionar o usuário desenvolvimento no grupo ftp
sudo usermod -aG ftp desenvolvimento
# Remover usuário desenvolvimento do grupo ftp
sudo gpasswd -d desenvolvimento ftp
# Visualizar grupos em que o usuário está
@eder-projetos-dev
eder-projetos-dev / requisitos-funcionais.html
Last active February 26, 2023 21:02
Análise - Requisitos Funcionais
<!DOCTYPE html>
<html lang="pt-BR">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Requisitos Funcionais</title>
</head>
<body>
@eder-projetos-dev
eder-projetos-dev / gist:4db6bd23191f27f323f4e82bf899af06
Last active February 26, 2023 21:03
Python - Arquivo requirements.txt
# Criar o arquivo requirements com o freeze
pip freeze > requirements.txt
# Instalar as dependências utilizando o requirements
pip install -r requirements.txt
@eder-projetos-dev
eder-projetos-dev / gist:e36cbeb306cc4305aca9b7ceedf2a867
Last active February 26, 2023 21:04
Python - Abrir URL com webbrowser
import webbrowser
webbrowser.open("https://github.com/eder-projetos-dev")
@eder-projetos-dev
eder-projetos-dev / gist:66d589ce77b902045fc198a3a60f6ef2
Last active February 26, 2023 21:05
GIT - How to Checkout/Clone From a Specific Git Commit Id (SHA)
# Checkout From Specific Git Commit ID
git log
# Copy the commit (SHA) id and checkout using the following command.
git checkout 28cd74decb47d8a5294eb59e793cb24a0f242e9e
# You can also use the short form of the SHA ID from the start, as shown below.