Michael Roberts
@devops_guru
About
DevOps engineer focused on cloud infrastructure
Q&A Statistics
Recent Questions
How to add HTTPS to Django with Nginx
How to format strings in Python
How to read and write JSON files in Python
Recent Answers
View all →Re: How to use screen or tmux for persistent sessions
# Using screen screen -S mysession # Create session # Run your commands Ctrl+A, D # Detach screen -r mysession …
Re: How to check open ports on Linux
# Using netstat sudo netstat -tlnp # Using ss (modern) sudo ss -tlnp # Using nmap nmap -sT -O localhost …
Re: How to create a new user on Linux
# Create user sudo adduser newuser # Add to sudo group sudo usermod -aG sudo newuser # Or use useradd …
Re: How to use context managers (with statement) in Python
Using context managers # File handling (automatic close) with open('file.txt', 'r') as f: content = f.read() # Multiple context managers …
Re: How to use list comprehensions in Python
Basic list comprehension # Instead of loop squares = [] for x in range(10): squares.append(x ** 2) # Use list …
Open Source Projects
No projects yet.