July 01 2018
Zsh with IntelliJ IDEs
Make Zsh, Oh-my-zsh, Powerlevel9k work in IntelliJ IDEs.
There are many tutorials show how to config oh-my-zsh's theme Powerlevel9k and use iTerm2 to setup color/font theme, but none I've found could make them work with IntelliJ's build-in terminal. So I post the solution I figured out in case someone need.
April 26 2018
Use Node to parse data to firestore
I'm working on a mini node server work with firebase to handle the data transaction. It fetches a large amount data files on daily bases, and compare with existing ones to update, and expose APIs to serve data based on requests from my mobile application.
There are some notices:
1. The data is JSON in plain text, one JSON object for each lines, it's not a pure JSON object.
2. There are multiple files with index in their names.
3. Need to parse line by line, file by file, async.
4. Firestore has limitation on usage, need to use its batch method to reduce the cost.
May 05 2018
Use GeoFire for react-native app
I want to simulate a realtime 'search this area' feature in my new react-native app. The raw data is already fetched from other services, but it only provides the address object contains organization / street / city / zip. And what I want is a feature that people could select an area on the map, clickable markers will pop up based on selection, click to fetch data for detailed content. So some work is needed before use these location information.
January 24 2018
Build dynamic blog with Gatsby#2
Gatsby is super good with netlify and contentful. With these tools, we could build a powerful CMS.
When I say CMS, we don't mean those traditional CMSs like WordPress or Drupal. I used to play with them and no doubt they were good and popular, but it's 2018 now and to work with all the modern tools like React, Redux, Gatsby and GraphQL, we need a more powerful 'CMS' to join in the workflow.
That's the combination of Contentful and Netlify.
Contentful is a content infrastructure, while Netlify is a platform for automating projects using modern techs. They together, become a much powerful management system.
Let me show you how to set them up and let the blog project goes alive.
January 01 2018
Build dynamic blog with Gatsby#1
I'm a big fan of react ecosystem and I always want to create my own blog to share and record some learning experience, so this is it.
Gatsby is a super fast static sit generator which let React users to scaffold out a static site in the 'React way'.
Unlike Next.js to do SSR, it's using static file. How it works? At building phase, server allows us to render dynamic components into static html content then serve.
With all the benefits from both dynamic and static site, it became my first choice.
In this post, I will cover some basic use of Gatsby / React / Redux / GraphQL / Styled Component / Markdown / Netlify.