Skip to content

Instantly share code, notes, and snippets.

View diegoquintanav's full-sized avatar
馃悽
Working from home

Diego Quintana diegoquintanav

馃悽
Working from home
View GitHub Profile
@diegoquintanav
diegoquintanav / move_downloads_selenium.py
Last active March 26, 2022 15:13
Move downloaded files to another folder using selenium
from pathlib import Path
import time
# adapted from https://stackoverflow.com/questions/23896625/how-to-change-default-download-folder-while-webdriver-is-running
def move_to_download_folder(
download_dir: Path,
new_destination_dir: Path,
lookup_str: str,
wait_seconds: int = 5,
max_tries: int = 3,
FROM python:3.9
# passed from docker-compose.services.service.env_file
ARG PIPY_USER
ARG PIPY_PASS
ENV PIP_NO_CACHE_DIR off
ENV PIP_DISABLE_PIP_VERSION_CHECK on
ENV PIP_DEFAULT_TIMEOUT 100
ENV POETRY_HOME /opt/poetry
@diegoquintanav
diegoquintanav / README.md
Last active May 15, 2022 19:35
borrador nueva constituci贸n

Borrador nueva constituci贸n 2022

En texto plano para an谩lisis. Descargado de

@diegoquintanav
diegoquintanav / encrypt_secrets.md
Created May 25, 2022 15:46
Encrypt secrets in git

Commiting secrets to git

Don鈥檛

Don鈥檛 commit secrets to github.

Do

  • Use vaults or other systems
  • use environment variables when possible
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
@diegoquintanav
diegoquintanav / Dockerfile
Created September 21, 2022 19:38
docker-compose for lambdalabs machine
from continuumio/miniconda3:latest
RUN mkdir -p /src/notebooks
WORKDIR /src/notebooks
COPY notebooks/environment.yml notebooks/requirements.txt /src/notebooks/
RUN conda env create -f environment.yml
@diegoquintanav
diegoquintanav / instructions-install-eduroam-upc.md
Last active April 8, 2025 11:01
How to connect to eduroam signal using UPC setup

Why

Setting up an eduroam connection using UPC (Universitat Polit猫cnica de Catalunya) instructions was not easy to me. Particularly the dbus part fails silently.

This was tested on Linux Mint 21.1

Steps

  1. Have linux and python installed
  2. Download python script from https://cat.eduroam.org/ at SOME_PATH
@diegoquintanav
diegoquintanav / parse_readme.py
Last active August 28, 2024 11:06
test de prova
import re
from pathlib import Path
import argparse
from typing import Dict, List, Optional
import json
def parse_doc_comments(readme_content: str) -> List[str]:
"""Parse DOC comments in the form <!-- [DOC-*] --> from the README.md content."""
pattern = r"<!--\s*\[\s*(.*?)\s*\]\s*-->"