Jan 22ReactJS — Separating logic using Higher-Order Component (HOC)Background I noticed that in my application, there are a few logic that are used across multiple components and writing them into each individual components will make maintenance harder and prone to error. Logics could be UI-related to systems related. Incorporating business logic into the frontend may raise eyebrows and trigger…React3 min read
Jun 7, 2021Strategies in finding a rectilinear polygon within a polygon in GISWhat is a Rectilinear polygon? A rectilinear polygon, according to Wikipedia, is a polygon all of whose edge intersections are at right angles. Thus the interior angle at each vertex is either 90° or 270°. Use case for a Rectilinear polygon The use case is for the user to beautify the shape of a polygon for procedural modelling as designing architecture…Algorithms4 min read
May 7, 2021Encrypting sections of Web.Config through runCommandBackground To ensure your application secrets remain secret on the sever, you might want to encrypt sections of Web.Config file on desk so that not everyone who has access to the server can open and read the file. Important sections of Web.Config include ConnectionString (which holds the credentials to databases) and…Msbuild3 min read
Apr 17, 2021How to find the maximum rectangle within a convex GIS polygon in JavascriptBackground Recently I was exploring on a new personal project and was considering to add this functionality of finding the maximum sized rectangle within a polygon based on GIS. I tried searching for such an algorithm and found a solution from the forums and tested it — https://community.esri.com/t5/spatial-data-science-questions/how-to-find-the-maximum-rectangle-contained-within-a-polygon/td-p/408977GIS2 min read
Mar 17, 2021Server-side Map ClusteringBackground Marker Clustering is used to display large number of markers on the map. It is a visualization technique for the analyst to make sense out of the large data on a map. Google Map offers marker clustering which is performed on the client-side. The spatial information needs to be sent…Geoserver4 min read
Mar 10, 2021Basic real-time Web Map Dashboard using GeoserverArchitecture My design of a simple web map dashboard consist of a backend, web map server and a GIS-enabled database. The web map server is not always necessary as the map could drawn frontend. I will cover more under the Geoserver section below. NodeJS Using NodeJS to host the web backend services…Geoserver4 min read
Jan 23, 2021Comparing packaged sizes between Webpack 4 and 5Webpack 5 was released on Oct 2020. In the official release statement — https://webpack.js.org/blog/2020-10-10-webpack-5-release/, Webpack 5 has improvements in code generation and general tree shaking. Let’s try some basic tests to see if there is any difference between the generated packages. First, let’s try to setup a single environment with…Webpack 54 min read
Dec 5, 2020Automating Youtube viewsPurpose Youtube’s algorithm boosts videos that are in view. Therefore you may want to constantly keep your videos in watch to get even more views. Alternatively, automating youtube views is a pretty fun project. Tech Stack The technology used is quite simple. I will be using primarily Nodejs and PuppeteerJS as I would…You Tube2 min read
Sep 12, 2020What are cipher suites, forward secrecy? | Steps to limit cipher suites on AzureBackground — Your security team performed a security scan and found vulnerabilities on cipher suites on your site and requested you resolve them. What does it mean? Client browser communicates with your server through HTTPS encruption and SSL/TLS encryption and your server will support a range of encryption methods (cipher suites). Ciphers are algorithms, more specifically…Cipher Suites2 min read
Sep 6, 2020Sample code to upload files into Dropbox using NodeJS (both single upload and multi-part upload)Overview — New web applications support functionalities to store files/images/videos/etc and there are many options in executing this. One could keep it inside the database, store within the local file storage, S3 buckets, and the list goes on. …Dropbox Api4 min read