Using Data Studio to Generate Reports from Cloud SQL PostgreSQL

Creating a dashboard with numbers and fancy charts is always a pain and involves whole lot of work. If the dashboard is for your clients, your end users, then it’s inevitable and it will be worth the time doing yourself given future changes are always going to happend. For internal monitoring, data reports, it’s a different story. We can always make our own dashboard to make the team happy but it has its costs, while at the same time there are already a lot of BI tools that is easy to use and flexible enough for this purpose. So this

Read More »

Migrate Parallel Desktop VM to VirtualBox

My Parallel Desktop subscription ended again when today I was trying to use my Windows VM to test out a page on IE. Over the last 12 months I had only been using vm for very limited reasons, and probably ended up only opened Parallel Desktop for twice. A $99 renew for maybe another two times open of it just does not make senses to me. So I decided to find a cheaper or free alternative. Luckily I found VirtualBox, which is free and open source. As I already have things setup in my Parallel Desktop VMs, so it would

Read More »

React Use Case: URL-Aware Search List

This project is to showcase a common use case in React web application that a List page with search and pagination while their state needs to be synced with the page URL query. Check out the Demo here You can also check the complete source code here Features Users can use the Search component to type in a keyword and hit enter or click “search” to trigger a list search. The list result should be rendered together with pagination, which allows users to navigate between different pages. when users trigger a new keyword search, the page needs to be rest

Read More »

Browser Service using Puppeteer + Lambda + Serverless

In my recent project, I was asked to implement several features that needs to use Puppeteer, mostly using it to open web pages and get content. The first feature is generating screenshot of given website URLs, a service that takes a URL and return Base64. The second one is similar, but instead of generating a screenshot of a given URL, it is required to general a thumbnail of a product detail page. To achieve that, we came up with an idea that creating a dedicated thumbnail web page for the detail page, to which we used a secure way passing

Read More »

Direct to S3 File Uploads in Python

The general tutorial from Heroku: https://devcenter.heroku.com/articles/s3-upload-python The main benefit for this approach is that AWS will now handle the process of the actually uploading, so that our server does not need to worry about the performance and it’s scalable.

Read More »

Cypress Test Cases Writing Take Aways.

Finally I setup Cypress for the project that I am working on in my company. After wrote several test cases, here is some take aways I want to share. Stub Network Before Visit When stubbing the requests for test cases, cypress need to know about the routes before the reqeusts being made from the app you are testing. This is crucial for the initial requests that your app will emit to load initial data used to boot up.

Read More »

Python Xero Integration Setup

I got a task about Xero integration in my work last week, aiming to copy invoices from one account to the other. To perform this task, the workflow will be: Invoice created/updated in Xero account A The webhook from Xero account A is triggered Our App handles the webhook and copy the newly created/updated invoice to Xero account B This article will show you how to setup Xero and talk about some tricky parts of the task.

Read More »

Cypress: UI Test For Your React/Webpack Project

UI Test has been a problem for every web front end project once it grows and becomes rather complicated while the common unit tests fail to cover complex workflow and business logic. UI Test in this artile, I would say it’s more like integration test, but I would not put it as E2E test, since I have no intention to test the real backend. So the things that I am going to talk about in this article, are “login and redirect to the home page”, “sign up and redirect to the home page”, “create a query in the dashboard and

Read More »

《如何阅读一本书》 笔记

这本书的目的 提供阅读的技巧,以帮助读者在没有外在帮助的情况下,提升自己的理解力。让读者学会求得理解而阅读。 作者关于读书的一些观点: 太多的资讯就如同太少的资讯一样,都是一种对理解力的阻碍。换句话说,现代媒体争议压倒性的泛滥资讯阻碍我们的理解力。(现代的媒体,精心挑选包装各种信息和观点,直接呈献给观众,是的观众根本不需要思考,接受就行了)

Read More »

Review: The Spare Room

Story Brief The author (Helen) had her fifteen-year friend Nicola from Sydney staying in her spare room in Melbourne for three weeks. Nicola was there for a Vitamin C Treatment claiming to cure her cancer, while Helen had to care for her. Nicola had never been married and had no children. She was what called Bohemian. She was obsessed with alternative treatments and theories, even they all seemed to be deceptive to Helen. The side effects of the treatment gave Nicola a lot of bad nights but she made herself believed that it was the proof of the cancer being reduced,

Read More »