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
# where the images are | |
$assets = Join-path $env:userprofile "AppData\Local\Packages\Microsoft.Windows.ContentDeliveryManager_cw5n1h2txyewy\LocalState\Assets" | |
# regularly refreshed screen images are recent | |
$weeks = new-object system.timespan (14,0,0,0) | |
# copy those files locally and apply '.jpg' | |
dir $assets | ? { $_.LastWriteTime -gt ([datetime]::now - $weeks) } | % { copy $_.FullName "$($_.Name).jpg" } |
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
(* | |
.SYNOPSIS | |
This script estimates cyclomatic complexities over a folder full of assemblies. | |
.DESCRIPTION | |
It loads the assemblies, and then introspects over each method, estimating the | |
complexity as number of branch instructions which do not target the next instruction | |
and which have a unique target instruction. | |
.NOTES |
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
(* | |
.SYNOPSIS | |
This script estimates cyclomatic complexities over a folder full of assemblies. | |
.DESCRIPTION | |
It loads the assemblies, and then introspects over each method, estimating the | |
complexity as number of branch instructions which do not target the next instruction | |
and which have a unique target instruction. | |
.NOTES |
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
namespace Tinesware.FSharp | |
open System | |
open System.Collections.Generic | |
open Should | |
module fhould = | |
let inline (|->) x y = | |
ObjectAssertExtensions.ShouldBeGreaterThan(x, y) |
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
{ Wanted = String.Empty | |
----^ | |
stdin(8,5): warning FS0044: This construct is deprecated. Use 'Wanted' instead | |
{ Wanted = String.Empty | |
----^ |
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
open System | |
type R = | |
{ Wanted : String | |
[<Obsolete("Use 'Wanted' instead")>] | |
Unwanted : String } | |
static member Create () = | |
{ Wanted = String.Empty | |
Unwanted = String.Empty } |
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
<?xml version="1.0" encoding="utf-8"?> | |
<root> | |
<!-- | |
Microsoft ResX Schema | |
Version 2.0 | |
The primary goals of this format is to allow a simple XML format | |
that is mostly human readable. The generation and parsing of the | |
various data types are done through the TypeConverter classes |
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
#include "TouchFileCommand.h" | |
namespace PSBook { namespace Commands | |
{ | |
SetFileTouchTimeCommand::SetFileTouchTimeCommand(void) | |
{ | |
Date = DateTime::Now; | |
rm = gcnew Resources::ResourceManager(L"PowershellCpp.Messages", GetType()->Assembly); | |
} |
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
#pragma once | |
using namespace System; | |
using namespace System::IO; | |
using namespace System::Management::Automation; | |
namespace PSBook { namespace Commands | |
{ | |
[Cmdlet(VerbsCommon::Set, "FileTouchTime", DefaultParameterSetName = "Path", SupportsShouldProcess = true, ConfirmImpact = ConfirmImpact::Medium)] | |
public ref class SetFileTouchTimeCommand : | |
public PSCmdlet |
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 namespace System; | |
using namespace System::Management::Automation; | |
using namespace System::ComponentModel; | |
namespace PSBook { namespace Commands | |
{ | |
[RunInstaller(true)] | |
public ref class PSBookChapter2MySnapIn : PSSnapIn | |
{ | |
public: |