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
$Username = "user.name"; #don't include @gmail.com | |
$Password = "I<3bananas!"; | |
function Get-TimeStamp {return "[{0:MM/dd/yy} {0:HH:mm:ss}]" -f (Get-Date)} | |
function Send-ToEmail([string]$email){ | |
$message = new-object Net.Mail.MailMessage; | |
$message.From = "user.name@gmail.com"; | |
$message.To.Add($email); |
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
var sort_by = function(field, reverse, primer) { | |
var key = function(x) { | |
return primer ? primer(x[field]) : x[field] | |
}; | |
return function(a, b) { | |
var A = key(a), B = key(b); | |
return ((A < B) ? -1 : (A > B) ? +1 : 0) * [-1,1][+!!reverse]; | |
} | |
}; |