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

Monday, May 28, 2018

GDPR my ass, fix your products first

Some examples:

1. Last ~10 versions me and some folks have a problem with Google Chrome staying logged in. Every time we close the browser and open it we must login again so at least we are in sync with bookmarks or site passwords
2. Sometimes you cannot disable Autoplay on YouTube ...
3. Most of the sites shoots you in the face with cookies policy, "You should disable AdBlock to continue" rant, awkward interfaces and more shit while they forget they need to optimize to lower that annoyingly high CPU load
4. Facebook - a whole other story, sometimes I think they must just close their doors (around 5000 LoC when entering Home page, rly?)

Don't talk about some rights while you already track everyone through different channels, just fix your products

Saturday, May 19, 2018

Quality of products #2 - AMD drivers

AMD and their never-ending story of badly written drivers ...

Writing this means I'm in a 20min session of trying to deinstall them and put older version because they don't allow me to set the refresh rate above 60Hz on Dell P1130, a CRT manufactured in 2003 (yes, those monitors are fully compatible with modern videocards). Seems AMD never will fix those refresh rate problems while NVIDIA (speaking from my experience, had 2-3 times the same problem  but generally they are ok) always worked. The driver version is 18.4.1, videocard is AMD R7 360, operating system is Windows 7 x64, and yes - I have a laptop with AMD HD7670M which allows me to set 120Hz without a problem

Thursday, May 3, 2018

Quality of products #1 - Zalman coolers

