Skip to content

Instantly share code, notes, and snippets.

@btamas
btamas / Code.gs
Last active October 12, 2024 12:48
This Google Apps Script enables integration with Interactive Brokers' Flex Queries via API, allowing the retrieval of financial data directly into Google Sheets. It automates the process of fetching Flex Query reports, which may include portfolio holdings, transactions, and performance metrics.
const cacheService = CacheService.getDocumentCache();
const CACHE_TTL = 3600; // 1 hour
const flexAPIUrl =
"https://gdcdyn.interactivebrokers.com/Universal/servlet/FlexStatementService.SendRequest";
const normalizeSymbols = {
P911d: "P911",
};
const excludedSymbols = ["IWDA"];
@btamas
btamas / update.sh
Created May 7, 2021 12:54
Update extensions
for extension in `cat composer.json| jq '.require | keys_unsorted[]' | tr -d \"`; do version=`curl -u yourgithubuser:yourgithubtoken --silent "https://api.github.com/repos/$extension/releases/latest" | jq -r .tag_name | tr -d v`; echo \"$extension\": \"$version\",; done
@btamas
btamas / README.md
Last active July 14, 2025 15:27
Mikrotik Dynamic DNS (DDNS) update with Google Cloud (GCP) function on Google Cloud DNS
  1. Generate a service account with DNS admin rights and download the json.
  2. Generate a service for unauthenticated calls
  3. Create a cloud function and upload the index.js, package.json and service acount json
    • 128MB RAM is enough
    • HTTP trigger should be set
    • Unauthenticated call should be set
      1. service account should be selected
    • Add the following environment variables:
      • PROJECT_NAME: name of the project, where the DNS is defined
  • RECORD_NAME: name of the DNS record, what should be updated. A . is required in the end, like: home.example.com.