Skip to content

Instantly share code, notes, and snippets.

View nmqanh's full-sized avatar

Nguyen, Manh Quoc Anh nmqanh

View GitHub Profile
@nmqanh
nmqanh / Recipe-bundling-fonts-with-headless-chrome.md
Created January 22, 2018 01:38 — forked from nat-n/Recipe-bundling-fonts-with-headless-chrome.md
How to build a fontconfig bundle for adding arbitrary fonts to headless chrome independent of the OS. This is specifically useful for deploying headless chrome to AWS lambda where it is necessary to include fonts for rendering CJK (Chinese, Japanese, Korean) characters into the deployed bundle.

Building fontconfig

Start up a lambda-like docker container:

docker run -i -t -v /tmp:/var/task lambci/lambda:build /bin/bash

Install some dependencies inside the container:

yum install gperf freetype-devel libxml2-devel git libtool -y

easy_install pip

@nmqanh
nmqanh / nginx.conf
Created January 18, 2018 07:53 — forked from sansmischevia/nginx.conf
nginx http proxy to s3 static websites
##
## This nginx.conf servers as the main config file for webflow reverse proxy
##
## RCS:
## https://gist.github.com/sansmischevia/5617402
##
## Hardening tips:
## http://www.cyberciti.biz/tips/linux-unix-bsd-nginx-webserver-security.html
##