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"?> | |
| <Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | |
| <!-- @FearTheCowboy's Simple PowerShell Task for MSBuild --> | |
| <UsingTask TaskName="PowerShell" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"> | |
| <ParameterGroup><ScriptBlock ParameterType="System.String" Required="true" /></ParameterGroup> | |
| <Task><Reference Include="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll"/><Code Type="Class" Language="cs"><![CDATA[ | |
| public class PowerShell : Microsoft.Build.Tasks.Exec { | |
| public string ScriptBlock {set { EchoOff=true; Command = string.Format( "@powershell \"Invoke-Command -ScriptBlock {{ $errorActionPreference='Stop'; {0} ; exit $LASTEXITCODE }} \"", value.Replace("\"","\"\"").Replace("\r\n",";").Replace("\n",";").Replace("\r",";")); } } | |
| }]]></Code></Task> | |
| </UsingTask> |
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
| # | |
| # Copyright (c) Microsoft Corporation. All rights reserved. | |
| # Licensed under the Apache License, Version 2.0 (the "License"); | |
| # you may not use this file except in compliance with the License. | |
| # You may obtain a copy of the License at | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # | |
| # Unless required by applicable law or agreed to in writing, software | |
| # distributed under the License is distributed on an "AS IS" BASIS, | |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
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
| $ErrorActionPreference = "Stop" | |
| #Need to install Nuget packages before execute | |
| Add-Type -Path (Join-Path (Split-Path $profile -Parent) "packages\Windows7APICodePack-Core.1.1.0.0\lib\Microsoft.WindowsAPICodePack.dll" -Resolve) | |
| Add-Type -Path (Join-Path (Split-Path $profile -Parent) "\packages\Windows7APICodePack-Shell.1.1.0.0\lib\Microsoft.WindowsAPICodePack.Shell.dll" -Resolve) | |
| <# | |
| #TODO: Define Interop code to register shortcut with appid | |
| $referencedAssemblies = @( | |
| [MS.WindowsAPICodePack.Internal.PropVariant].Assembly.FullName, |
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
| #Require -Version 5.0 | |
| # using statement must appear before any other statements in a script. | |
| # other using types(Assembly/Command/Module/Type) is not supported yet? | |
| # [Enum]::GetNames('System.Management.Automation.Language.UsingStatementKind') | |
| using namespace System.Diagnostics | |
| using namespace System.Linq | |
| function Main | |
| { |
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
| $ErrorActionPreference = "Stop" | |
| $notificationTitle = "Notification: " + [DateTime]::Now.ToShortTimeString() | |
| [Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] > $null | |
| $template = [Windows.UI.Notifications.ToastNotificationManager]::GetTemplateContent([Windows.UI.Notifications.ToastTemplateType]::ToastText01) | |
| #Convert to .NET type for XML manipuration | |
| $toastXml = [xml] $template.GetXml() | |
| $toastXml.GetElementsByTagName("text").AppendChild($toastXml.CreateTextNode($notificationTitle)) > $null |
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
| @powershell -NoProfile -ExecutionPolicy Unrestricted "%~dp0\desktopsmallicon.ps1" %* |
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 System; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| using UnityEngine; | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| using UnityEditor.Callbacks; | |
| #endif |
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
| get-date -for "yyyy-MM-dd HH:mm:ss.fffffff" | |
| 2015-05-30 17:07:25.2352256 |
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
| # 0. Requires steamcmd. Download from https://developer.valvesoftware.com/wiki/SteamCMD. Put it in your steam directory (the one with steam.exe) | |
| # 1. Save this script by right-click on Raw button and choose "Save link as..." | |
| # 2. Start powershell : right click "Start" then choose "Run..." & type : powershell | |
| # 3. Run script type : Start-Process powershell -Verb RunAs -ArgumentList "-ExecutionPolicy Unrestricted -NoExit -file `"$Home\Downloads\SteamShortcutCreator.ps1`""; exit | |
| # 4. Give permission in pop-up | |
| [Console]::OutputEncoding = [System.Text.Encoding]::UTF8 | |
| $steamDir = if (Test-Path "C:\Program Files (x86)\Steam\steam.exe") { "C:\Program Files (x86)\Steam" } | |
| elseif ($args[0] -and (Test-Path "$($args[0])\steam.exe")) { $args[0] } | |
| elseif (Test-Path "$PSScriptRoot\steam.exe") { $PSScriptRoot } | |
| elseif (Test-Path ".\steam.exe") { "." } |
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
| # ____ | |
| # / __ \________ ________ ____ ______ | |
| # / /_/ / ___/ _ \/ ___/ _ \/ __ `/ ___/ | |
| # / ____/ / / __/ / / __/ /_/ (__ ) | |
| #/_/ /_/ \___/_/ \___/\__, /____/ | |
| # /_/ | |
| # this script will automatically pull font awesome files from github via .net framework "WebClient" | |
| # install fantastically handy ImageMagick tool from => http://www.imagemagick.org/script/binary-releases.php | |
| # and add it to your path | |
| if (-not [bool](Get-Command "magick.exe" -ErrorAction SilentlyContinue)) { throw "Magick.exe not in path" } |