Skip to content

Instantly share code, notes, and snippets.

View jmorrice's full-sized avatar

Jonathan Morrice jmorrice

View GitHub Profile
@jmorrice
jmorrice / power_bi_perdoo.m
Last active August 23, 2022 14:35
Power Query script to load data from the Perdoo API
let
// Enter your API token here from https://web.perdoo.com/settings/user/api-tokens
token = "sampleApiToken",
// Fetch data
vUrl = "https://api-eu.perdoo.com/graphql/",
vHeaders =[
#"Method"="POST",
#"Content-Type"="application/json",
#"Authorization"=Text.Combine({"Bearer ", token})
@jmorrice
jmorrice / functions.php
Last active January 30, 2018 13:10
WP Form tracking
add_action("gform_post_submission", "set_post_content", 10, 2);
function set_post_content($entry, $form){
echo "<script>parent.track(" . json_encode($entry) . ", " . json_encode($form) . ");</script>";
}