Skip to content

Instantly share code, notes, and snippets.

View IntranetFactory's full-sized avatar

Martin Amm IntranetFactory

View GitHub Profile
@IntranetFactory
IntranetFactory / EFRedisCacheProvider.cs
Created April 27, 2024 10:13
EFCoreSecondLevelCacheInterceptor Distributed cached provider using Redis sentinel
using adenin.Platform.Configuration;
using EFCoreSecondLevelCacheInterceptor;
using JetBrains.Annotations;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using StackExchange.Redis;
@IntranetFactory
IntranetFactory / fetch_vcdist.py
Created January 25, 2024 19:45 — forked from donno/fetch_vcdist.py
Downloads and extract the Visual C++ Redistributables.
"""Downloads and extract the Visual C++ Redistributables.
This is useful when working with minidump files as the user may be running
with a new different version of the runtime. This script aims to maintain
a copy of the various versions.
Versions are normally added once I encounter them, in November 2022, I added
a rather large back catalogue of versions.
This requires dark.exe from Wix (http://wixtoolset.org/releases/) and
@IntranetFactory
IntranetFactory / logintest.js
Created November 11, 2019 20:30
login to my.digitalassistant.app test tenant
const puppeteer = require('puppeteer');
const username = 'test';
const password = 'bratwurst';
(async () => {
const browser = await puppeteer.launch({ headless: false });
const page = await browser.newPage();
await page.goto('https://my.digitalassistant.app/Users/Account/Login', {waitUntil: 'networkidle2'});
const usernameInput = await page.evaluateHandle(`document.querySelector("#ue").shadowRoot.querySelector("#input-1 > input")`);
const passwordInput = await page.evaluateHandle(`document.querySelector("#visibleForm > form > paper-input:nth-child(2)").shadowRoot.querySelector("#input-2 > input[type=password]")`);
(function(){
var attachEvent = document.attachEvent;
var isIE = navigator.userAgent.match(/Trident/);
console.log(isIE);
var requestFrame = (function(){
var raf = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame ||
function(fn){ return window.setTimeout(fn, 20); };
return function(fn){ return raf(fn); };
})();
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-category.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@IntranetFactory
IntranetFactory / designer.html
Last active August 29, 2015 14:15
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
@IntranetFactory
IntranetFactory / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../at-form-lookup/at-form-lookup.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: relative;
width: 100%;
height: 100%;
@IntranetFactory
IntranetFactory / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../at-form-lookup/at-form-lookup.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: relative;
width: 100%;
height: 100%;
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
<style>
@IntranetFactory
IntranetFactory / designer.html
Last active August 29, 2015 14:07
designer
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../at-core-searchbox/at-core-searchbox.html">
<link rel="import" href="../at-core-activity/at-core-activity.html">
<link rel="import" href="../at-core-list/at-core-list.html">
<link rel="import" href="../at-chart-core/c3-import.html">
<link rel="import" href="../at-chart-core/at-chart-core.html">
<polymer-element name="toaster-policies" attributes="searchTerm">