Skip to content

Instantly share code, notes, and snippets.

View vutranvn's full-sized avatar

Vu Tran vutranvn

View GitHub Profile
/**
* For Ubuntu 16.04
**/
- Update
> sudo apt-get update
- Install packages
> sudo apt-get install \
apt-transport-https \
ca-certificates \
/**
* For me use ^^
**/
- List all users:
> awk -F':' '{ print $1}' /etc/passwd
or
> cut -d: -f1 /etc/passwd
OR
> cat /etc/passwd
- Install VSFTPD
> apt-get -y install vsftpd
- Open > nano /etc/vsftpd.conf and find edit:
# Controls whether anonymous logins are permitted or not.
anonymous_enable=NO
# Allow local users to login
local_enable=YES
** Client Machine **
- Create ssh key
> ssh-keygen -t rsa
- Key is saved default at ~/.ssh/id_rsa
- Enter passphrase
- Copy public key ~/.ssh/id_rsa.pub
> pbcopy < ~/.ssh/id_rsa.pub OR cat ~/.ssh/id_rsa.pub
** Server **
1. Install
On RHEL/CentOS:
> sudo yum install virt-what
On Debian/Ubuntu
> sudo apt-get install virt-what
2. Run
> virt-what
Result:
/**
* For macOS or Linux
**/
- Create file name config in ~/.ssh/
- Edit content above:
Host host_name
HostName ip_address
Port port_number
/**
* For macOS
**/
spctl --status
sudo spctl --master-disable
@vutranvn
vutranvn / Docker Compose File Structure
Created September 26, 2017 10:56
Structure of docker compose YML
/*
* Format 1, 2, 2.x, 3.x. Only remember >= 2
*
1. Extension file is yml or yaml
2. Structure:
version: '2'
services:
|__service_name_01
@vutranvn
vutranvn / Open CMD on folder (Windows 10)
Last active September 26, 2017 10:41
Open CMD on folder Windows 10
/**
* For windows 10
*/
Method 1: Click button File (top left Windows Explorer) -> Open Windows Powershell
Method 2: Shift + Right click (backgroud folder) -> Open Powershell Windown here
Method 3: Alt + D -> Type "CMD" or "Powershell" -> Enter
@vutranvn
vutranvn / Wordpress Customizer Section Priority
Last active October 19, 2017 10:20
The priority of default section WP theme
Wordpress 4.8.2 - Theme Twenty Seventeen
0 - switch_themes
20 - title_tagline - Site Identity > Site Title & Tagline
40 - colors - Colors
60 - header_image - Header Image
80 - background_image - Background Image
100 - nav_menus - Menus
110 - widgets - Widgets
120 - static_front_page - Static Front Page