Skip to content

Instantly share code, notes, and snippets.

someshinyobject / PoshmodoroSession.ps1
Last active March 27, 2018 04:08
A PowerShell Pomodoro Technique Implementation
View PoshmodoroSession.ps1
#Pomodoro Technique
Function New-PoshmodoroSession {
Param (
[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 / 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.
View New-ProxyWebServiceProxy.ps1
Function New-ProxyWebServiceProxy {
[CmdletBinding(DefaultParameterSetName='NoCredentials', HelpUri='')]
Param (
[Parameter(Mandatory=$true, Position=0)]
View PowerShell: Resize-Image
Resize an image
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
The new width of the image. Can be given alone with the MaintainRatio flag
someshinyobject / gist:ef32bffdb5edc1fe5af5
Created July 17, 2014 13:50
Discussion 7 for CMIS315
View gist:ef32bffdb5edc1fe5af5
#include <iostream>
#include <string>
#include <vector>
using namespace std;
class Animal {
Animal() {};
Animal(string n) : name(n) {};
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.
View MKLinkIterate.ps1
$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;