Wednesday, November 23, 2022

How to check if the HDD or SSD are 4k aligned

Just type in command prompt as administrator:

wmic partition get BlockSize, StartingOffset, Name, Index

The last column in the output is the offset in bytes for where each partition starts, if this value is divisible by 4096 without a reminder then the partition is aligned. For example:

C:\Windows\system32>wmic partition get BlockSize, StartingOffset, Name, Index

BlockSize  Index  Name                   StartingOffset

512        0      Disk #0, Partition #0  1048576

512        1      Disk #0, Partition #1  105906176

512        0      Disk #1, Partition #0  135266304

512        0      Disk #2, Partition #0  1048576

This shows that all partitions are aligned (under NTFS)

Tuesday, August 30, 2022

Worst game servers in Europe #2: [BlER]Wiese >>> Italy [ONLY] <<< [css] Counter Strike Source

Name: [BlER]Wiese >>> Italy [ONLY] <<< [css] Counter Strike Source

IP address: 94.249.194.112:27015

Reason: Decided to do some casual shooting after years after abandoning the fps genre ... First time joining in that server and instantly detected one wall-hack cheater in it. Got kicked when pointed the obvious

Sunday, March 21, 2021

Dyson Sphere Program - optimization training game

Dyson Sphere Program


Dyson Sphere Program



Warning! Shortest review ahead!


Goal - eat all planet resources and build Dyson spheres

Pros - trains you in optimization techniques. Players doing OCD-layered buildings don't realize the power of spaghetti code

Cons - not fully automated and half of the time in-game camera tries to cut your nerves

Conclusion - The game is not bad, it's a casual production simulator at galactic scale. Give it a try (around 100-120 hours of gameplay to first finished sphere)

Thursday, September 19, 2019

Introduction to scoop

Scoop is a tiny command-line installer for Windows, which helps to organize user's apps in more convenient way. All of them are installed by default in home directory or in selected by the use directory, and of course this is not the only feature: - updating all of them with one command - continuously growing database of supported apps - fully portable between Windows version that support at least PowerShell 5 and .NET Framework 4.5 Those features mean the users finally have a tool similar to Linux package managers like dpkg/apt, yum/dnf, portage (btw very powerful), slackpkg, Homebrew for MacOS and Chocolatey/Ninite/OneGet for Windows. It works like this (assuming the user OS meets the requirements):
1. Open a PowerShell command prompt 
2. Write "scoop search nameofyourapp"
3. If it's found in the buckets (collections of apps in scoop) write "scoop install name-of-your-app"
4. After successful app installation (scoop warns if there are problems during installation procedure and suggests what to do to fix them) the user must open "Start Menu -> All Programs -> Scoop Apps" and click on the corresponding shortcut to start the freshly installed application
There are also limitations: - number of bucketed apps is still less than those in Chocolatey - sometimes changes in app version or small code errors in app manifests block the user from successfully installing or updating desired apps. Usually an update to scoop fixes that because the whole development is on GitHub where every scoop user can report the problems

Friday, June 21, 2019

GDPR compliance in a nutshell

Recently MongoDB added field encryption in version 4.2. This means if there's a request to delete all user data (stated in GDPR) administrator can delete the encryption key(s) which is used for access to the personal data. So no key - no data ... right ... but the data is still there and probably ready to be brute-force decrypted. Nice try, MongoDB

Saturday, March 2, 2019

A simple check for power outages

Sometimes users leave their computers on for longer intervals than usual only to see later that they have stopped or worse - dead because there were power surges. Reasons for that - one of them is the power outage. Many haven't a good protection like UPS or backup power sources and it's good to know exactly when this happened. Relatively it helps to estimate when to shutdown the hardware preventing it from losing data or become broken. One simple way is to check when this occured with the following PowerShell command (assuming the user is using Windows Vista and above):

Get-EventLog -LogName System -EntryType Error | Where-Object {$_.EventID -eq 6008} | Select -Property Message | ForEach-Object { if ($_.Message -match "([0-9]{1,2}:.*[0-9]{4})") { Write-Output "System shutdown at $($Matches[1])"}}

This parses whole Event Log on the machine with level Error in System Log where the event ID is unexpected system shutdown (eventID 6008) and outputs the results using regexp for extracting the date and time:

