Skip to content

Instantly share code, notes, and snippets.

View pablodz's full-sized avatar
🤠
9.99x Engineer

Pablo pablodz

🤠
9.99x Engineer
View GitHub Profile
# Add somewhere this line
host all postgres 0.0.0.0/0 md5
sudo service postgresql restart
# First enter a postgres command line
sudo -u postgres psql
# In postgres command line create a standard table
CREATE TABLE conditions (
time TIMESTAMPTZ NOT NULL,
location TEXT NOT NULL,
temperature DOUBLE PRECISION NULL,
humidity DOUBLE PRECISION NULL
);
import psycopg2
import random
import time
host="localhost"
database="your_database_name"
user="your_user"
pwd="your_password"
p="5432" # Default port
# Enter postgres command line
sudo -u postgres psql
ALTER ROLE postgres WITH PASSWORD 'your_password';
\q
# \q to exit postgres command line
# Update apt list package
sudo apt update
# Install apache2
sudo apt install apache2
# Check status
sudo systemctl status apache2
Facultad Enlace
Facultad de Arquitectura y Urbanismo Sin soporte
Facultad de Arte y Diseño Sin soporte
Facultad de Ciencias Contables Sin soporte
Facultad de Ciencias y Artes de la Comunicación Sin soporte
Facultad de Educación Sin soporte
Facultad de Ciencias e Ingeniería Descargar https://bit.ly/3foCIPG
Facultad de Artes Escénicas Sin soporte
Facultad de Ciencias Sociales Sin soporte
Facultad de Letras y Ciencias Humanas Sin soporte
# Enter postgres command line
sudo -u postgres psql -c "ALTER ROLE postgres WITH PASSWORD 'postgres';"
# \q to exit postgres command line
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))