Just installed a brand new Zalman's CNPS10X Optima on AsRock X79 Extreme9 motherboard and noticed two things:
1. While tightening the 4 main bolts of the cooler, and (very plausible) due to poor finishing and maybe bad design, there's a very high chance the user to create filings by the friction between the bolts and Intel clips (filings are barely visible with naked eye) that can SHORT-CIRCUIT the motherboard or other components during power on or working state!!! I was lucky to saw that before powering on the machine and to have a small magnet to collect them (I hope all of ...)
2. It's not possible to use closest to the cpu socket RAM slots (this particular motherboard has 8 slots) due to the cooler's inadequate design. They gave requirement that modules should be no taller than 44mm (mine are ~34mm with original RAM sinks, and can hit the cooler or its clips), while in fact the two possible positions of the cooler blocks modules with the cooler (especially if you lower it like in the user's manual recommendation to put some airflow and under the fins) or with fan fixing clips.

Great product, Zalman!

Tuesday, February 27, 2018

BAN all cheating Russians

If you have admin rights for a game server or a hosting a game which offers checking player's nationality with high accuracy - BAN all cheating russians. Two days ago finished my research how many of them must be banned, and the numbers (sorry, details are not available due to the techniques used in the research) are around 95% from all gathered player accounts. They feed, they spam in chat, they use exploits found in the games, they use all types to break the system. Just ban them. Thank me later

Tuesday, December 26, 2017

Decline of Dota 2 and maybe the genre

What the player will think when he or she starts to play Dota 2 (one of the most popular MOBA titles that has a History), and finds the following (I will try to make the list very short):
  1. Toxic behaviour of (I will say a lack of) community, where people are offended when someone explains their mistakes during a match, and as usuall they report him. For example the notorious commend system put people with NORMAL behaviour in single draft low priority punishment queue, where the player must win only 1 match to be freed and where the average matches lost are maybe above TEN. And this happens only because ...
  2. ... there's no ban-list system per user, we are still in 2017 and there's no better than WC3 BanList. It's weird that VALVE, the company developing Dota 2, has a perfect solution incorporated as ban feature in CS Source/GO server. They must only add this in Dota 2 with synchronization of banlists between players and we are good to go.
  3. Balance issues. A lot of people told me through years that the heroes and items are balanced and the problem is in me, but if a normal person analyzes the matches he or she will definitely find a pattern in successful game-play styles which include same items and skill combos used 10-15 years ago. This means that the fastest gold collector in the game is usually the winner - first big and powerful item assembled changes win chances a lot for the bearer

Well, probably will say a nice harsh words and go play outside :)
...
Yeah, if a normal player is playing every day, for example 2 to 5 matches with 1:1 win-loss ratio (the majority of players (even the best ones) have this ratio (I'm not kidding), and crash into these problems, he will try harder with increasing the matches to try different strategies and this automatically means MORE matches lost and generate MORE frustration. To the level where he or she refuses to play Dota 2 anymore or similar games

Thursday, June 13, 2013

A simple way to detect mouse-click on a page element and opening a popups

document.onclick = document.getElementsByTagName('td').onclick = function(e)
{
  if (e.target.tagName.toLowerCase() == 'td' && e.target.parentNode.id != '')
  {
    document.getElementById('popupbg').style.visibility = "visible";
    document.getElementById('popup').style.display = "inline";
    document.getElementById('popupresults').style.display = "inline";
    /* On this line you can put some logic for getting values and sending them to some PHP script
    For example 'e.target.parentNode.id;' can be used as SQLite table row variable for
    SELECT/INSERT/DELETE queries
    Another example is using 'document.getElementById('popupresults').innerHTML' for visualising
    the answer of the PHP script */
  }
};

This small snippet works on Firefox and Chrome (not tested on IE and Opera) and does the following:
  • detects the tag of a clicked element
  • checks if its parent has an id (usefull for AJAXing values from some HTML table to PHP) and sends the data using your home-brew AJAX function
  • reveals divs that hold popup data (div 'popup', div 'popupbg' for disabling clicking on background elements, div 'popupresults' for visualising the PHP answer; all of them can use 'display: none' or 'visibility: hidden' CSS attributes as default visual state)

Wednesday, March 20, 2013

Vintage3D.org - cool site for benchmarking old videocards

Vintage3D is a web-site, dedicated to remember and find new information about first generation of gaming 3D cards.

Short review from the creator:

This page is to remember and find new information about first generation of gaming 3D cards. What is first gen? Well there are many definitions, common one would probably define three early generations of early 3d gaming chips: first geometry accelerators like Millennium or Imagine 128 II, than first texture mappers like Gaming Glint or Virge and finally "mature" architectures like Verite and Voodoo. I want to cover all of this range from very first accelerators (if possible) to anything released before Voodoo2. From there on 3d chipsets were having more and more comprehensive reviews and are therefore well known. I want to show barely tested chips in extensive collection of real games. The benchmark suite currently consist of around 40 games from 1996 to 1999 and 2-3 artificial benchmarks. Reviews are not done from user perspective. I am trying to examine and compare performance, which means no proprietary APIs. Cards are tested with latest or best available drivers and in a system saturating video accelerators with power unreachable at that time. In the future I might build a low end rig to examine performance in budget PC. Main purpose is to learn about chips which where not reviewed extensively in ways we are used to now. In fact, information about gaming performance of most first generation cards is remembered almost only through word of mouth. I am not professional hardware reviewer, neither graphics technology expert, but I will try to do my best to reveal real capabilities of vintage 3D cards.
My benchmarking practices are definitely not the best. I don't run the tests more times unless the results seems off. I simply don't have enough time. Also most of the old boards lack the option to disable vsync despite trying various tweakers. Because of this I run all the tests with vsync, unless the application itself can disable it. This shouldn't be much of a problem with some high speed CRT, but I have only LCDs now. Therefore 75 Hz is used. Still the results have value, since vsync is almost always on by default and most of users don't change video settings. The performance corresponds with user experience, however speed differences between cards can be skewed.
 

Thursday, March 14, 2013

Today is a great day ...

Just faced a problem that pushed me to the dark side. Long story short my small project tracking system on OpenWRT router doesn't work anymore cause important for it php extension sqlite can't use the database file. Some lock-ups due to newer libsqlite3 version which is not compatible with php 5.4 version for OpenWRT, but required for subversion-server. I don't know what to say more (lost at least 1-2 hours to understand what's the problem), but installed the original firmware and did the right thing - got a new 'real' server based on Ubuntu Server 12.10

Sunday, February 24, 2013

Fixing the 'SQLite compiled ...' problem on OpenWRT

Some users maybe noticed that after installing subversion server on their OpenWRT device (mine is Tp-Link TL-WR1043ND with ATTITUDE ADJUSTMENT (bleeding edge, r31214)) they cannot import or export files to it due to old libsqlite3. So, to fix it, just update the library with the following commands:
opkg update
opkg upgrade libsqlite3

Then stop and start the server with:
/etc/init.d/subversion stop
/etc/init.d/subversion start

There you go - no more sqlite error when transferring files :)

Important: It is possible to face the 'General error 5: database is locked' even when svn server is removed. Probably the reason is somewhere in PDO and usage of newer libsqlite3 version ... Doh