Friday, June 3, 2022

Transform a wireless router into a switch

 To use an old wireless router as a switch to connect more devices, loosely follow these steps:

1) Connect router to network as a router (via the WAN port), temporarily.

2) Find its IP and via a browser connect to the router admin interface (depends on vendor).

3) Disable Wireless functionality, instructions depend on vendor. Example for DLink

4) Disable DHCP for router, instructions depend on vendor, look somewhere in LAN settings.

5) Save settings and reboot router.

6) Connect the "internet" cable to one of the LAN ports instead of WAN port, consider WAN port as "dead" now.

7) If it worked, all devices connected to the new switch will have IPs assigned by the main router.

- - -

8) If you need to change settings, reconnect via the WAN port again to access admin interface.

Monday, March 28, 2022

Nginx timeout setting

Taken from following Source:

https://ubiq.co/tech-blog/increase-request-timeout-nginx/

Increase Request Timeout in NGINX

If you want to increase request timeout to 300 seconds, then add proxy_read_timeout, proxy_connect_timeout, proxy_send_timeout directives to http or server block

http{
   ...
   proxy_read_timeout 300;
   proxy_connect_timeout 300;
   proxy_send_timeout 300;
   ...
}

In the above case, the request timeout will be increased for all servers in your NGINX configuration file.

If you want to increase request timeout only for a specific server or subdomain, then add proxy_read_timeout, proxy_connect_timeout, proxy_send_timeout directives for its server block.

server{
   ...
   proxy_read_timeout 300;
   proxy_connect_timeout 300;
   proxy_send_timeout 300; 
   ...
}

If you want to increase request timeout only for specific folder or URL, then add proxy_read_timeout, proxy_connect_timeout, proxy_send_timeout directives for that specific location block.

location /upload {
   ...
   proxy_read_timeout 300;
   proxy_connect_timeout 300;
   proxy_send_timeout 300; 
   ...
}

For large values, you can also specify time units such as 1d for 1 day.

Sunday, March 27, 2022

Thursday, June 10, 2021

ImageJ/FIJI settings file

 ~/.imagej/IJ_prefs.txt on Linux

Friday, June 4, 2021

CMake cannot find CUDA

specify CUDA_TOOLKIT_ROOT_DIR to cmake:
cmake -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-5.5 
Source: https://stackoverflow.com/questions/19980412/how-to-let-cmake-find-cuda 
important to have the version at the end of path in my own experience 

Thursday, May 6, 2021