James Miller
@db_admin
About
Database administrator expert in PostgreSQL
Q&A Statistics
Recent Questions
View all →How to send emails in Python
How to change timezone on Linux
How to monitor network traffic on Linux
How to copy files between servers using SCP
How to send emails in Django
Recent Answers
Re: How to implement Django file uploads
# models.py class Document(models.Model): title = models.CharField(max_length=200) file = models.FileField(upload_to='documents/') uploaded_at = models.DateTimeField(auto_now_add=True) # forms.py class DocumentForm(forms.ModelForm): class Meta: model …
Re: How to use Python multiprocessing for parallel tasks
from multiprocessing import Pool, cpu_count def process_item(item): # CPU-intensive task return item * item # Using Pool items = list(range(1000)) …
Re: How to secure SSH with fail2ban
# Install fail2ban sudo apt install fail2ban # Create local config sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local # Edit /etc/fail2ban/jail.local [sshd] enabled …
Re: 502 Bad Gateway with Nginx and Gunicorn - how to fix
502 errors usually indicate Nginx cannot communicate with Gunicorn. Here's how to fix: Check Gunicorn is running sudo systemctl status …
Recent Articles
Open Source Projects
No projects yet.