• Linux,  Windows

    Reducing WSL-2 Memory Usage

    Execute the following command (as root): To put in in a crontab, to execute every 6 hours (assuming the script with the command at /root/clean_caches.sh): Source: https://github.com/microsoft/WSL/issues/4166

  • Linux

    RDP server on Kubuntu 18.04

    These steps allow remote access to the graphical terminal on a Kubuntu 18.04 installation. Install the following packages Enable the xrdp service Check that the xrdp server is listening (port 3389 should be active and open in the system’s firewall) Create the following files to prevent password authorization prompts during RDP login:

  • iptables,  Linux

    IPTables tips

    Some tips for iptables   Listing nat rules iptables -t nat -v -L POSTROUTING -n --line-number Delete a certain rule iptables -t nat -D POSTROUTING (from https://www.cyberciti.biz/faq/how-to-iptables-delete-postrouting-rule/ ) Create a rule to redirect outgoing packets for a certain IP/port iptables -t nat -A PREROUTING -p tcp -d OLD_IP --dport 80 -j NETMAP --to NEW_IP (from https://linux-tips.com/t/rewriting-destination-ip-address/221)

  • CentOS,  Linux

    CentOS firewall-cmd tips

    Some tips for CentOS 7 firewall-cmd tool:   Allow openvpn firewall-cmd --zone=public --add-service openvpn --permanent firewall-cmd reload Add a rule firewall-cmd --zone=public --add-port=8080/tcp --permanent firewall-cmd reload  

  • GIT,  Programming

    GIT list status on all directories

    To list status on all git repositories in a folder:     find . -maxdepth 1 -mindepth 1 -type d -exec sh -c '(echo {} && cd {} && git status -s && echo)' \;   (from https://coderwall.com/p/grmruq/git-status-on-all-repos-in-folder)

  • Matlab,  PhD

    Matlab under VMWare

    If a message similar to this appears: com.jogamp.opengl.GLException: X11GLXDrawableFactory - Could not initialize shared resources for X11GraphicsDevice[type .x11, connection :0, unitID 0, handle 0x0, owner false, ResourceToolkitLock[obj 0x413b9df1, isOwner false, [count 0, qsz 0, owner ]]] at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:326) at jogamp.opengl.SharedResourceRunner.run(SharedResourceRunner.java:297) at java.lang.Thread.run(Unknown Source) Caused by: com.jogamp.opengl.GLException: glXGetConfig(0x1) failed: error code Unknown error code 6 at jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration.glXGetConfig(X11GLXGraphicsConfiguration.java:570) at jogamp.opengl.x11.glx.X11GLXGraphicsConfiguration.XVisualInfo2GLCapabilities(X11GLXGraphicsConfiguration.java:500) at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationXVisual(X11GLXGraphicsConfigurationFactory.java:434) at jogamp.opengl.x11.glx.X11GLXGraphicsConfigurationFactory.chooseGraphicsConfigurationStatic(X11GLXGraphicsConfigurationFactory.java:240) at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createMutableSurfaceImpl(X11GLXDrawableFactory.java:524) at jogamp.opengl.x11.glx.X11GLXDrawableFactory.createDummySurfaceImpl(X11GLXDrawableFactory.java:535) at jogamp.opengl.x11.glx.X11GLXDrawableFactory$SharedResourceImplementation.createSharedResource(X11GLXDrawableFactory.java:283) ... 2 more Just configure Matlab to run with software opengl: >> opengl(‘save’,’software’)