Skip to content

Instantly share code, notes, and snippets.

View nguyenducduy's full-sized avatar
🎯
Focusing

Nguyen Duy nguyenducduy

🎯
Focusing
View GitHub Profile

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@nguyenducduy
nguyenducduy / dart_flutter_why_not.md
Created February 17, 2020 16:08 — forked from coder7eeN/dart_flutter_why_not.md
Dart và Flutter, tại sao không?

Part 1. Mọi thứ đều bắt đầu từ những thứ cơ bản nhất

Khi nhắc đến việc làm sao để tạo ra 1 ứng dụng mobile thì thứ mọi người sẽ lặp tức nghĩ ngay đến là native app (Android và iOS), nhưng bên cạnh đó vẫn còn rất nhiều công nghệ có thể giúp bạn tạo ra 1 ứng dụng mobile như Cordova, Webview (WeChat), Ionic, Xamarin và React Native. Tất cả các framework, platform đó đều hổ trợ người dùng tạo ra được 1 ứng dụng mobile theo ý muốn của mình. Và để không bỏ lỡ cuộc vui thì Google cũng đã mang đến cho người dùng đứa con mới nhất của mình - Flutter - nó kế thừa cũng như nổi bật hơn các công nghệ hybrid app kia. Vậy thì làm sao để có thể sử dụng, có thể tạo ra được những sản phẩm theo ý muốn của mình? Bài viết với những kiến thức của bản thân mình sẽ đem đến cho bạn có được 1 số kiến thức cơ bản nhất để có thể tự mình "chiến" và "khám phá" Flutter.

Dart Language

Bao giờ cũng vậy, bạn muốn "chiến" hoặc "chỉ học để biết" 1 library, 1 framework, 1 platform thì ngôn ngữ (language) sử dụng để build

@nguyenducduy
nguyenducduy / install.sh
Created October 27, 2016 09:47 — forked from solar/install.sh
install memcached from source with supervisord
#!/bin/sh
version="1.4.15"
priority="10415"
libevent="/usr/local/libevent/2.0.20-stable/"
supervisordir="/etc/supervisord.d"
# create user
sudo groupadd memcached
sudo useradd -r -g memcached -s /sbin/nologin -M -d /var/run/memcached memcached
@nguyenducduy
nguyenducduy / install.sh
Created October 26, 2016 15:02 — forked from solar/install.sh
install mysqld with supervisord
#!/bin/sh
sudo groupadd mysql
sudo mkdir -p /var/mysqld
sudo useradd -r -g mysql -M -d /var/mysqld mysql
sudo chown mysql:mysql /var/mysqld
sudo yum -y install cmake bison gcc-c++
curl -sL http://cdn.mysql.com/Downloads/MySQL-5.5/mysql-5.5.28.tar.gz | tar zx
cd mysql-5.5.28/
cmake . -DCMAKE_INSTALL_PREFIX=/usr/local/mysql/5.5.28 -DDEFAULT_CHARSET=utf8mb4 -DDEFAULT_COLLATION=utf8mb4_bin
@nguyenducduy
nguyenducduy / latest-ffmpeg-centos6.sh
Created October 22, 2016 02:17 — forked from mustafaturan/latest-ffmpeg-centos6.sh
Installs latest ffmpeg on Centos 6
# source: https://trac.ffmpeg.org/wiki/CentosCompilationGuide
yum install autoconf automake gcc gcc-c++ git libtool make nasm pkgconfig zlib-devel
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources
curl -O http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzvf yasm-1.2.0.tar.gz
cd yasm-1.2.0
@nguyenducduy
nguyenducduy / zabbix-alert-smtp.sh
Created October 21, 2016 06:43 — forked from superdaigo/zabbix-alert-smtp.sh
Zabbix SMTP Alert script for gmail
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Zabbix SMTP Alert script for gmail.
"""
import sys
import smtplib
from email.MIMEText import MIMEText
from email.Header import Header
@nguyenducduy
nguyenducduy / gif-converter.sh
Created October 13, 2016 16:25 — forked from shaneshifflett/gif-converter.sh
Convert a GIF to MP4
brew install ffmpeg --with-libvorbis, --with-libvpx, --with-theora, --with-opus, --with-x265, --with-fdk-aac --with-ffplay, --with-freetype, --with-libass, --with-libquvi
ffmpeg -f gif -i YOURGIF.gif -vcodec libx264 -pix_fmt yuv420p YOURMP4.mp4
ffmpeg -i YOURMP4.mp4 -c:v libvpx -b:v 1M -c:a libvorbis YOURWEBM.webm
#bonus cool js library
#http://gka.github.io/canvid/
@nguyenducduy
nguyenducduy / sysctl.conf
Created September 15, 2016 10:59 — forked from kgriffs/sysctl.conf
Linux Web Server Kernel Tuning
# Configuration file for runtime kernel parameters.
# See sysctl.conf(5) for more information.
# See also http://www.nateware.com/linux-network-tuning-for-2013.html for
# an explanation about some of these parameters, and instructions for
# a few other tweaks outside this file.
# Protection from SYN flood attack.
net.ipv4.tcp_syncookies = 1
@nguyenducduy
nguyenducduy / haproxy.conf
Created September 8, 2016 11:20 — forked from hzbd/haproxy.conf
Install haproxy-dev version with supervisord.
# Configurations for haproxy
global
pidfile /var/run/haproxy.pid
log 127.0.0.1 local0 debug # Enable per-instance logging of events and traffic,formate like "log <address> <facility> [<level> [<minlevel>]]".
maxconn 512 # Sets the maximum per-process number of concurrent connections to <number>.
daemon # Makes the process fork into background.
nbproc 1 # Creates <number> processes when going daemon.
defaults
mode http # Set the running mode or protocol of the instance(tcp|http|health)
@nguyenducduy
nguyenducduy / haproxy.conf
Created September 8, 2016 11:16 — forked from solar/haproxy.conf
install haproxy with supervisord
# Configurations for haproxy
global
maxconn 4096
chroot /var/haproxy
user haproxy
group haproxy
log 127.0.0.1 local0 alert