Solving tech problems

How to free port on Windows?

System Administration

So… All worked well, you were testing your website locally on some port and then suddenly it stopped working and you got an error that this URL can not be visited because this port is in usage. Can happen also if you have Angular local website, .NET local website in development… So, how you can get rid of this? Usually, these three commands will help you (in example is port 4200 – replace it with your own): Second command just put your port (4200 in this example) in excluded list,…read more

PATH variable optimizer and cleaner

System Administration

You will maybe run into the problem that your PATH variable length is higher than 2048 characters, which is allowed maxium. If this occurs your PATH setting will stop working and you need some automatic tool to optimize and clean your path by removing unused records and optimizing/shortening used records. Download the tool to do this here: https://www.softpedia.com/get/System/System-Miscellaneous/Windows-Path-Cleaner.shtml It is a command line tool and if you type for help: You will get this: To optimize your global (computer account) PATH variable type: To optimize your user’s PATH variable type:

How to delete locked folder in Windows

System Administration

Windows + R (Run) and type resmon.exe for ResourceMonitor Go to CPU section > Associated handles and in search box type your folder name (part of) You will see now which process is holding this folder and preventing it from deletion and in this case it is from TortoiseGit app. In order to disable this cache go to Tortoise Git > Settings > Icon Overlays and set Cache to None

Remove read-only attributes from WD (Western Digital) disk

System Administration

Right-click START and choose “Command Prompt” (run as administrator) Type “diskpart” and press Enter. Type “list volume” and press Enter. Type “select volume #”, where # is the number of the drive that’s giving you the “write-protected” error. You might be able to identify the drive by its size – your internal drives such as C, etc, are usually listed first also. Type “attributes disk clear readonly” and press Enter.

Disable zoom with mouse wheel in Firefox

System Administration

Open Firefox.  In the address bar type in about:config and press Enter. Click I’ll be careful, I promise.  Type mousewheel.with_control.action in the Search bar at the top of the about:config page.  Double-click mousewheel.with_control.action from the Preference Name column.  Enter the number 0 in the dialog box.  browser.gesture.pinch.in (cmd_fullZoomReduce -> empty string) browser.gesture.pinch.out (cmd_fullZoomEnlarge -> empty string) Click OK.  In order to disable multi-touch pinch zoom-in and zoom-out repeat the procedure as previous one and set: browser.gesture.pinch.in & browser.gesture.pinch.out to false. Alternatively you could try setting zoom.maxPercent & zoom.minPercent to 100…read more

Create self-signed SSL using OpenSSL

System Administration

This is how you can create self-signed SSL… Download OpenSsl installer first:https://slproweb.com/products/Win32OpenSSL.html Generate private key first:[YOUR_OPENSSL_BIN_PATH]\openssl.exe genrsa -out [YOUR_OUTPUT_PATH]\YourDomain.com.key 2048 Generate CSR request (set all data but set at the end empty password and company name):[YOUR_OPENSSL_BIN_PATH]\openssl.exe req -new -nodes -key [YOUR_OUTPUT_PATH]\YourDomain.com.key -out d:\Utils\Certificates\YourDomain.com.csr Generate certificate that is valid 10 years, or 3652 days[YOUR_OPENSSL_BIN_PATH]\openssl.exe x509 -req -days 3652 -in [YOUR_OUTPUT_PATH]\YourDomain.com.csr -signkey [YOUR_OUTPUT_PATH]\YourDomain.com.key -out [YOUR_OUTPUT_PATH]\YourDomain.com.cert Use this certificate for your email for example – set port 995 for incoming email and port 465 for outgoing email – put them into firewall (Inbound…read more

Solving PHPMailer and GMail connection failed issue

System Administration

Strange behaviour – it just stopped working 10 days ago and after a long search found a solution in specifying additional parameters in SSL connection, so working example should be like this: try { $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 2; $mail->SMTPAuth = true; $mail->SMTPSecure = ‘ssl’; $mail->SMTPOptions = array ( ‘ssl’ => array ( ‘verify_peer’ => false, ‘verify_peer_name’ => false, ‘allow_self_signed’ => true ) ); $mail->Host = “smtp.gmail.com”; $mail->Port = 465; $mail->IsHTML(true); $mail->Username = GOOGLE_SMTP_USERNAME; $mail->Password = GOOGLE_SMTP_PASSWORD; $mail->SetFrom(SMTP_USERNAME); $mail->Subject = “Test”; $mail->Body = “hello”; $mail->AddAddress(YOUR_RECEIVING_EMAIL); if(!$mail->Send()) {…read more

How to save 55$ for undelete software

System Administration

You probably accidentally deleted some important files more then once. It is especially sensitive when it comes to photos from your family trip and when you deleting by instinct with SHIFT+Delete (avoiding Recycle Bin). I did that today and I needed some simple data recovery software. I remembered that there is File Scavenger who can restore accidentally deleted files and I installed it. Scanned the drive, found my photos and when I wanted to recover them I found out that I need to buy the licence for 55$. I didn’t…read more