Skip to content

Instantly share code, notes, and snippets.

View Baccega's full-sized avatar

Sandro Baccega Baccega

View GitHub Profile
@Baccega
Baccega / calculateDistancesFromCoordinates.js
Created January 24, 2025 18:04
This script will calculate the distances from a list of locations with coordinates to a reference point of choice. In my case it's from any comune in Veneto to my family's shop
// Reference coordinates
const referencePoint = { lat: 45.61875, lon: 11.84679 };
// List of coordinates with their names
const locations = [
{ name: "Annone Veneto", lat: 45.794099, lon: 12.683527 },
{ name: "Campagna Lupia", lat: 45.355824, lon: 12.096281 },
{ name: "Campolongo Maggiore", lat: 45.322842, lon: 12.0450839 },
{ name: "Camponogara", lat: 45.383409, lon: 12.072398 },
{ name: "Caorle", lat: 45.5948518, lon: 12.8707962 },
@Baccega
Baccega / tasks.json
Last active March 8, 2024 15:51
This are my custom vscode tasks
{
"version": "2.0.0",
"tasks": [
{
"label": "Format with IntelliJ",
"type": "shell",
"command": "sh \"/Applications/IntelliJ IDEA.app/Contents/bin/format.sh\" ${file}",
"problemMatcher": [],
"presentation": {
"reveal": "silent",
@Baccega
Baccega / WorkObsidianTemplates.md
Last active September 27, 2024 07:21
This is my work obsidian Daily Note and Task template, It uses the Jira plugin to fetch the jira task's description and title to have a dedicated note for each task

<%* let day = tp.date.now("ddd") if (day !== "Sun" && day !== "Sat") { -%>

💼 Project 1:

  • Daily
    • 15m <%* if (day === "Thu") { -%>
  • Sprint review / SP2 / Backlog refinement
@Baccega
Baccega / image-downloader.js
Created August 8, 2022 13:08
This script automatically downloads images from a list of URLs
// Auto image downloader
// Author: Baccega Sandro
// 1) Fill the constants values: OUTPUT_FOLDER, URLS
// 2) Run using node
const fs = require("fs");
const request = require("request");
const OUTPUT_FOLDER = "output";
@Baccega
Baccega / config.fish
Last active June 5, 2025 09:09
This is my current fish configuration
# My Fish configuration
# Author: Baccega Sandro
# --- Functions replacements
# Extra ls functions using exa
function ls
lsd $argv
end
@Baccega
Baccega / iterm-dropdown.json
Created June 7, 2022 09:41
My current iTerm custom profile
{
"Working Directory" : "\/Users\/sbg",
"Prompt Before Closing 2" : false,
"Selected Text Color" : {
"Red Component" : 0.19215686619281769,
"Color Space" : "sRGB",
"Blue Component" : 0.23137255012989044,
"Alpha Component" : 1,
"Green Component" : 0.21176470816135406
},
@Baccega
Baccega / starship.toml
Last active June 5, 2025 09:09
This is my current starship configuration.
# My starship configuration
# Author: Baccega Sandro
command_timeout = 10000
[python]
detect_extensions = ["py", "ipynb"]
# Using custom conda module that activates only in python repositories
[conda]
@Baccega
Baccega / autoIndexersImporter.js
Last active June 21, 2025 17:17
This script allows you to automatically import indexers from your Jackett server to your Sonarr or Radarr instance.
// Auto indexers importer from Jackett to Sonarr/Radarr
// Author: Baccega Sandro
// 1) Fill the constants values: JACKETT_API_KEY, SONARR_RADARR_API_KEY, JACKETT_CONFIG
// 2) Copy this code and run it on Sonarr/Radarr's a browser window's console
(async function () {
const JACKETT_HOST_PORT = "PUT_JACKETT_HOST_PORT"; // Example: 192.168.1.10:9117
const JACKETT_API_KEY = "PUT_JACKETT_API_KEY_HERE";