Skip to content

Instantly share code, notes, and snippets.

View asheroto's full-sized avatar
😎

asheroto

😎
View GitHub Profile
@asheroto
asheroto / IsPortActive.md
Last active June 24, 2023 06:53
Check if a port is active/open/listening in PowerShell.
@asheroto
asheroto / install-docker.sh
Last active April 13, 2021 10:53
Install Docker on Linux simply in one go
#!/bin/bash
sudo apt update
sudo apt install curl wget git -y
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker $(whoami)
rm get-docker.sh -f
sudo apt install docker-compose -y
@asheroto
asheroto / wordpress-security.sh
Created May 2, 2021 03:53
WordPress chmod / security - standard recommendations. Run script at the root of the website (where wp-content, wp-config.php, etc is located).
#!/bin/bash
find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
chmod 755 wp-content;
find wp-content/ -type f -exec chmod 644 {} \;
find wp-includes/ -type f -exec chmod 644 {} \;
mkdir wp-content/uploads; find wp-content/uploads -type f -exec chmod 755 {} \;
chmod 444 wp-config.php;
@asheroto
asheroto / EnableRDP.ps1
Last active February 20, 2025 02:17
Enable RDP on a computer with PowerShell.
# Warning
Clear-Host
Write-Output "Run this script on the computer you want to access via RDP"
Write-Output ""
# Ask
Write-Output "Remote address can be an IP address or network with CIDR"
Write-Output "Example: 192.168.0.5 or 192.168.0.0/24"
Write-Output ""
$RemoteAddress = Read-Host "Remote Address"
@asheroto
asheroto / Android-Low-Volume-Fix.md
Created May 29, 2021 06:33
How to fix Android in-call speaker volume too quiet!
  • You must have developer mode enabled
  • Go into Settings > System > Developer Options
  • Enable "Disable absolute volume"
  • Reboot phone
@asheroto
asheroto / Disable-VS2019-Telemetry.cmd
Last active June 7, 2021 10:03
Disables Visual Studio 2019 Telemetry
@echo off
:: Confirm running as administrator
fltmc >nul 2>&1 || (
echo This batch script requires administrator privileges. Right-click on
echo the script and select "Run as Administrator".
goto :die
)
:: Change this path if you are using Community or Professional editions
@asheroto
asheroto / Batch-File-Check-Administrator.cmd
Last active June 7, 2021 12:35
Confirms if you are running the BAT/CMD script as administrator and prompts you to do so if not.
@echo off
:: Confirm running as administrator
fltmc >nul 2>&1 || (
echo This batch script requires administrator privileges. Right-click on
echo the script and select "Run as Administrator".
goto :die
)
:: Your code starts here
@asheroto
asheroto / FixSLNicon.md
Last active August 29, 2021 09:14
Fix .sln file icon (Visual Studio) if it is wrong/broken/blank in Windows Explorer
  1. Open regedit
  2. Delete the key HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sln
  3. Delete the key HKEY_CLASSES_ROOT\.sln
  4. Right-click an sln file and click Open With
  5. Click More Apps, then Look for another app
  6. Specify the path to VSLauncher: C:\Program Files (x86)\Common Files\Microsoft Shared\MSEnv\VSLauncher.exe
@asheroto
asheroto / Access-Work-or-School-Grayed-Out-Fix.md
Last active January 9, 2022 12:07
Windows 10 Accounts - Your Info - Sign-In Options - Email & Accounts - Access work or school - Settings Grayed Out Fix

Check the subkeys under

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PolicyManager\default\Settings

and for each one, set the value of the "value" DWORD to 1 to allow access or 0 to deny access.

@asheroto
asheroto / play-sound.ps1
Last active October 18, 2021 04:19 — forked from murven/play-sound.ps1
Play sound in PowerShell
# Native sound player (wav only)
$player = New-Object System.Media.SoundPlayer "$env:windir\Media\notify.wav"
$player.Play()