• Store Steam Library on Nas Server


    By default steam library will be installed to your home directory when installed on linux. Unfortunately my drive only 128GB, not enough to install most AAA title. Fortunately I have NAS server with large storage. It would be nice to put game library on this server. That way I can share it between linux and windows (hopefully). How To Create NFS share on your NAS. This is an example of my configuration. It can only be accessed from ip address 192.168.88.10 (my desktop pc). "/mnt/md0/games" 192.168.88.10(rw,async,insecure,no_subtree_check,no_root_squash) Mount your NFS share into local directory. You can use mount command or add entry on your /etc/fstab # /etc/fstab # ... 192.168.88.2:/mnt/md0/games /home/zackad/Games nfs defaults,noatime,users,exec 0 0 Make sure that you add exec at the end of option, otherwise steam will complain about your mount missing execute permission Open steam Settings -> Downloads -> Steam Library Folder

  • Configuring Beelink SER3 to Auto Start on Power Loss


    Power ON your mini-pc and press Del key on your keyboard until you enter BIOS mode. Navigate to Advanced tab Select AMD CBS menu Select FCH Common Options Select AC Power Loss Options Select your preferred mode when AC Power is loss. In my case I want it to auto turn on when AC power lost and the machine is powered on, so I choose “Previous”

  • Installing Aequilibrae plugin on QGIS linux


    Problem Depending on your current setup, you might not be able install and use Aequilibrae plugin out of the box. I have this problem on linux and macos system. It works flawlessly on windows system. Just follow the manual and you good to go. Solution It take me quite some time to figure it out what exactly the problem. Basically it come down to: missing dependency bug on download binaries functionality incompatible compiled binary version provided by plugin author Here the steps I do to fix this problem

  • Reset USB Connection Without Un-pluging on Linux


    I’ve been playing games on linux lately. Unfortunately most of them is windows game that I run using steam proton or wine. None of them has native support for linux and has some problem either when launching or terminating. In most cases I’m using either SIGKILL or SIGTERM to stop the process. Because of this ungracefull process ternimation my wireless xbox controller going caput and refuse to re-connect. The solution is easy, just unplug and re-plug the usb wireless receiver.

  • How To Run Windows Game with Vanilla Wine on Linux


    What Gaming on linux getting better and better in the last couple of years thanks to Steam and project like proton. This is my take on how to play windows game that doesn’t available on steam or some pirated version to try before buying. Ideally I would use proton to run windows game/application but I can’t make it work. Proton/steam always complaint about execute permission on mounted disk. I store most of my data on NAS server mounted with samba or NFS. Whatever tweak I use, steam wont recognize it as valid mount. I can’t even use my mounted NAS as steam library folder. This force me to ‘sacrifice’ litle space on my local drive to be used as steam library folder. Fortunately by using wine I can run whatever application/game stored in whatever directory/network mounted share.

  • Fixing Slow Boot After Turning Off Swap on Linux


    Why Turning-off swap? Most of the time I have terrible experience when using swap. Whenever I have Out Of Memory (OOM) error, my computer freeze and become unusable that I have to hard reset it. Other time when the swap is actively being used, it make my system become unstable and not responsive because the system trying to access data from the swap. It’s a slow process that sometime require a few minutes before I can kill some applications to reclaim some memory.

  • Re-Installing TerraMaster OS (TOS) After It Broke


    Why? After I update TerraMaster OS (TOS), I’m also installing some application that unfortunately got stuck on 50% progress for a long time. The application I want to install are Transmission (bittorent client) and Aria2 (multi protocol download client). Both of them got stuck at 50% progress. With no option to cancel installation process and getting impatient, I decide to reboot my server and all of sudden I can no longer able to access my server. Accessing web control panel got connection refused, accessing ssh also refused.

  • How to get simple stats from git repository


    Actual script This script will print commit stats grouped by author in the current git repository. Save into your PATH e.g ~/.local/bin/gstats and give it execute permission (chmod +x ~/.local/bin/gstats). #!/usr/bin/env sh echo "Generating simple stats for this repository" for author in $(git shortlog -s | cut -c8- | xargs) do echo -e "\nStats for \"$author\"" # Copied from: https://gist.github.com/eyecatchup/3fb7ef0c0cbdb72412fc git log --shortstat --author=$author \ | grep -E "fil(e|es) changed" \ | awk '{files+=$1; inserted+=$4; deleted+=$6; delta+=$4-$6; ratio=deleted/inserted} END {printf "Commit stats:\n- Files changed (total).. %s\n- Lines added (total).... %s\n- Lines deleted (total).. %s\n- Total lines (delta).... %s\n- Add./Del. ratio (1:n).. 1 : %s\n", files, inserted, deleted, delta, ratio }' - done Usage Navigate into your git repository and type gstats command, this will output something like this.

  • How to self hosting git with http server


    Goal Can list git repository similar to http://git.php.net Web insterface used only for public view, security is not a concern Easy to provision and tear down TL;DR Create directory where to store your repositories Run docker run -p 1234:1234 -v /your/repo:/srv/gitweb/repo zackad/gitweb -d Manual Steps Create a working directory mkdir git-webhosting cd git-webhosting Create Dockerfile with following content FROM ruby:2.6-alpine RUN apk add --no-cache git git-gitweb perl-cgi \ && mkdir -p /srv/gitweb/repo \ && cd /srv/gitweb \ && git init WORKDIR /srv/gitweb COPY entrypoint.sh /srv/gitweb/entrypoint.sh COPY gitweb_config-example.perl /srv/gitweb/gitweb_config-example.perl EXPOSE 1234 CMD './entrypoint.sh' Create an entrypoint file with following content #!/usr/bin/env sh if [ -z "$1" ]; then # Start gitweb server on port 1234 git instaweb --httpd=webrick # Override config file with example, you can override with your own config cp gitweb_config-example.perl ./.git/gitweb/gitweb_config.perl # Prevent container to exit tail -F .git/gitweb/access.log else exec "$@" fi Create configuration for gitweb and name it gitweb_config-axample.perl #!/usr/bin/perl our $projectroot = "/srv/gitweb/repo"; our $git_temp = "/srv/gitweb/.git/gitweb/tmp"; our $projects_list = $projectroot; our $projects_list_categories_group = 1; $feature{'remote_heads'}{'default'} = [1]; Build the docker image with docker build git-hosting:latest . Start container with docker run -p 1234:1234 -v /your/repo/path:/srv/gitweb/repo git-hosting:latest -d Open your browser and access http:127.0.0.1:1234 Now you can add your projects into /your/repo/path/ and it will be automatically updated in web interface Further Action You can add this container into your server with some reverse proxy to add SSL for secure access. My main purpose of this system if for mirroring and peace of mind knowing that I can host all my project in an environment where I have total control.

  • Python For Beginner (Not Really Beginner!)


    WARNING: This article is not for beginner in programming, but for python beginner. If you want to learn python as your second (or 3rd, 4th, nth, …) language, this guide will give you some advice to manage your code and project structure. Preview Step 1 — Choosing Python Version Depending on your operating system, python might already installed. Try to type python --version on your terminal and see which version is installed. Sometime multiple version of python is installed in a single machine (version 2 and version 3). You can check by typing on your terminal

subscribe via RSS