System shutdown at 2:05:00 PM on ‎3/‎1/‎2019
System shutdown at 1:32:30 PM on ‎2/‎27/‎2019
System shutdown at 9:28:38 AM on ‎1/‎25/‎2019
System shutdown at 2:45:59 PM on ‎1/‎21/‎2019
System shutdown at 4:15:13 PM on ‎1/‎10/‎2019
System shutdown at 9:57:27 AM on ‎1/‎10/‎2019
System shutdown at 3:16:15 PM on ‎12/‎27/‎2018
System shutdown at 6:33:47 PM on ‎12/‎23/‎2018
System shutdown at 6:29:35 PM on ‎12/‎23/‎2018
System shutdown at 6:26:43 PM on ‎12/‎23/‎2018
System shutdown at 5:53:58 PM on ‎12/‎23/‎2018
System shutdown at 5:34:58 PM on ‎12/‎23/‎2018
System shutdown at 10:40:03 AM on ‎12/‎23/‎2018
System shutdown at 10:19:27 AM on ‎11/‎24/‎2018
System shutdown at 3:47:47 PM on ‎11/‎17/‎2018
System shutdown at 3:07:32 PM on ‎10/‎14/‎2018

Monday, October 29, 2018

How to fix '32bit only' guest OS issue in VirtualBox

Recently installed on one of my test machines latest version (5.2.20) of VirtualBox and found that it's not possible to install and run properly a 64bit guest OS, the only option was 32bit. The culprit was 'Hyper-V' enabled feature on Windows 8.1 x64 while Intel's VT-x was enabled in BIOS (AMD-v for AMD cpus). So, to remove this '32bit only' restriction, go to 'Control Panel > Programs and Features > Turn Windows Features on or off' and uncheck the box in front of 'Hyper-V', click OK and restart the machine. Problem solved

Sunday, October 21, 2018

Recently started to play Eve Online and already regret for that

Just a couple of random links:
The Real Reasons Player Population Is Declining
Eve Online Steam Charts
Bots Are Threatening Eve Online's Economy And Players Are Fed Up

Add to the equation too much clutter in the interface and that most of "successful" players are in fact already in large in-game groups where they multi-account and stay only for selling in-game currency ISK/PLEX/goods for real money gave me a big smile on my face :) This game called "Space simulator" is dead. DEAD.

Saturday, September 29, 2018

Fixing the annoying mouse wheel is easy

There are three ways to fix it when we are talking about rotary encoder based wheels:

1. First way and the easiest one is to squeeze gently the housing of the encoder with small straight pliers. This increases the pressure between metal teeth and the internal spring which brings better electrical contact
2. Second way is to open it and clean the teeth so they have better contact. After closing the housing it will be also good to squeeze it for better contact
3. Third way and technically harder is to desolder the encoder and change it

Thursday, August 23, 2018

Simple way to setup a real-time file synchronization between two or more Windows PCs in a local network

In this post I'll go directly to the steps needed to achieve some acceptable real-time file synchronization between two or more computers in a local network:

1. First find a good cat.5 or cat.6 cable(s), especially those that are shielded (including the connector), 1Gbit switch (or use a router with 1Gbit switch). 1Gbit because of the speed you will need if files are a lot and bigger (for example over 1GB). In the case you have only two PCs with free NIC ports, you can directly plug the both ends of the cable in the ports. Standard says that 1Gbit NICs can work with straight cable, but some can't detect it (ie 10/100Mbit NICs) so you will need a crosswired cable

2. If both PCs are directly connected with a cable, you must set their IP addresses/mask/gateways as following:
PC1 IP address: 192.168.XXX.2
PC1 Subnet Mask: 255.255.255.0
PC1 Gateway: 192.168.1.3

PC2 IP address: 192.168.XXX.3
PC2 Subnet Mask: 255.255.255.0
PC2 Gateway: 192.168.XXX.2

Make sure those addresses to be different from those used for the Internet connection!

3. If you are using a router or the machines are already in a local network, just make their addresses STATIC and DIFFERENT than those already assigned to their NICs. Wi-Fi local networks or a hybrid ones (wired and wireless computers in one local network) computers also won't have a problem to be used for real-time file sync but this type of connecton has drawbacks like lower throughput (low download/upload speeds) and sometimes the routers must be configured to not isolate Wi-Fi network from the wired

4. Share your drives (or folders) and to have full permissions (not asking for username or password and have full control for 'Everyone').

5. Set the sharing options (go to Control Panel\All Control Panel Items\Network and Sharing Center\Advanced sharing settings):

6. Install this tool - DSynchronize and configure it like this (you can put a lot more shared PC drives/directories in left and right panes, just remember to put them in a different job ... everything depends on your own needs):

7. And if everything is ok you will have a brand new near* real-time file synchronization between two or more

* I said near because there is some seconds noticeable pause, you can count exactly how much if you wait for 'ding' sound of the program

8. To be sure you have a good network capable of high speeds, it is a good idea to measure throughput between nodes/computers of your local network with tools like iperf3. There are enough tutorials about that, on one of the computers you must start iperf in server mode, and on the others you start it as a client