Author Archives: dmitriano

How NSIS plugins work

NSIS plugins are regular DLLs that export functions with typical def-files like this:

LIBRARY MY_NSIS_PLUGIN
EXPORTS
    AddUser      PRIVATE    
    CreateHive   PRIVATE
    ...

They should be put to “C:\Program Files\NSIS\Plugins\x86-ansi” directory for NSIS v3.x. From nsi-script their functions can be called like this:

Function MyFunc
  ...
  MY_NSIS_PLUGIN::CreateHive
  ...
FunctionEnd

(more…)

How to debug classic ASP with VS2015 and IIS Express

Change configuration/system.webServer/serverRuntime/asp section of $(SolutionDir).vs\config\applicationhost.config file to:

<asp scriptErrorSentToBrowser="true" enableParentPaths="true" bufferingOn="true" errorsToNTLog="true" appAllowClientDebug="true" appAllowDebugging="true">
    <cache diskTemplateCacheDirectory="%TEMP%\iisexpress\ASP Compiled Templates" />
    <session allowSessionState="true" />
    <limits />
</asp>

Open the website in a browser and then in VS2015 go to Debug->Attach To Process, change code type to Script and select iisexpress.exe. After that in browser navigate to a page you want to debug and Script Documents section will appear in Solution Explorer allowing you to set breakpoints on listed pages. Actually you do all the steps described in this post, except that you edit not the global IIS Express configuration, but local configuration located in VS2015 solution subdirectory .vs\config.

Links:

Setting up Squid proxy on Ubuntu 16.04 to browse blocked websites

Squid 3.5.12 can be installed and tested on Ubuntu 16.04 with the following commands:

sudo apt install squid
service squid start
sudo ufw allow 3128/tcp
wget -e use_proxy=yes -e http_proxy=http://localhost:3128 http://google.com

by default Squid listens on port 3128.

At first, Google Chrome started with Squid proxy from some external IP address:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --proxy-server=http://developernote.com:3128

(more…)

How to prevent automatic restart after installing updates in Windows 10

Press Win+R, type “gpedit.msc” and press Enter:

In the opened window go to “Local Computer Policy->Computer Configuration->Administrative Templates->Windows Components->Windows Update and set “Configure Automatic Updates” and No auto-restart for scheduled Automatic Update installation” to Enable.

(more…)

How to add a program to startup in Windows 10

Press Win+R, type ‘shell:startup‘ or ‘shell:Common Startup‘ and press Enter:

(more…)

How to edit Windows 10 boot menu

Press Win+R, type ‘msconfig‘ and press Enter:

(more…)

Installing NVIDIA Driver on Ubuntu 16.04 and 18.04

I am not sure if there were NVIDIA drivers when I installed Ubuntu 16.01 on a machine with Intel processor and GTX 1060 graphic card, but at least I saw this in the terminal (it is not clear what actually FAILED):

(more…)

Installing Google Play Services on a Windows 10 with MS VS2015

If Android support is enabled in MS VS2015, it installs Android SDK without Google Play Services and I did not find an option in SDK Manager that installs them. When I started “C:\Program Files (x86)\Android\android-sdk\SDK Manager.exe” with admin privileges, it automatically offered to install some 9 packages:

(more…)

GeForce GTX 1060 does not trigger the boost state (Solved)

MSI GeForce GTX 1060 3GB graphic card does not trigger its boost state when its GPU is loaded at 99-100% with NiceHash miner. Compare the values in the green rectangles:

(more…)

How I fixed 504 Gateway Timeout error on Nginx + PHP-FPM

Today I got 504 Gateway Timeout error while updating my Joomla website and solved this issue by adding “fastcgi_read_timeout 300” into Nginx virtual host:

location ~ \.php$ {
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_pass unix:/run/php/www-shar.sock;
    fastcgi_index index.php;
    include fastcgi.conf;
    fastcgi_read_timeout 300;
}

I already had request_terminate_timeout option set to 300s in the pool configuration file:

; The timeout for serving a single request after which the worker process will
; be killed. This option should be used when the 'max_execution_time' ini option
; does not stop script execution for some reason. A value of '0' means 'off'.
; Available units: s(econds)(default), m(inutes), h(ours), or d(ays)
; Default Value: 0
request_terminate_timeout = 300s

(more…)