Skip to content

Instantly share code, notes, and snippets.

View pg-goose's full-sized avatar
💭
Trying 🦆

aGoose pg-goose

💭
Trying 🦆
  • Piveu MedTech
  • Barcelona
View GitHub Profile
@pg-goose
pg-goose / sveltekit_prune.sh
Last active January 19, 2025 14:04
Detect and remove (if confirmed) unused .svelte files on a sveltekit project.
#!/bin/bash
# ANSI color codes
RED='\033[0;31m'
GREEN='\033[0;32m'
NC='\033[0m' # No Color
# get the list of all .svelte files
svelte_files=$(find src -type f -name "*.svelte")
@pg-goose
pg-goose / autoinstall.yml
Last active June 5, 2024 15:42
Ubuntu Noble autoinstall
autoinstall:
version: 1
source:
id: ubuntu-desktop-minimal
interactive-sections:
- network
- locale
- keyboard
- storage
timezone: Europe/Madrid
@pg-goose
pg-goose / download-image.py
Created November 29, 2020 11:05
Download image by URL [python | requests | wget]
import requests
import shutil
#Setting URL and image name
image_url = "##########URL TO DOWNLOAD"##########"
filename = image_url.split("/")[-1]
# Open the url image, set stream to True, this will return the stream content.
r = requests.get(image_url, stream = True)