Tuan Anh

container nerd. k8s || GTFO

Should I use yarn?

Myles Borins (@thealphanerd) recently ran citgm with yarn, and shared the results. It was 25 minutes faster than npm, but 20 modules failed to install. Yarn is not a drop in replacement.

Some areas where issues arise:

  • Reliance on npm-shrinkwrap.json
  • Private modules on npm
  • Modules backed by self-signed certificates
  • Exotic dependencies declarations like .zip or shorthand urls
  • Edge case issues on specific OSes, like Windows
  • Pre- and post-script hooks don’t work like they do in npm
  • Scripts that rely on npm environmental variables
link bài gốc

Breaking changes between v4 LTS and v6 LTS

I’ve just migrated 4 big applications at work from Node.js v4 to Node.js v6 LTS. 3 of them require some little changes and 1 with no changes at all since it’s using Babeljs.

You can view the complete list of breaking changes from v4 to v6 here on GitHub.

link bài gốc


This site is now AMP-friendly

The cached version of the page is up at this url below, remove the s if your site isn’t on HTTPS.


Xbox Scorpio vs PS Neo

If this were true, I will definitely upgrade to Scorpio. The difference in GPU power is huge!!


the world’s smallest (995 bytes) CSS framework http://mincss.com

In an attempt to make my website fast again.

Custom font no more.

link bài gốc

How to import csv file in MySQL

If your MySQL server started with --secure-file-priv option, you will have to move your csv file to that specific folder first.

To check where that folder is, first run SHOW VARIABLES LIKE "secure_file_priv";

Move your csv file to that folder and issue the following command in MySQL console. Remember to replace /var/lib/mysql-files/ with your secure_file_priv path variable.

LOAD DATA INFILE "/var/lib/mysql-files/data.csv" \
INTO TABLE my_table \

Do’s and Don’ts of AWS Lambda

TJ Holowaychuk writes about Do and Don’ts of AWS Lambda.

link bài gốc

No More Vietnam

Nixon’s retrospective on Vietnam war, 10 years later.

link bài gốc

Mildly interesting npm modules

Not in any particular order

thenBy is a javascript micro library that helps sorting arrays on multiple keys

You use Node.js for speed? You process XML streams? Then you want the fastest XML parser: libexpat!

Lightweight fuzzy-search, in JavaScript, with zero dependencies

js ex machina - finite state machines in JavaScript http://machina-js.org/

AWS Lambda

So a few months back, when I read of AWS lambda, I instantly fell in love with it though not having any immediate use with it.

AWS lambda is perfect for those wish to build microservices. There are many benefits of doing this such as independent deployment, security and scability. But I’m not going to talk about this within this post. This post is merely my experience with AWS Lambda.

Enter AWS Lambda: great product, works like magic and requires no dev ops which is a huge plus at where I work. However, there are a few cons:

Testing locally

There is no easy way to do this locally. Looks like there isn’t many alternative out there except maybe lambda-local

Building native packages

I’ve yet to come across a service that build native node.js package for AWS lambda deployment. For now, I have to spin up a EC2 instance, install nodejs and gcc just to build a package, zip it and download it to my local machine in order to prepare for deployment.

Error handling

This isn’t a problem with AWS lambda particular but more like with microservice. However, AWS lambda doesn’t introduce any solution to deal with this either.

As much as I like to use aws lambda in production, i haven’t yet to see any use cases for that at work to put all these in real world test. I’m sure the future of “function as a serivce” is much more and I would love to go into greater details about it in future posts if I have a chance to put it to production. For now though.. Phew