Skip to content

Instantly share code, notes, and snippets.

@jcotton42
jcotton42 / uwp-xaml.ps1
Created August 8, 2017 15:01
Some cool script I found
$inputXML2 = @"
<Window x:Class="EnrollmentMenu.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:EnrollmentMenu"
mc:Ignorable="d"
Title="Completed Changes" Height="350" Width="800">
<Window.Resources>
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
using static JCotton.ManagedDismapi.Interop.NativeMethods;
[module: DefaultCharSet(CharSet.Unicode)]
function __UpdateCompletionCache {
$COM = Get-CimInstance -ClassName Win32_ClassicCOMClassSetting -Filter 'VersionIndependentProgId IS NOT NULL' |
foreach {
$progid = $_.VersionIndependentProgId
if($_.Caption) {
$caption = $_.Caption
} else {
$caption = $progid
}
if($_.Description) {
#include <iostream>
#include <complex>
#include <GL/glut.h>
#include <GL/freeglut_ext.h>
#include <mpi.h>
using std::complex;
using std::pair;
using std::cout;
using std::endl;
@jcotton42
jcotton42 / Domain.ps1
Last active August 29, 2015 14:04
DSC Domain Config
Set-StrictMode -Off # DSC doesn't seem to like strict mode...
#[DscLocalConfigurationManager()] # CertificateID is broken in the new LCM config type, will try again w/ next PS5 CTP
Configuration DomainLCM {
Node $AllNodes.NodeName {
LocalConfigurationManager {
CertificateID = $Node.Thumbprint
RebootNodeIfNeeded = $true
}
}
}