Skip to content

Instantly share code, notes, and snippets.

View IvanCampelo22's full-sized avatar
💻
programming all the time

Ivan Campelo IvanCampelo22

💻
programming all the time
View GitHub Profile
@nenodias
nenodias / report_header_example.py
Last active December 20, 2023 13:38
Reportlab example with header
import pdb
from io import BytesIO
from reportlab.lib.pagesizes import letter, A4
from reportlab.platypus import SimpleDocTemplate, Paragraph
from reportlab.lib.styles import getSampleStyleSheet, ParagraphStyle
from reportlab.lib.enums import TA_CENTER
from reportlab.lib.units import inch
from reportlab.pdfgen import canvas
from reportlab.lib.units import mm
from reportlab.pdfbase.pdfmetrics import registerFont
@rene-d
rene-d / colors.py
Last active November 18, 2024 20:40
ANSI color codes in Python
# SGR color constants
# rene-d 2018
class Colors:
""" ANSI color codes """
BLACK = "\033[0;30m"
RED = "\033[0;31m"
GREEN = "\033[0;32m"
BROWN = "\033[0;33m"
BLUE = "\033[0;34m"
@alyleite
alyleite / wsl.md
Last active August 9, 2024 01:45
Failed to connect to bus: Host is down - WSL 2

» sudo systemctl daemon-reload

System has not been booted with systemd as init system (PID 1). Can't operate. Failed to connect to bus: Host is down

==============================================

Edit*

  1. Open /etc/wsl.conf with any editor: