Skip to content

Instantly share code, notes, and snippets.


Vo Quoc Nguyen nguyenvq

View GitHub Profile
View regex-japanese.txt
Regex for matching ALL Japanese common & uncommon Kanji (4e00 – 9fcf) ~ The Big Kahuna!
Regex for matching Hirgana or Katakana
Regex for matching Non-Hirgana or Non-Katakana
Regex for matching Hirgana or Katakana or basic punctuation (、。’)
nguyenvq /
Created Apr 17, 2020 — forked from spalladino/
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
nguyenvq / hls.conf
Created Aug 13, 2019 — forked from jb-alvarado/hls.conf
srs rtmp server with hls multiple bitrates
View hls.conf
listen 1935;
max_connections 20;
daemon on;
pid /usr/local/srs/objs/;
srs_log_tank file; # console;
srs_log_file /var/log/srs.log;
ff_log_dir /dev/null;
# can be: verbose, info, trace, warn, error
srs_log_level warn;
View gist:5cbba5dcc4042e06ac139673530feccd
#!/usr/bin/env python
Produces load on all available CPU cores
from multiprocessing import Pool
from multiprocessing import cpu_count
def f(x):
while True:
nguyenvq /
Created Aug 20, 2018 — forked from DrYazid/
StarUml 3.0 full version

StarUML 3.0

  • 1- install staruml. : staruml
  • 2- install node.js : node.js
  • 3- go to ...\AppData\Local\Programs\StarUML\resources
  • 4- open CMD As admin
  • 5- execute
nguyenvq / A Nuxt.js VPS production
Created Aug 1, 2018 — forked from DreaMinder/A Nuxt.js VPS production
Deployment manual for a real-world project built with nuxt.js + koa + nginx + pm2
View A Nuxt.js VPS production

Example of deployment process which I use in my Nuxt.js projects. I usually have 3 components running per project: admin SPA, nuxt.js renderer and JSON API.

This manual is relevant for VPS such as or It's easier to use things like Now for deployment but for most cases VPS gives more flexebillity needed for projects bigger then a landing page.

Let's assume that you have entered fresh installation of Ubuntu instance via SSH. Let's rock:

1.Initial setup.

nguyenvq /
Created Mar 13, 2018 — forked from GhazanfarMir/
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
nguyenvq / .htaccess
Created Feb 27, 2018 — forked from ScottPhillips/.htaccess
Common .htaccess Redirects
View .htaccess
#301 Redirects for .htaccess
#Redirect a single page:
Redirect 301 /pagename.php
#Redirect an entire site:
Redirect 301 /
#Redirect an entire site to a sub folder
Redirect 301 /
You can’t perform that action at this time.