• TIL: You Can Track Playing Time of Non-Steam Game


    Update: 2024-01-28 This trick NO longer work If you want to track your gaming session (and other application usage) on windows, give ProcrastiTracker a try. In linux I recommend Lutris. Original Article If you have non-steam game[0] added to steam launcher, one feature that missing is ability to track playtime. It turn out that you can simply move your non-steam game into steam library folder and it will recognize the game and add playtime tracking just fine.

  • I Give Up on Linux Gaming


    Over the last few years I’ve been using linux desktop as main workspace and upgrade it into relatively powerfull machine. Either for software development, data analysys, and gaming. Unfortunately the gaming part is the most painfull experience for me. It’s just unreliable to play games on linux environment. You never know if the game you try to play will run or not. Everytime I update my system (kernel update, driver update, application update) something just broke.

  • Build and Configure PHP with phpenv+php-build


    Step 1 - Install The Tools Install phpenv $ git clone https://github.com/phpenv/phpenv.git ~/.phpenv Install php-build as phpenv plugin $ git clone https://github/com/php-build/php-build.git ~/.phpenv/plugins/php-build Add phpenv into PATH (put into .profiles/.bashrc/.zshrc or something similar) export PATH="${HOME}/.phpenv/bin:{$PATH}" eval "$(phpenv init -)" Reload your shell / Re-open your terminal Step 2 - Update Definitions We need to update php-build definitions periodically to get the available php versions. $ cd ~/.phpenv/plugins/php-build $ git fetch $ git merge origin/master --ff Step 3 - Compiling $ PHP_BUILD_CONFIGURE_OPTS="--with-sodium --with-pgsql --with-pdo-pgsql --with-zip --with-json --with-xml --enable-fpm" \ PHP_BUILD_XDEBUG_ENABLE=off \ PHP_BUILD_INSTALL_EXTENSION="apcu=5.

  • Reclaim Video Memory for Headless Server


    I bought a Beelink SER3 mini pc for my home server. It has 8GB memory and 256GB storage. Barely enough for my use case to run several service such as vaultwarden, nextcloud, freshrss, plex media server and other thing. In the future I might want to install gitlab or youtrack. For that I need to upgrade the memory to atleast 16GB. The thing is, it come pre-installed with windows 11 and from the marketing material it is intended for lightweight desktop usage (office suite, watch video) and boasting to be able running at 4K resolution.

  • Scrapping Leaflet Marker Data


    This is a snippet to scrap data from leaflet map generated by https://sekolah.data.kemdikbud.go.id/index.php/Cpetasebaran/index/000000/ Select data you want to scrap Figure 1: Select data to be scrapped Open developer console on your browser and paste following code // Retrieve layers data as array let layers = Object.keys(map._layers).map((key) => map._layers[key]) // Filter with popup only let points = layers.filter((layer) => layer._popupHandlersAdded) // Do something with the results let results = points.map((point) => ({ coordinate: point.

  • 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.

  • 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” Press F4 key to save the change and exit.

  • 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.

  • 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.

  • 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).

  • 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.

  • 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.

  • Migrate Blog System From Jekyll To GatsbyJS


    Spoiler Alert: NO, I DON’T For something that simple like blog system, the complexities of moving from jekyll to gatsby is not woth it. Here the reason why I’m considering migrating my blog system: I don’t use ruby I’m familiar with javascript and react The reason why I don’t migrate: For static content like blog, I would like to avoid javascript if possible Migrating process is painfull that I give up midway The generated artifact is too large (gatsby => 2.

  • How to Select Fastest Ubuntu Repository Mirror


    Ubuntu has so many mirror repository we can choose. Sometimes the mirror exists in our country that near with our internet provider. Update Thank to this answer on askubuntu.com we can automatically select fastest (maybe) mirror based on our geographic location. This configuration will automatically select best mirror based on our geographic location. However, this doesn’t necessary mean the fastest server. Add following entry at the top of /etc/apt/source.list file. You may delete other entry if you wish.

  • Using Gulp To Automatically Run PHPUnit Test After Saving File


    One of the most annoying as developer/programmer is to do repetitive task over and over again. Why not just automate it? We are programmer right? It’s our job to solve this kind of problem. The usual workflow of testing with phpunit is write test -> run phpunit -> edit source -> run php unit -> repeat. As we can see, in a single cyclus we run phpunit twice just to check if our source is passing the test.

  • Menghitung Usability Factor Arah Runway Bandara dengan MySQL Database


    Salah satu tahap dalam perencanaan bandara adalah menentukan arah runway dengan memperhatikan kondisi angin di lokasi. Dalam artikel singkat ini akan dijelaskan bagaimana menghitung usability factor dengan menggunakan database sebagai alat bantu analisis. Apa saja yang dibutuhkan? Data arah angin selama 5 tahun terakhir sesuai dengan yang disyaratkan oleh ICAO (International Civil Aviation Organisation). Data ini bisa diperoleh di stasiun pengamatan BMKG terdekat dengan lokasi. MySQL database sebagai alat bantu analisis MySQL client sebagai antar muka (interface) user dengan system database.

  • Dengerin Spotify Tanpa Iklan Di PC (No crack, no premium)


    Inilah cara paling mudah dengerin spotify tanpa terganggu iklan. Tanpa instal software tambahan, tanpa upgrade ke premium, dan tanpa bajak akun punya orang lain. Disclaimer: cara ini tidak mengaktifkan fitur premium yang lain seperti offline mode, high quality streaming, dll. Daftar host list yang akan di blok Buka web browser dan akses https://github.com/zackad/dotfiles/blob/master/hosts.d/ads_spotify.conf atau klik disini Copy isi file tersebut (kurang lebih seperti dibawah ini) # BLock ads host for spotify # host list taken from https://www.

  • How to Extend Line with ArcGIS


    Example of how to extend line feature (eg. road digitation) in order to cleanup the dangels using ArcGIS 10.1. import arcpy arcpy.env.workspase = "path/to/workspase" arcpy.ExtendLine_edit("dataset.shp", "distance", "EXTENSION") Extend Line Example (Stand-alone script) Clean up street centerlines that were digitized without having set proper snapping environments. # Name: ExtendLine.py # Description: Clean up street centerlines that were digitized without having # set proper snapping environmnets # Author: ESRI # Import system modules import arcpy from arcpy import env # Set environments settings env.

  • SQL Function to Check Crosswind


    A simple function to check if a wind component is crosswind for airport runway direction planning. Using MySQL as database engine and analysis tool, this function can help to simplify checking usability factor of runway direction with given meteorogical data. DROP FUNCTION IF EXISTS `is_crosswind`; DELIMITER // -- Check if wind component is a crosswind to runway direction based on tresshold value CREATE FUNCTION `is_crosswind`( `tresshold` DOUBLE, -- Knot `runwayDirection` DOUBLE, -- Degree `windDirection` DOUBLE, -- Degree `windSpeed` DOUBLE -- Knot ) -- Return 1 if crosswind, 0 if not RETURNS integer(1) LANGUAGE SQL DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN declare angelDeg double; declare angelRad double; declare crossWind double; -- Calculate minimum angel between 2 crossing line -- https://math.

  • Configuring Mapserver With NGINX Using Fast CGI


    Mapserver is an Open Source platform for publishing spatial data and interactive mapping application to the web. In this tutorial we will using nginx as reverse proxy to forward request to mapserver cgi process in the backgraound. Prerequisites Mapserver (available in ubuntu main repository 16.04 and above) nginx webserver This tutorial assuming that mapserver is installed in as /usr/bin/mapserv, if your mapserver installed in different path, please adapt accordingly. Configure Mapserver as cgi worker with spawn-fcgi Install spawn-fcgi if not already installed.

  • How To Install Allmark - The Markdown Webserver


    allmark is a fast, standalone markdown web server for Linux, Mac OS and Windows written in go. allmark is a file-system-centric markdown web server. You can point it at any directory that contains markdown files and it will immediately start a web-server that serves the rendered HTML content of the markdown file to you. Step 1 — Installing allmark webserver Download the binary file from this page Select the right version based on your system.

  • How to Setup Android Development Environment With React Native on Ubuntu 16.04


    Getting started with android development using react-native. Warning : This article may contain outdated/inacurate information. Please refer to latest documentation. In this guide, we won’t install android studio since we will use standard text editor such as atom, sublime text or even gedit. There’s no need to install full blown IDE to develop android with react-native. Since all the necessacy tool and process will be using command line. That’s why we want to install minimal amount of tool to save more storage space.

  • SQL Function to Generate Wind Direction


    Based on Robert Sharp answer on stack overflow question, this function is tested on MySQL version 5.7. DELIMITER // -- Using single parameter to determine wind direction name -- with angel is in decimal or integer CREATE FUNCTION `get_wind_direction`(`angel` DOUBLE) -- Return value as varchar RETURNS varchar(5) CHARSET utf8 LANGUAGE SQL DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT '' BEGIN if `angel` < 0 then set `angel` = `angel` % 360 + 360; else set `angel` = `angel` % 360; end if; return case when `angel` between 0 and 11.

  • List of Important Articles or Tutorials


    A currated list of usefull/awesome tutorials and guides found on the internet. Arduino and Electronics Getting Started with LCD 16x2 character LED with or without resistor Javascript Understand JavaScript Callback Functions and Use Them Callback hell Setup ReactJS with Webpack Awesome Data Visualization with D3.js PHP PDO Cheat Sheet Create Your Own Framework With Symfony Components Guide of Test Driven Development Create Wordpress Theme From Scratch Miscellaneous Vim Cheat Sheet Installing Arch Linux Travis-CI SSH Deploy Change Expiration Date of GPG Key Adblock Rules Explained Compose Key Cheat Sheet Dark Theme Save The World Tracking Dotfiles With Git Programmer Jokes [Solved] Spotify Ubuntu Can’t Play Local File

  • Customizing Bash Terminal - A Backup Snippet


    Add Git Branch Name Into PS1 parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } export PS1="\[\033[01;32m\]\u\[\033[00m\]@\[\033[01;34m\]\h\[\033[01;30m\]\$(parse_git_branch)\[\033[00m\]: " Preview Inside Git Repostory Show Current Directory in Title Bar PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"' Preview Current Directory on Title Bar Instead of showing full path in title bar (PROMPT_COMMAND), we will replace our home directory name with ~ character. First we need to get current path with variable PWD, then replace home directory name with ~ character.

  • How To Create Secure WebSocket With Node.JS "ws" Module


    In this tutorial, we will create ssl enable websocket using ws module. Requirements nodejs with npm certbot to generate ssl certificate from letsencrypt Step 1 — Generating SSL Certificate Assuming you use ubuntu 16.04 the step are following sudo add-apt-repository ppa:certbot/certbot sudo apt-get update sudo apt-get install certbot If you’re using different system, please refer to this official documentation. After certbot successfully installed, we can generate ssl certificate with command

  • How To Query Previous And Next Item From SQLite Table


    Let say we have data like this. id title 1 Vessel, Landmark Baru Manhattan 2 Seperti Apa Rasanya Memiliki Rumah “di Bawah” Batu? 3 Museum Gempa Di China Berbentuk Menyerupai Retakan Tanah 4 Menyusuri Jejak Budaya Peranakan di Rumah Kayu Goen 5 Tips Agar Material Semen Ekspos Terlihat Lebih Menarik 6 Ciptakan Nuansa Alam Dengan Material Bata Ekspos 7 Mengagumi Keindahan Arsitektur Kolonial Istana Cipanas 8 5 Cara Atasi Masalah Plafon Melendut 9 Di dalam Hotel Ini Ada Batu!

  • How To Resize Tabs Character Output from "cat" comand


    This command will resize tabs size into 4 character. cat filename | expand -t4 Change -t4 with whatever size you want e.g -t8 for tabs with 8 character.

  • How To Tunneling MySQL Server


    For security reason, usually (and it should) root access won’t be allowed from remote address. So how do we can access mysql server using root credential from remote address? The usual way is, we access our remote server via ssh then access mysql from command line (shell). The problem is, with this method we can’t use graphical mysql client such as Mysql Workbench (assuming we run headless server). So how do we access mysql with root credential securely?

  • My .vimrc Config


    A little backup for my .vimrc config file. Other dotfiles can be found in this repository. " enable syntax highlighter syntax on " show line number set number " disable line wrap set nowrap " resize tab to 4 character set expandtab ts=4 sw=4 ai

  • How To Create Direct Link From Dropbox


    It’s easy to create direct link into file uploaded to Dropbox. Here’s how to do it. Login to your Dropbox account Navigate to file manager Select which file we want to share Click Share button Click Create Link Now we can copy the generated link All we need to do is to change last parameter to prevent preview mode by Dropbox. The copied link would look like this https://www.dropbox.com/s/42uao1de2rfkgcs/01.%20AdministrasiKota.KML?dl=0 change this part ?

  • NodeJS Permission Denied When Installing "sqlite3" Module


    I’m trying to create a nodejs app using sqlite as database storage. The problem is I got error message that looks like this ... > node-pre-gyp install --fallback-to-build sh: 1: node-pre-gyp: Permission denied npm ERR! Linux 3.16.0-30-generic npm ERR! argv "node" "/usr/bin/npm" "install" npm ERR! node v0.10.33 npm ERR! npm v2.5.0 npm ERR! code ELIFECYCLE ... At a glance this seems to be simple permission error. But even after using sudo command I still got error when trying to run the app.

  • How To Add PPA Repository Manually Without "add-apt-repository" On Ubuntu


    The easiest way to adding ppa (Personal Package Archive) into ubuntu (and it’s variant) repository is to use add-apt-repository. Unfortunately this tool sometime is not installed in the system especially on minimalist distribution such as docker image. The good news is, we can add it manually. Step 1 — Adding PPA link to source list Visit ppa to search witch ppa we want to add to our system. Use the search menu to find the ppa we want.

  • Getting Started With Python Websocket Client


    The main purpose of this article is for archive and personal blog about what I’m doing in my work. For more info and best practice, I suggest you should visit official website of pypi. I’m not familiar with python, but since I need to use python with my raspberry pi project I think this is a good chance to getting started. In my case, I need to transmit data from sensor that connected to GPIO to online server so that other people can monitor the what the current status of my sensor.

  • Disable Password Login on SSH


    The purpose of this configuration is to disable ssh login using password and force user to use ssh-key pair instead. Open /etc/ssh/sshd_config file using text editor and change following option. PermitRootLogin no # prevent root login via ssh PasswordAuthentication no # deny ssh login using password PubkeyAuthentication yes # enable public key authentication # Explicitly define which user can login via ssh (optional) # AllowUsers root otheruser Note: if the option is commented, delete ‘#’ at the start of line to enable the option.

subscribe via RSS