Skip to content

Instantly share code, notes, and snippets.

barseghyanartur / Copy_protected_DVD_on_Linux.rst
Created June 4, 2024 23:33
Copy protected DVD on Linux

Copy protected DVD on Linux

Identify the volume size

Identify the volume size as follows:

barseghyanartur / Install PyQt5 on Ubuntu with python3 .md
Created May 30, 2024 09:25 — forked from IoTeacher/Install PyQt5 on Ubuntu with python3 .md
Install PyQt5 on Ubuntu with python3. Steps to set up PyQt5 (ubuntu). With python code generation

Instalación en Ubuntu

pip3 install --user pyqt5  
sudo apt-get install python3-pyqt5  
sudo apt-get install pyqt5-dev-tools
sudo apt-get install qttools5-dev-tools

Configurarlo en la terminal

barseghyanartur / open_sublime_text_from_terminal.rst
Last active February 7, 2024 08:55
Open SublimeText from macOs terminal the same way you would do it on Linux

Open SublimeText from macOs terminal the same way you would do it on Linux

  1. Create a sym-link:

    ln -s "/Applications/Sublime" /Users/me/.local/bin/subl
barseghyanartur / docker_macos.rst
Last active February 12, 2024 08:37
Docker on macOs

Install Docker and Docker-Compose on macOs

barseghyanartur /
Created December 21, 2023 11:34 — forked from SehgalDivij/
Middleware in django to log all requests and responses(Inspired by another Github gist I cannot find the link to, now)
Middleware to log all requests and responses.
Uses a logger configured by the name of django.request
to log all requests and responses according to configuration
specified for django.request.
# import json
import logging
from django.utils.deprecation import MiddlewareMixin
barseghyanartur /
Created December 12, 2023 13:27 — forked from cheind/
cross platform pip-compile helper
import argparse
import platform
import sys
import subprocess
from pathlib import Path
def describe() -> dict:
meta = {
"python": "py" + ".".join(platform.python_version_tuple()[:2]),
barseghyanartur / caddy.rst
Last active November 13, 2023 09:06
Caddy proxy



sudo snap install caddy --edge
barseghyanartur /
Last active June 22, 2023 07:47
Create a PDF with 500 pages using `faker-file`
from faker import Faker
from faker_file.base import DynamicTemplate
from faker_file.providers.pdf_file import PdfFileProvider
from faker_file.providers.pdf_file.generators import reportlab_generator
from reportlab.lib.styles import getSampleStyleSheet
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.platypus import PageBreak, Paragraph
FAKER = Faker()
barseghyanartur /
Created February 22, 2023 07:54
Rock, paper, scissors game in Python
import random
__title__ = "rock_paper_scissors"
__version__ = "0.1"
barseghyanartur /
Last active February 16, 2023 08:06
Install Vera font on Linux