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
<# | |
Recursively move all files in C:\SourceDir into C:\Destination | |
Assumes C:\Destination exists already, or there could be problems | |
#> | |
Move-Item -Path "C:\SourceDir\*" -Destination "C:\Destination" |
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
#Run as Admin | |
New-ItemProperty -Path "HKCU:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced" -Name "DisallowShaking" -Value "0" -PropertyType "DWord" |
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
<# | |
.DESCRIPTION | |
Generates Gameshark codes for Pokemon Gold/Silver/Crystal to encounter a specific Pokemon at a specific level | |
Takes user input for the Pokemon name and level and generates the codes | |
#> | |
function ConvertTo-Hex { | |
param ( | |
[Parameter(Mandatory=$true)] | |
[int]$Number |
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
@ECHO off | |
SET STARTTIME=%TIME% | |
REM DO THINGS HERE TO TIME | |
timeout 5 | |
REM DO THINGS HERE TO TIME | |
REM Final Calculations |
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
@ECHO OFF | |
:start | |
SET choice= | |
SET /p choice=Do something? [N]: | |
IF NOT '%choice%'=='' SET choice=%choice:~0,1% | |
IF '%choice%'=='Y' GOTO yes | |
IF '%choice%'=='y' GOTO yes | |
IF '%choice%'=='N' GOTO no | |
IF '%choice%'=='n' GOTO no | |
IF '%choice%'=='' GOTO no |
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
# This will ping google to test for a WAN connection and reboot if it fails | |
# Workaround to my Windows Sandbox always losing network | |
# The weird logging to write-host/write-output is designed to be used with Windows task scheduler (interactive logon) or via console directly | |
$host.ui.RawUI.WindowTitle = "Network Checker" | |
Clear-Host | |
$dt = (get-date).toString() | |
Write-Host "Network Check Running. Logfile: C:\Users\$($env:username)\networkCheck.log" | |
Write-Output "[$dt] Network Check Running. Logfile: C:\Users\$($env:username)\networkCheck.log" | Out-File -FilePath "C:\Users\$($env:username)\networkCheck.log" -Encoding utf8 -Append |
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
sudo apt autoremove --purge | |
#Remove VSCode Server Space Hog Bullshit | |
rm -rf /home/jcefoli/.vscode-server | |
# Clean Journal BS | |
sudo journalctl --vacuum-size=100M | |
# Remove logs | |
sudo -s |
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 | |
Powershell Script that will loop through a folder and run SQL scripts against a database | |
.Description | |
This script was developed to be used with VSTS. It must accept parameters, since VSTS variables cannot be used within scripts. Developers can specify a different SQL folder with each build | |
.NOTES | |
Version: 1.0.1 | |
Author: jcefoli |
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
<# | |
.DESCRIPTION | |
Copies the Windows Spotlight lock screen images in Windows 10 to a "Windows Spotlight" folder in My Pictures. | |
This script will intelligently sort through the temporary directory and will only copy images | |
that are 1920x1080. Since the filenames of the images can change, the script will also compare | |
SHA1 hashes of the existing so we don't copy duplicates. | |
.NOTES | |
Version: 1.0.2 |
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
param ( | |
[Parameter(Mandatory=$true)] | |
[string]$privateKeyFilePath | |
) | |
# Remove inheritance from the private key file to prevent inheriting permissions from parent directories | |
. icacls $privateKeyFilePath /c /t /Inheritance:d | |
# Grant full control to the current user for keys within the user profile directory | |
. icacls $privateKeyFilePath /c /t /Grant ${env:UserName}:F |
NewerOlder