View PoshmodoroSession.ps1
This file contains 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
#Pomodoro Technique | |
Function New-PoshmodoroSession { | |
Param ( | |
[Parameter(Mandatory=$False)] | |
[HashTable]$Options = @{} | |
) | |
# Add in our notification runtimes | |
[Windows.UI.Notifications.ToastNotificationManager, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null | |
[Windows.UI.Notifications.ToastNotification, Windows.UI.Notifications, ContentType = WindowsRuntime] | Out-Null |
View New-ProxyWebServiceProxy.ps1
This file contains 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
Function New-ProxyWebServiceProxy { | |
[CmdletBinding(DefaultParameterSetName='NoCredentials', HelpUri='http://go.microsoft.com/fwlink/?LinkID=135238')] | |
Param ( | |
[Parameter(Mandatory=$true, Position=0)] | |
[Alias('WL','WSDL','Path')] | |
[ValidateNotNullOrEmpty()] | |
[uri] | |
${Uri}, | |
[Parameter(ParameterSetName='Credential')] |
View PowerShell: Resize-Image
This file contains 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 | |
Resize an image | |
.DESCRIPTION | |
Resize an image based on a new given height or width or a single dimension and a maintain ratio flag. | |
The execution of this CmdLet creates a new file named "OriginalName_resized" and maintains the original | |
file extension | |
.PARAMETER Width | |
The new width of the image. Can be given alone with the MaintainRatio flag | |
.PARAMETER Height |
View gist:ef32bffdb5edc1fe5af5
This file contains 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 <iostream> | |
#include <string> | |
#include <vector> | |
using namespace std; | |
class Animal { | |
public: | |
Animal() {}; | |
Animal(string n) : name(n) {}; |
View MKLinkIterate.ps1
This file contains 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
$toLink = 'C:\Program Files'; | |
$toWhere = 'D:\Program Files'; | |
$items = Get-ChildItem -path $toLink; | |
foreach ($line in $items) { | |
if ($line -eq $null) {break;} | |
$exp = 'cmd /c mklink /d "' + $toWhere + '\' + $line + '" "' + $toWhere + '\' + $line + '"'; | |
Write-Host $exp; | |
Invoke-Expression -Command $exp; | |
} |