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
blueprint: | |
name: Drinking Water Tracker & Reminder | |
description: | |
"Track your water drinking and remind yourself when you haven't for | |
a while. This blueprint requires you to create 3 input helpers: Date & Time, Button, | |
and Timer." | |
source_url: https://gist.github.com/djahren/322ce13a857b2099956429005669fe4a | |
domain: automation | |
input: | |
notify_device: |
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
#These are just a few PowerShell snippets I've written that I find myself coming back to time and time again. I hope they can help you too. | |
#Export To CSV $ReportsDir defined in my $profile file. | |
| Export-CSV (Join-Path $ReportsDir ".csv") -NoTypeInformation | |
#Before Loop - fill out activity and replace $Array with iterable varible. | |
$Activity = ""; $Total = $Array.Count; | |
$StartTime = Get-Date; $Count = 1; | |
#In Loop - replace -CurrentOperation | |
$ElapsedSeconds = (New-TimeSpan -Start $StartTime -End (Get-Date)).TotalSeconds; $SecondsPerOp = $ElapsedSeconds/$Count; |
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 Split files and their subfolders by years based on the last modified date | |
.DESCRIPTION Enter the source and destination folders in the strings below. | |
Set debug mode to preview what will happen without changing anything. | |
Set limit execution to only apply to the first few items in a folder - good for testing after debug is disabled. | |
Add any extensions you don't want to move to BlockedExtensions. | |
Reference $SkippedFiles afterwards to get a list of files that weres skipped on the most recent run. | |
Will work with the Source and destination folder the same, however recommended to have different source and destinations. | |
Doesn't work on empty directories. | |
.NOTES |
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
// ==UserScript== | |
// @name Disable ScreenConnect Animation | |
// @namespace http://djahren.com/ | |
// @version 0.1 | |
// @description Disables the unnecessary animation on screen connect. | |
// @author Ahren Bader-Jarvis | |
// @match https://*.screenconnect.com/Host* | |
// @grant none | |
// ==/UserScript== |
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
$width = 10 | |
$height = 10 | |
$backgroundColor = "DarkBlue" | |
$gamecycle = 500 #milliseconds | |
$lasttick = 0 | |
$gameclock = New-Object System.Diagnostics.Stopwatch | |
$snake = New-Object PSObject | |
$snake | Add-Member X ([Int]($width / 2)) | |
$snake | Add-Member Y ([Int]($height / 2)) | |
$snake | Add-Member Tail @() |