Skip to content

Instantly share code, notes, and snippets.

@katoen
katoen / (de)activate-plugins-on-domain.php
Last active May 23, 2022 20:21 — forked from JayHoltslander/deactivate-plugins-on-domain.php
Deactivate or activate certain Wordpress plugins when running on the development/staging domain
<?php
require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
$plugins_staging = array(
'wp-reroute-email/wp-reroute-email.php'
);
$plugins_prod= array(
'google-site-kit/google-site-kit.php',
'lite-speed-cache/lite-speed-cache.php',
'microsoft-clarity/clarity.php'
);
@katoen
katoen / NumberFromDate.m
Created December 10, 2020 07:54
Number from Date PowerQuery
Number.From(DateTime.ToText(DateTime.LocalNow(), "yyyyMMdd")))
@katoen
katoen / REST_API_PowerBI_GET_Entries.m
Created May 25, 2020 22:07
REST API Power BI in Power Query - List tables
/*
docs.microsoft.com/en-us/rest/api/power-bi/pushdatasets/datasets_gettables
Easy auth token:
https://datagulp.com/powerbi/power-bi-rest-api-how-to-get-authentication-token-with-powershell-cmdlets/
*/
let
  Source = Json.Document(
    Web.Contents(
      "https://api.powerbi.com/v1.0/myorg/datasets/"& DATASETID &"/tables", 
@katoen
katoen / TOSHL_API_POST_Entries.m
Created May 25, 2020 20:13
TOSHL Finance API Power BI - POST entries
/* POST TOSHL.com transaction in Power BI Power Query
https://developer.toshl.com/docs/entries/create/
all KEYS & IDs stored as parameters
*/ 
let
Source = Json.Document(
Web.Contents(
"https://api.toshl.com/entries", 
[
@katoen
katoen / TOSHL_API_GET_Entries.m
Created May 25, 2020 20:06
TOSHL Finance API Power BI - List entries
/*
List TOSHL.com transactions in Power BI Power Query
https://developer.toshl.com/docs/entries/list/
all KEYS & IDs stored as parameters
*/
let
Source = Json.Document(
Web.Contents(
"https://api.toshl.com/entries?from=2000-01-01&to=2020-05-31", 
@katoen
katoen / YNAB_API_POST_Transactions.m
Created May 25, 2020 19:57
YNAB API Power BI - POST Transactions
/* POST YNAB.com new transactions in Power BI Power Query
https://api.youneedabudget.com/v1#/Transactions/createTransaction
Store all rows to be POSTED in seperate Query #"YNAB-POSTPREP"
Use one api call for each transaction
Log responses from YNAB all KEYS & IDs stored as parameters
*/ 
let
@katoen
katoen / YNAB_API_Transactions.m
Created May 25, 2020 19:01
YNAB API Power BI - GET Transactions
/*
GET YNAB.com transactions in Power BI Power Query
https://api.youneedabudget.com/v1#/Transactions/getTransactions
all KEYS & IDs stored as parameters
*/
let
Source = Json.Document(
Web.Contents(
"https://api.youneedabudget.com/v1/budgets/" & YNABBudgetID & "/transactions", 
@katoen
katoen / export.js
Last active September 23, 2022 18:58 — forked from 0x8801/export.js
Export Wallet by BudgetBakers records to JSON
// Source for Jake Archibald's idb https://github.com/jakearchibald/idb/blob/v3.0.2/build/idb.js
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = global || self, factory(global.idb = {}));
}(this, function (exports) { 'use strict';
function toArray(arr) {
return Array.prototype.slice.call(arr);
}
### Keybase proof
I hereby claim:
* I am katoen on github.
* I am koenvm (https://keybase.io/koenvm) on keybase.
* I have a public key ASAAVyUXkH3w9BD058f9S_wqUVkVqLO34OS5TRmnlLJhzAo
To claim this, I am signing this object: