Skip to content

Instantly share code, notes, and snippets.

I may be slow to respond.

long nguyen nguyentienlong

I may be slow to respond.
View GitHub Profile
nguyentienlong / README.MD
Last active Sep 22, 2020
uprace - get team member stats



If your computer not install requests lib yet

nguyentienlong / demo_optimistic_locking.go
Last active Sep 14, 2020
demo optimistic locking in go
View demo_optimistic_locking.go
credit to this great article
package main
import (
nguyentienlong /
Created Sep 6, 2020 — forked from mommi84/
Add swap memory on Ubuntu
#!/usr/bin/env bash
# sudo ./ 4G
fallocate -l $1 /swapfile
chmod 600 /swapfile
nguyentienlong / main.go
Last active Aug 13, 2020
Open close principle implemented in golang
View main.go
package main
import (
type Shape interface {
nguyentienlong /
Created Aug 11, 2020
Install ImageMagick's MagickWand on fedora 32
sudo yum install GraphicsMagick GraphicsMagick-devel
sudo dnf install /usr/bin/MagickWand-config
View remove_special_char_in_file_name
for file in *; do mv "$file" $(echo "$file" | sed -e 's/[^A-Za-z0-9._-]/_/g'); done
nguyentienlong / index.js
Created Apr 24, 2020 — forked from miguelmota/index.js
Node.js Winston logger wrapper to display filename
View index.js
var log = require('./lib/logger')(module);'foo');
nguyentienlong /
Created Feb 28, 2020 — 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
nguyentienlong / php72
Created Feb 28, 2020
php72 installation centos
View php72
$ sudo yum install
$ sudo yum install
$ sudo yum install yum-utils
$ sudo subscription-manager repos --enable=rhel-7-server-optional-rpms
$ sudo yum-config-manager --enable remi-php72
$ sudo yum update
$ sudo yum search php72 | more
$ sudo yum install php72 php72-php-fpm php72-php-gd php72-php-json php72-php-mbstring php72-php-mysqlnd php72-php-xml php72-php-xmlrpc php72-php-opcache
nguyentienlong / coredns.yaml
Created Oct 9, 2019 — forked from rothgar/coredns.yaml
CoreDNS for Kubernetes
View coredns.yaml
apiVersion: v1
kind: ConfigMap
name: coredns
namespace: kube-system
Corefile: |
.:53 {
log stdout
You can’t perform that action at this time.