Skip to content

Instantly share code, notes, and snippets.

View fearthecowboy's full-sized avatar
🏠
Happily Working from home

Garrett Serack fearthecowboy

🏠
Happily Working from home
View GitHub Profile
public override ILocation GetLocation(string path) {
var parsedPath = Path.ParseWithContainer(path);
// strip off the azure:
/*
if (parsedPath.Scheme != string.Empty && parsedPath.Scheme != AzureDriveInfo.ProviderScheme) {
return AzureLocation.InvalidLocation;
}*/
// is this just a empty location?
// Copyright (c) 2009 DMTF. All rights reserved.
[Abstract, Version ( "2.23.0" ),
ClassConstraint {
"inv:self.IsLargeBuildNumber=true implies self.BuildNumber = null and self.LargeBuildNumber <> null",
"inv:self.IsLargeBuildNumber=false implies self.LargeBuildNumber=null" },
UMLPackagePath ( "CIM::Core::Software" ),
Description (
"SoftwareIdentity provides descriptive information about a "
"software component for asset tracking and/or installation "
"dependency management. When the IsEntity property has the "
class CIM_SoftwareIdentity {
string InstanceID;
uint16 MajorVersion;
uint16 MinorVersion;
uint16 RevisionNumber;
uint16 BuildNumber;
uint64 LargeBuildNumber;
class MS_SoftwareInstallationService {
// checks to see if a software identity can be installed
// from CIM_SoftwareInstallationService
uint32 CheckSoftwareIdentity( CIM_SoftwareIdentity REF Source, CIM_ManagedElement REF Target, CIM_Collection REF Collection, uint16 OUT InstallCharacteristics[]);
// Installs a package from it's SoftwareIdentity
// from CIM_SoftwareInstallationService
uint32 InstallFromSoftwareIdentity(CIM_ConcreteJob REF Job, uint16 InstallOptions[], string InstallOptionsValues[], CIM_SoftwareIdentity REF Source, CIM_ManagedElement REF Target, CIM_Collection REF Collection)
// Installs a package from a URI (resolves the SoftwareIdentity from URI and calls InstallSoftwareFromIdentity
@fearthecowboy
fearthecowboy / gist:6381624
Created August 29, 2013 18:27
zlib.Targets file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="zlib_targets_0;zlib_targets_1;zlib_targets_2">
<PropertyGroup Label="Debug and static and RuntimeLibraryNull" Condition="( $(Configuration.ToLower().IndexOf('debug')) &gt; -1 ) And '$(Linkage-zlib.ToLower())' == 'static' And ('$(RuntimeLibrary)' == '')">
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</PropertyGroup>
<PropertyGroup Label="Release and static and RuntimeLibraryNull" Condition="( $(Configuration.ToLower().IndexOf('debug')) == -1 ) And '$(Linkage-zlib.ToLower())' == 'static' And ('$(RuntimeLibrary)' == '')">
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</PropertyGroup>
<PropertyGroup Label="Debug and ltcg and RuntimeLibraryNull" Condition="( $(Configuration.ToLower().IndexOf('debug')) &gt; -1 ) And '$(Linkage-zlib.ToLower())' == 'ltcg' And ('$(RuntimeLibrary)' == '')">
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" InitialTargets="zlib_init_targets_0;zlib_init_targets_1;zlib_init_targets_2">
<PropertyGroup>
<BuildTimePath>$(MSBuildThisFileDirectory)../..//build/native/bin/</BuildTimePath>
</PropertyGroup>
<PropertyGroup Label="Default initializers for properties">
<CallingConvention-zlib Condition="'$(CallingConvention-zlib)' == ''">cdecl</CallingConvention-zlib>
<Linkage-zlib Condition="'$(Linkage-zlib)' == ''">dynamic</Linkage-zlib>
</PropertyGroup>
<ItemGroup Label="v100 and Win32 and Release and dynamic and cdecl" Condition="'$(PlatformToolset.ToLower())' == 'v100' And '$(Platform.ToLower())' == 'win32' And ( $(Configuration.ToLower().IndexOf('debug')) == -1 ) And '$(Linkage-zlib.ToLower())' == 'dynamic' And '$(CallingConvention-zlib.ToLower())' == 'cdecl'">
@fearthecowboy
fearthecowboy / gist:6867861
Created October 7, 2013 13:19
unzip of redist pkg
PS C:\root\v4\coapp-packages\testing\zlib\contrib\coapp> unzip -v .\zlib.redist-v100_Win32_Release_dynamic_cdecl.1.2.8.37.nupkg
Archive: ./zlib.redist-v100_Win32_Release_dynamic_cdecl.1.2.8.37.nupkg
Length Method Size Ratio Date Time CRC-32 Name
-------- ------ ------- ----- ---- ---- ------ ----
529 Stored 529 0% 10/04/13 14:00 323542e5 _rels/.rels
1039 Defl:X 532 49% 10/04/13 14:00 8bd02527 zlib.redist-v100_Win32_Release_dynamic_cdecl.nuspec
15168 Defl:X 2684 82% 10/04/13 14:00 2c77a9b7 build/native/lib/v100/Win32/Release/dynamic/cdecl/zlib.lib
70656 Defl:X 39415 44% 10/04/13 14:00 6ca27639 build/native/bin/v100/Win32/Release/dynamic/cdecl/zlib.dll
371712 Defl:X 95307 74% 10/04/13 14:00 69e7e201 build/native/bin/v100/Win32/Release/dynamic/cdecl/zlib.pdb
15168 Defl:X 2684 82% 10/04/13 14:00 2c77a9b7 build/native/bin/v100/Win32/Release/dynamic/cdecl/etc/zlib.txt
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir>
<SolutionPath Condition="$(SolutionPath) == '' Or $(SolutionPath) == '*Undefined*'">$(SolutionDir)\OneSetup.sln</SolutionPath>
<OutDir>$(SolutionDir)Output/$(Platform)/$(Configuration)/</OutDir>
<IntDir>$(SolutionDir)Intermediate/$(MsBuildProjectName)/$(Platform)/$(Configuration)/</IntDir>
</PropertyGroup>
<Import Project="$(SolutionPath).projectconfigurations.props" Condition="Exists('$(SolutionPath).projectconfigurations.props')" />
@fearthecowboy
fearthecowboy / remap-keys-to-winkey.reg
Created January 28, 2014 16:09
Registry settings to Remap CapsLock to Windows Key (import and reboot)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,5b,e0,3a,00,00,00,00,00
#fixed now!
Param(
[string]$html,
[string]$docx
)
# make the powershell process switch the current directory.
$oldwd = [Environment]::CurrentDirectory
[Environment]::CurrentDirectory = $pwd