Self Service password (PHP, LDAP, and Windows AD)

Reference:
Self Service Password
http://gregtechnobabble.blogspot.com/2012/11/enabling-ldap-ssl-in-windows-2012-part-1.html
https://www.petri.com/enable-secure-ldap-windows-server-2008-2012-dc-configuration
http://stackoverflow.com/questions/2689629/how-do-i-solve-ldap-start-tls-unable-to-start-tls-connect-error-in-php

 

http://docs.ansible.com/ansible/intro_installation.html

https://startbootstrap.com/template-overviews/sb-admin-2/

 

Docker USER and named volume

To secure docker, we use a specific user instead of root. We add the following code in Dockerfile.

RUN useradd -u 2000 wwwuser
USER wwwuser

Those code create user with uid=2000.
Since host volume is mounted as root user, all files and folders is readonly for user wwwuser. If the wwwuser needs to write files to volume, we can create a named volume for it.

docker volume create --driver local --opt type=tmpfs --opt device=tmpfs  --opt o=uid=2000,gid=2000,size=2g,mode=0750 myHomeVolume

Use the following command to run container

docker run -d -v myHomeVolume:/home/wwwuser --name myapps <image>

TO backup the data, taring all files at ‘/var/lib/docker/volumes/myHomeVolume/_data’ with root.

SMTP setting for Drupal, Django, and WordPress

Drupal, Django, and WordPress are using localhost as SMTP server by default. But there is a way to use another SMTP server to send email.

移民信息

Visa Bulletin 绿卡进度: https://travel.state.gov/content/visas/en/law-and-policy/bulletin.html

perm certification faq: https://www.foreignlaborcert.doleta.gov/perm.cfm

iCert Visa Portal System (PWD):  https://icert.doleta.gov/
Foreign Labor Certification Data Center (工资基本要求):
http://www.flcdatacenter.com/

O*Net Online(职位描述): https://www.onetonline.org

userful links for interview

http://blog.csdn.net/navyifanr/article/details/18564939 Cracking the coding interview汇总目录

https://github.com/careercup/CtCI-6th-Edition-php

http://www.1point3acres.com/bbs/forum-145-1.html

https://github.com/vhf/free-programming-books/blob/master/free-programming-books-zh.md

http://algs4.cs.princeton.edu/home/

http://introcs.cs.princeton.edu/python/home/

How to install MariaDB on CentOS

Goto https://downloads.mariadb.org/mariadb/repositories/#mirror=evowise-ny and select version to generate repository file. For version 10.1, the file content as blow:

# MariaDB 10.1 CentOS repository list - created 2016-11-04 03:20 UTC
# http://downloads.mariadb.org/mariadb/repositories/
[mariadb]
name = MariaDB
baseurl = http://yum.mariadb.org/10.1/centos7-amd64
gpgkey=https://yum.mariadb.org/RPM-GPG-KEY-MariaDB
gpgcheck=1

Installation command:

sudo yum install MariaDB-server MariaDB-client

Command to secure Mysql (By default, root doesn’t have password)

sudo service mariadb start
sudo mysql_secure_installation