Skip to content

Instantly share code, notes, and snippets.

Mads Breusch Klinkby klinkby

Block or report user

Report or block klinkby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View ParallelModule.psm1
Function CallbackWrapper {
param (
$callback = [ScriptBlock]::Create($callbackScript)
return [PSCustomObject]@{
Result = $callback.InvokeReturnAsIs($param)
Order = $order
klinkby / perf-coll.js
Created Sep 28, 2017
Collect key performance metrics, dump in document then reload page for another run.
View perf-coll.js
(function () {
"use strict";
var t = performance.timing,
t1 = t.navigationStart,
arr = [t.responseEnd - t1, t.domContentLoadedEventStart - t1, t.loadEventEnd - t1],
storage = sessionStorage,
storageKey = "perf-coll",
coll = JSON.parse(storage.getItem(storageKey) || "[]"),
klinkby / textbox-clientaddin.js
Last active Aug 29, 2017
NAV client control with a simple multiline text box
View textbox-clientaddin.js
* NAV client control with a simple multiline text box
* Exposes the following methods:
* GetText() : string
* SetText(string)
* GetReadOnly() : boolean
* SetReadOnly(boolean)
* And the following events:
* Blur
klinkby / Get-Spreadsheet.ps1
Last active Jun 3, 2019
Powershell script to read Excel spreadsheet contents
View Get-Spreadsheet.ps1
function Get-Spreadsheet {
[Parameter(Mandatory = $true)]
[ValidateScript({ Test-Path $_ -PathType Leaf })]
try {
[DocumentFormat.OpenXml.Packaging.SpreadsheetDocument] | Out-Null
catch {
klinkby /
Created Mar 18, 2017
Shell script for remote reboot the D-Link 921 router
sudo docker pull nginx:alpine
sudo docker pull jwilder/docker-gen
sudo docker pull jrcs/letsencrypt-nginx-proxy-companion
sudo docker pull zzrot/alpine-ghost
sudo cp nginx.tmpl /volumes/proxy/templates/
klinkby / getGroupedViewData.js
Created Sep 8, 2016
Extracts aggregated values from a SharePoint view using grouping
View getGroupedViewData.js
function Grouping(title, value, count) {
Object.defineProperties(this, {
title: { value: title },
value: { value: value },
count: { value: count },
groups: { writable: true }
function getGroupedViewData(listTitle, viewTitle, success, fail) {
klinkby / ManagedWebBrowser.cs
Last active Jun 7, 2016
Wraps IE to support lifetime
View ManagedWebBrowser.cs
using System;
using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Runtime.CompilerServices;
using System.Threading;
using SHDocVw;
namespace Capto
/// <summary>
View default.vcl
# This is a VCL file for Varnish used with @TryGhost blog.
# It rewrites Wordpress-style /yyyy/mm/dd/slug urls
# to /slug and /rss20.xml to Ghost's /rss/
# Adds 60 mins cachability to pages, adds AMP Project CSP header and a few other
# security headers giving the site an A+ on
# Marker to tell the VCL compiler that this VCL has been adapted to the
# new 4.0 format.
klinkby / gist:22b417e0f1f80096a3c1
Created Mar 11, 2016
Query SharePoint Announcemements in this site collection that are not expired
View gist:22b417e0f1f80096a3c1
(ContentTypeId:0x0104*) (contentclass:STS_ListItem) (Path:{SiteCollection.URL}) NOT (ExpirationTime<{Today})
OOB on O365
You can’t perform that action at this time.