This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Task flushingTask = null; | |
public override Task FlushAsync(CancellationToken cancellationToken) | |
{ | |
Interlocked.CompareExchange( | |
ref flushingTask, | |
Task.Delay(200, cancellationToken).ContinueWith( | |
async (t) => | |
{ | |
await write.FlushAsync(cancellationToken); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Kodekamp | |
open System | |
open System.IO | |
open System.Security.Cryptography | |
type Arguments = { ByteCount: int64; Path: string; } | |
let (|Long|_|) str = | |
match Int64.TryParse(str) with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.DirectoryServices.AccountManagement; | |
using System.Linq; | |
using System.Security.Claims; | |
using System.Threading.Tasks; | |
using Thinktecture.IdentityServer.Core; | |
using Thinktecture.IdentityServer.Core.Models; | |
using Thinktecture.IdentityServer.Core.Services; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Run this from Powershell as Administrator with (New-Object System.Net.WebClient).DownloadString("https://gist.github.com/larsw/fceb8d9b13ddd197c2aa/raw") | powershell -command - | |
Write-Output "Making Windows 10 more developer workstation oriented..." | |
Set-ExecutionPolicy Unrestricted | |
Write-Output "Bloatware removing..." | |
$apps = @( | |
"Microsoft.3DBuilder" | |
"Microsoft.Appconnector" | |
"Microsoft.BingFinance" | |
"Microsoft.BingNews" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########## | |
# Win10 Initial Setup Script | |
# Author: Disassembler <[email protected]> | |
# Version: 1.7, 2016-08-15 | |
# dasm's script: https://github.com/Disassembler0/Win10-Initial-Setup-Script/ | |
# THIS IS A PERSONALIZED VERSION | |
# This script leaves more MS defaults on, including MS security features. | |
# Tweaked based on personal preferences for @alirobe 2016-11-16 - v1.7.1 |