Skip to content

Instantly share code, notes, and snippets.

@dradovic
dradovic / download-pdf.js
Last active July 4, 2020 00:05 — forked from devloco/download-pdf.js
Download a PDF via POST with Fetch API
let fnGetFileNameFromContentDispostionHeader = function (header) {
let contentDispostion = header.split(';');
const fileNameToken = `filename*=UTF-8''`;
let fileName = 'downloaded.pdf';
for (let thisValue of contentDispostion) {
if (thisValue.trim().indexOf(fileNameToken) === 0) {
fileName = decodeURIComponent(thisValue.trim().replace(fileNameToken, ''));
break;
}
@dradovic
dradovic / DeleteExcludedFiles.ps1
Last active January 2, 2018 00:24 — forked from mikesigs/DeleteExcludedFiles.ps1
PowerShell Script to Find (and delete) all excluded files in a Visual Studio Solution
<#
.SYNOPSIS
Find all files excluded from a Visual Studio solution with options to delete.
.DESCRIPTION
Finds all excluded files in all projects in the provided Visual Studio solution with options to delete the files.
.PARAMETER Solution
The path to the .sln file