Skip to content

Instantly share code, notes, and snippets.

@someshinyobject
someshinyobject / PoshmodoroSession.ps1
Last active March 27, 2018 04:08
A PowerShell Pomodoro Technique Implementation
#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
@someshinyobject
someshinyobject / New-ProxyWebServiceProxy.ps1
Created September 20, 2017 12:26
A proxy command of PowerShell's New-WebServiceProxy to allow for the passing of client certificates during creation.
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')]
<#
.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
@someshinyobject
someshinyobject / gist:ef32bffdb5edc1fe5af5
Created July 17, 2014 13:50
Discussion 7 for CMIS315
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Animal {
public:
Animal() {};
Animal(string n) : name(n) {};
@someshinyobject
someshinyobject / MKLinkIterate.ps1
Created June 1, 2013 13:25
Iterates through a given folder's ChildItems and creates a symbolic link in a different given directory.
$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;
}