General

Generating Subresource Integrity (SRI)

Posted on

Since launching my online recruitment platform and job vacancy portal. I became interested in rolling out my own content delivery network (CDN) to host my portal’s images, javascript and CSS. Thanks to NGINX, implementing a CDN is easy. Of course we need to ensure that our digital assets are not compromised during transport so we […]

MySQL

Using MySQL TIMESTAMPDIFF to delete unverified user records

Posted on

Building a public website with user registration and email verification is typical. It will require users to validate their email by clicking a unique generated URL link. Sometimes, user registration with pending verification will grow exponentially and needs an automated cleanup of records. In this example I created a simple MySQL stored procedure to delete […]

Tutorials

How to stop Mailtrack from tracking you

Posted on

Mailtrack is an online service that provides email tracking capability and analytics. Using its services the sender can track when the receiver read the email, when it was viewed and where is the reader’s location. It is a great tool for marketing but I feel that this is invading privacy and I would like to […]

Linux

How to connect to a Cisco VPN in Ubuntu 18.04 LTS

Posted on

Here’s the simple steps for you to connect to a Cisco VPN in Ubuntu 18.04 LTS. Cisco, an American company is the leading provider and manufacturer of enterprise network devices, telecommunication hardware, networking security and networking software. According to computer profile as of April 2018, Cisco holds a 73.9% market which makes it the undisputed […]

Linux

Bash string manipulation in program arguments

Posted on

In this code snippet, I would like to run an application with a URL payload based on date and time. This code will be executed in a specific schedule everyday and I would like to dynamically inject the date and time in the program argument when the program executes. ./json2csv rules.json “ncp” “http://localhost:8080/api/zget?eid=get-ncp-mv-by-starttime-endtime&starttime=$(date –date=’yesterday’ +\%Y-\%m-\%d)+00:00:00&endtime=$(date […]

Code Snippet

Standardizing SQLite in Spring framework Project

Posted on

My approach in standardizing SQLite in a Spring framework project In a software development world were rapid project delivery is needed. The only way for us, developer having a sense of sanity is to build standardize code for future development. In doing so, it shortens the development time but having tested and functioning code base. […]

Code Snippet

Golang mgo sort number inside a string

Posted on

// Get List func (z *DocumentTagService) GetDocumentTags() ([]models.DocumentTag, error) { z.DatabaseService.Connect() var o []models.DocumentTag err := (*z.DatabaseService.Db).C(z.Collection).Find(bson.M{}).Sort(“-$natural”, “-documentReference”).All(&o) return o, err } Result [ { “idDocumentTag”: “5b1390f29ebea41854dcc0dc”, “documenReference”: “MCTU/2018/16”, “company”: “MCTU” }, { “idDocumentTag”: “5b1390f09ebea41854dcc0db”, “documenReference”: “MCTU/2018/15”, “company”: “MCTU” }, { “idDocumentTag”: “5b1390d19ebea41854dcc0da”, “documenReference”: “MCTU/2018/14”, “company”: “MCTU” }, { “idDocumentTag”: “5b1390d09ebea41854dcc0d9”, “documenReference”: “MCTU/2018/13”, “company”: “MCTU” […]

General

Replacing My Macbook Pro 2013 trackpad

Posted on

Background I would like to share my experience in replacing my broken MacBook Pro late 2013 trackpad. One day, when I started using my MacBook pro I realize that the trackpad doesn’t work and my keyboard acting strange when I am moving my fingers across the trackpad. I tried doing the PRAM and SMC reset […]