Skip to content

Instantly share code, notes, and snippets.

View andcl's full-sized avatar

Andrés andcl

  • Spain
View GitHub Profile
@andcl
andcl / getFundNAV.gs
Last active May 3, 2025 22:52
Google Sheets Apps Script for getting the Net Asset Value (NAV) of any instrument by (ISIN, date) using the Yahoo Finance API
function getFundNAV(isin, date) {
// 0. Initial date validation
const targetDate = new Date(date);
if (isNaN(targetDate.getTime())) return 'Invalid date';
if (targetDate > new Date()) return 'Date is in the future';
// 1. Get Yahoo Finance symbol from ISIN
const searchUrl = `https://query2.finance.yahoo.com/v1/finance/search?q=${isin}`;
const searchResp = UrlFetchApp.fetch(searchUrl);
@andcl
andcl / MAch3AutoToolZero.vb
Last active July 30, 2017 18:48
Mach3 Auto Tool Zero mejorado (enhanced)
CurrentFeed = GetOemDRO(818) ' Obtención de la velocidad de avance (feedrate) para después
DoSpinStop() ' Paramos la fresa (spindle) por seguridad
ZMax = 20.00 ' Longitud máxima de movimiento antes de abortar la operación de puesta a cero del eje Z
ZSonda = 19.75 ' Altura / grosor de la peana de la sonda
ZSeparacion = 2 ' Altura de separación entre la sonda y la fresa una vez realizada la operación
ZFinal = ZSonda + ZSeparacion
If GetOemLed (825) = 0 Then ' Si el eje Z no está ya sondeado (entrada de sonda ya activa)...