This file contains hidden or 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
Get-Item -Path HKLM:\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters | Remove-ItemProperty -Name "DisabledComponents" |
This file contains hidden or 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/bash | |
if [ "$EUID" -ne 0 ] | |
then echo "Please run as root" | |
exit | |
fi | |
apt-get install pkg-config libmagickwand-dev -y | |
cd /tmp | |
wget https://pecl.php.net/get/imagick-3.4.4.tgz | |
tar xvzf imagick-3.4.4.tgz |
This file contains hidden or 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 | |
Connect to Azure Redis CLI over TLS instances using Stunnel. | |
.Description | |
This script helps you manage connecting to multiple redis instances in Azure by modifying the stunnel config automagically | |
ASSUMPTIONS AND WARNINGS: | |
============================== | |
- Must run in an elevated PowerShell prompt |
This file contains hidden or 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
# Based on: https://blogs.msdn.microsoft.com/virtual_pc_guy/2010/09/23/a-self-elevating-powershell-script/ | |
# Get the ID and security principal of the current user account | |
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() | |
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) | |
# Get the security principal for the Administrator role | |
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator | |
# Check to see if we are currently running "as Administrator" |
This file contains hidden or 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
$i=0; Get-Content input.txt -ReadCount 25 | %{$i++; $_ | Out-File out_$i.txt} |
This file contains hidden or 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 | |
Create Clustered Private MSMQ Queues And Grant Windows User Permissions | |
.NOTES | |
Version: 1.0 | |
Author: jcefoli | |
Creation Date: 10/27/2018 | |
Run this on the active MSMQ cluster node. It may fail if run on the inactive node, as it will not be able to access the queues |
This file contains hidden or 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 script will prevent GPOs from enabling the screensaver, shutting off your screen, or force-locking your workstation | |
It works by sending an F15 keystroke every minute (only if there have been no keystrokes or mouse movement for 30 seconds) | |
Be green - if you want to use this, power off your monitor(s)! | |
#> | |
Add-Type @' | |
using System; | |
using System.Diagnostics; | |
using System.Runtime.InteropServices; |
This file contains hidden or 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
[Reflection.Assembly]::LoadWithPartialName("System.Messaging") | Out-Null | |
#Define Queue Connection Info Here (In this case, we're passing the IP to a clustered MSMQ instance) | |
$fromQueueConnString = "FormatName:Direct=TCP:172.1.1.1\private$\queue_to_copy_messages_from" | |
$toQueueConnString = "FormatName:Direct=TCP:172.1.1.1\private$\queue_to_copy_messages_to" # Make sure this queue exists - I don't create it and it might fail | |
# Get Queue Size - https://stackoverflow.com/a/2291087 | |
$qsource = @" | |
public class QueueSizer | |
{ |
This file contains hidden or 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
# Show permissions | |
git ls-tree HEAD | |
# Make Executable | |
git update-index --chmod=+x some_file.sh |
This file contains hidden or 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
040e67fa7ece009d4becef9f4d74ddb8d0986b60c8acf9a72f0647aae4c39fd407c5207f2c78b3c8bd9612dd13f7d6bc4b39b5bb91a4fdbb5fa6ddb8c120f03f22;webandtech |