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
#!/bin/sh | |
# Enable and disable HDMI output on the Raspberry Pi | |
is_off () | |
{ | |
tvservice -s | grep "TV is off" >/dev/null | |
} | |
case $1 in |
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
# [Start of entries generated by MVPS HOSTS] | |
# | |
# [Misc A - Z] | |
0.0.0.0 fr.a2dfp.net | |
0.0.0.0 m.fr.a2dfp.net | |
0.0.0.0 mfr.a2dfp.net | |
0.0.0.0 ad.a8.net | |
0.0.0.0 asy.a8ww.net | |
0.0.0.0 static.a-ads.com | |
0.0.0.0 abcstats.com |
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
# https://www.reddit.com/r/PowerShell/comments/4dn1yd/problems_with_global_variables/ | |
# input: guid | |
# output: returncode | |
function UninstallMQ ($umqGUID) { | |
# $rc = (Start-Process -FilePath "msiexec.exe" -ArgumentList "/X{$umqGUID} /qn /l*V c:\logs\MQClient_$Version`_Uninstall.log" -Wait -Passthru).ExitCode | |
Write-Host "Start msiexec and uninstall GUID: $umqGUID" | |
$rc = 0 | |
if ( $rc -ne 0 ) { | |
return 3 |
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
# https://www.reddit.com/r/PowerShell/comments/4cz7fd/how_have_you_used_powershell_in_your_personal/ | |
# http://blog.koenvermoesen.be/2011/09/17/using-powershell-for-organizing-your-photo-library/ | |
# should fix this when done with rename pictures script | |
# ============================================================================================== | |
# | |
# Microsoft PowerShell Source File -- Created with SAPIEN Technologies PrimalScript 4.1 | |
# | |
# NAME: OrgPhotos.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
#https://www.reddit.com/r/PowerShell/comments/4cz7fd/how_have_you_used_powershell_in_your_personal/ | |
# SIMILAR UTILITY | |
# http://www.sentex.net/~mwandel/jhead/ | |
$dir = Read-Host 'Drag and drop the folder you wish to process.' | |
$dir = $dir -replace '"' # sometimes drag-n-drop inclues quotes in the string | |
if (!$dir) { Throw 'No path specified' } | |
$recurse = Read-Host 'Check subfolders? y/[N]' |
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
# https://community.spiceworks.com/topic/1529112-path-too-long-error | |
# This script requires the Get-Files function below | |
# https://github.com/gangstanthony/PowerShell/blob/master/Get-Files.ps1 | |
$files = Get-Files \\Fileserver\E$ -Recurse -NameOnly | |
# get available drives in case dealing with long file names | |
# we can map a drive to a long file path so it is short enough for powershell to handle | |
$drives = [io.driveinfo]::getdrives() | % {$_.name[0]} |