Skip to content

Instantly share code, notes, and snippets.

@viceice
viceice / remove-plannedvm.ps1
Created March 24, 2023 08:19
HyperV: Delete a failed planned VM
param(
[Parameter(Mandatory)]
[string]$Name
)
$vmms = Get-WmiObject -Namespace root\virtualization\v2 -Class Msvm_VirtualSystemManagementService
$pvm = Get-WmiObject -Namespace root\virtualization\v2 -Query "Select * From Msvm_PlannedComputerSystem where elementname='${Name}'"
$vmms.DestroySystem($pvm)
This file has been truncated, but you can view the full file.
-------------------------------------------------------------------------------->8
Version: 4.13.0 (89412)
Sha1: 8e5757d286720625a6dec24d512b58c546f5fad0
Started on: 2022/10/24 08:37:24.053
Resources: C:\Program Files\Docker\Docker\resources
OS: Windows 10 Pro
Edition: Professional
Id: 2009
Build: 22000
BuildLabName: 22000.1.amd64fre.co_release.210604-1628
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=EDGE,chrome=1">
@viceice
viceice / ts-compiler.js
Created December 1, 2021 14:38
Typescript v4.5.2 compiler for testing in Jint
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH0aq1YPJDNnYRu+aKv3FClD4Jk9sw27Z+niRiLedAXe 6c:db:ca:24:ac:23:a6:7b:0b:1b:24:70:d8:7f:1a:f4 ViceIce-ed25519-key-20170522
This file has been truncated, but you can view the full file.
debug: load tasks ➞ load the user's configuration > added
→ [2020-08-31 14:26:41.236] [C:NaN] [TaskGroup.<anonymous>]
debug: load tasks ➞ read the .env file if it exists > added
→ [2020-08-31 14:26:41.236] [C:NaN] [TaskGroup.<anonymous>]
debug: load tasks ➞ load the website's package data > added
→ [2020-08-31 14:26:41.236] [C:NaN] [TaskGroup.<anonymous>]
debug: load tasks ➞ load the website's configuration > added
→ [2020-08-31 14:26:41.236] [C:NaN] [TaskGroup.<anonymous>]
debug: load tasks ➞ update the configurations > added
→ [2020-08-31 14:26:41.237] [C:NaN] [TaskGroup.<anonymous>]
2020/07/28 14:38:16 [INFO] backend/local: apply calling Apply
2020/07/28 14:38:16 [INFO] terraform: building graph: GraphTypeApply
2020/07/28 14:38:16 [DEBUG] Resource state not found for node "docker_image.test", instance docker_image.test
2020/07/28 14:38:16 [DEBUG] Resource state not found for node "docker_container.test", instance docker_container.test
2020/07/28 14:38:16 [DEBUG] ProviderTransformer: "docker_container.test" (*terraform.NodeApplyableResourceInstance) needs provider.docker
2020/07/28 14:38:16 [DEBUG] ProviderTransformer: "docker_container.test (prepare state)" (*terraform.NodeApplyableResource) needs provider.docker
2020/07/28 14:38:16 [DEBUG] ProviderTransformer: "docker_image.test (prepare state)" (*terraform.NodeApplyableResource) needs provider.docker
2020/07/28 14:38:16 [DEBUG] ProviderTransformer: "docker_image.test" (*terraform.NodeApplyableResourceInstance) needs provider.docker
2020/07/28 14:38:16 [DEBUG] ReferenceTransformer: "docker_image.test (prepare state)" references: []
2020
2020-02-08 18:40:53,827 13740 [INFO ] - Chocolatey v0.10.15
2020-02-08 18:40:53,843 13740 [DEBUG] - Chocolatey is running on Windows v 10.0.18362.0
2020-02-08 18:40:53,846 13740 [DEBUG] - Attempting to delete file "C:/ProgramData/Chocolatey/choco.exe.old".
2020-02-08 18:40:53,847 13740 [DEBUG] - Attempting to delete file "C:\ProgramData\chocolatey\choco.exe.old".
2020-02-08 18:40:53,860 13740 [DEBUG] - Command line: "C:\ProgramData\Chocolatey\choco.exe" install python3 --version 3.8.1
2020-02-08 18:40:53,861 13740 [DEBUG] - Received arguments: install python3 --version 3.8.1
2020-02-08 18:40:53,913 13740 [DEBUG] - RemovePendingPackagesTask is now ready and waiting for PreRunMessage.
2020-02-08 18:40:53,921 13740 [DEBUG] - Sending message 'PreRunMessage' out if there are subscribers...
2020-02-08 18:40:53,929 13740 [DEBUG] - [Pending] Removing all pending packages that should not be considered installed...
2020-02-08 18:40:54,817 13740 [DEBUG] - Performing validation checks.
@viceice
viceice / snapper.diff
Created May 10, 2019 09:24
snapper net45 support
diff --git a/Snapper.Core/Snapper.Core.csproj b/Snapper.Core/Snapper.Core.csproj
index d81b315..26d1d0e 100644
--- a/Snapper.Core/Snapper.Core.csproj
+++ b/Snapper.Core/Snapper.Core.csproj
@@ -11,6 +11,6 @@ See Project Site for more details</Description>
<PackageTags>testing, test, snapshot, jest</PackageTags>
<LangVersion>latest</LangVersion>
<LangVersion >latest</LangVersion >
- <TargetFrameworks>netstandard1.3;netstandard2.0</TargetFrameworks>
+ <TargetFrameworks>net45;netstandard1.3;netstandard2.0</TargetFrameworks>
@viceice
viceice / CheckFile.cs
Created March 9, 2018 05:49 — forked from sailro/CheckFile.cs
Check Authenticode, StrongName and assembly references
using System;
using System.Text;
using Mono.Cecil;
using System.Security.Cryptography.X509Certificates;
namespace CheckFiles
{
[Flags]
enum CheckTypes
{