• 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.5Mb, jekyll => 500Kb)

  • 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. What if after editing the source the test is still failed? We need to edit the source and run phpunit again to check if the test is passing. This kind of repetitive task of cource can be automated right?

  • 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. (HeidiSQL, MySQL Workbench) Tahap 1 — Mempersiapkan dan memformat database Pada tahap ini, kita akan mempersiapkan tabel sebagai tempat penyimpanan data. Adapun tabel yang dibutuhkan meliputi :

  • 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.reddit.com/r/Piracy/comments/4kn6rq/comprehensive_guide_to_blocking_ads_on_spotify/ 127.0.0.1 adclick.g.doublecklick.net 127.0.0.1 adeventtracker.spotify.com 127.0.0.1 ads-fa.spotify.com 127.0.0.1 analytics.spotify.com 127.0.0.1 audio2.spotify.com 127.0.0.1 b.scorecardresearch.com 127.0.0.1 bounceexchange.com 127.0.0.1 bs.serving-sys.com 127.0.0.1 content.bitsontherun.com 127.0.0.1 core.insightexpressai.com 127.0.0.1 crashdump.spotify.com 127.0.0.1 d2gi7ultltnc2u.cloudfront.net 127.0.0.1 d3rt1990lpmkn.cloudfront.net 127.0.0.1 desktop.spotify.com 127.0.0.1 doubleclick.net 127.0.0.1 ds.serving-sys.com 127.0.0.1 googleadservices.com 127.0.0.1 googleads.g.doubleclick.net 127.0.0.1 gtssl2-ocsp.geotrust.com 127.0.0.1 js.moatads.com 127.0.0.1 log.spotify.com 127.0.0.1 media-match.com 127.0.0.1 omaze.com 127.0.0.1 open.spotify.com 127.0.0.1 pagead46.l.doubleclick.net 127.0.0.1 pagead2.googlesyndication.com 127.0.0.1 partner.googleadservices.com 127.0.0.1 pubads.g.doubleclick.net 127.0.0.1 redirector.gvt1.com 127.0.0.1 s0.2mdn.net 127.0.0.1 securepubads.g.doubleclick.net 127.0.0.1 spclient.wg.spotify.com 127.0.0.1 tpc.googlesyndication.com 127.0.0.1 v.jwpcdn.com 127.0.0.1 video-ad-stats.googlesyndication.com 127.0.0.1 weblb-wg.gslb.spotify.com 127.0.0.1 www.googleadservices.com 127.0.0.1 www.googletagservices.com 127.0.0.1 www.omaze.com Note: Untuk daftar list yang uptodate, cek disini.

  • 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.workspase = "C:/data" # Make backup copy of streets feature class, since modification with the Editing tools below is permanent streets = "street.shp" streetsBackup = "C:/output/streetsBackup.shp" arcpy.CopyFeatures_management(streets, streetsBackup) # Trim street lines to clean up the dangles arcpy.TrimLine_edit(streets, "10 Feet", "KEEP_SHORT") # Extend street lines to clean up the dangles arcpy.ExtendLine_edit(streets, "15 Feet", "EXTENSION") Reference help file of ArcMap 10.1

  • 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.stackexchange.com/questions/341749/how-to-get-the-minimum-angle-between-two-crossing-lines set angelDeg = abs(abs(`runwayDirection` - `windDirection`) - 180); -- convert angel Degree to Radian set angelRad = (pi()/180) * angelDeg; set crossWind = sin(angelRad) * `windSpeed`; if crossWind > `tresshold` then return 1; else return 0; end if; END // DELIMITER ;

  • 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. If you use desktop computer, you may have 64bit system Use chmod to add execute permission. Copy the downloaded file to /usr/local/bin/allmark All that step can be written to

  • 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. Not only that, we won’t install android virtual device (avd) to save more space and use actual device as testing and debug device.

subscribe via RSS