Skip to content

Instantly share code, notes, and snippets.

View inigohidalgo's full-sized avatar

Iñigo Hidalgo inigohidalgo

View GitHub Profile
from google import genai
from google.genai import types
from PIL import Image
from io import BytesIO
import os
import subprocess
import tempfile
from global_config import global_config
from loguru import logger as log
@inigohidalgo
inigohidalgo / download-vs-code-server.sh
Created June 10, 2023 13:49 — forked from b01/download-vs-code-server.sh
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
set -e
# Auto-Get the latest commit sha via command line.
get_latest_release() {
tag=$(curl --silent "https://api.github.com/repos/${1}/releases/latest" | # Get latest release from GitHub API
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' ) # Pluck JSON value
@inigohidalgo
inigohidalgo / multiple-ssh-keys-git.adoc
Created November 12, 2022 20:15 — forked from alejandro-martin/multiple-ssh-keys-git.adoc
Configure multiple SSH Keys for Git

Use Multiple SSH Keys for Git host websites (Github, Gitlab)

This is guide about how to configure multiple SSH keys for some Git host websites such as Github, Gitlab, among others.

Creating SSH keys

  1. Create SSH directory:

import re
uppercaseRegex = re.compile(r'[A-Z]')
lowercaseRegex = re.compile(r'[a-z]')
numberRegex = re.compile(r'\d')
noSymbolRegex = re.compile(r'^\w*$')
def passwordCheck(programName):
while True: