Skip to content

Instantly share code, notes, and snippets.

@larsw
larsw / reclaimWindows10.ps1
Created January 9, 2017 12:56 — forked from alirobe/reclaimWindows10.ps1
"Reclaim Windows 10" turns off a bunch of unnecessary Windows 10 telemetery, removes bloatware, and privacy invasions. Review and tweak before running. Scripts for reversing are included and commented. Fork via https://github.com/Disassembler0 (different defaults)
##########
# Win10 Initial Setup Script
# Author: Disassembler <disassembler@dasm.cz>
# 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
@larsw
larsw / Win10Dev.ps1
Last active February 7, 2016 13:35 — forked from damieng/WinDev.ps1
Make Windows 10 more developer workstation oriented
# 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"
@larsw
larsw / gist:49659bff4f6e9a5da5f3
Created October 9, 2015 07:48 — forked from tjrobinson/gist:0ad6c790e90d7a385eb1
ActiveDirectoryUserService.cs
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;
@larsw
larsw / Kodekamp2.fs
Last active August 29, 2015 14:28 — forked from khellang/Kodekamp2.fs
File Dedupe checker (based on @khellang original code).
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

Single Malt Scotch Whisky GraphGist

Task flushingTask = null;
public override Task FlushAsync(CancellationToken cancellationToken)
{
Interlocked.CompareExchange(
ref flushingTask,
Task.Delay(200, cancellationToken).ContinueWith(
async (t) =>
{
await write.FlushAsync(cancellationToken);