docker run -v /etc/localtime:/etc/localtime:ro -i -t mattdm/fedora /bin/bash
Source: stackoverflow: How to make sure docker’s time syncs with that of the host?
docker run -v /etc/localtime:/etc/localtime:ro -i -t mattdm/fedora /bin/bash
Source: stackoverflow: How to make sure docker’s time syncs with that of the host?
show all containers:
stop all containers:
remove all containers:
remove all docker images:
enter docker container:
build docker image:
show all build failure images:
remove all build failure images:
create docker-machine on virtualbox:
set docker environment:
unset docker environment:
show docker all network:
show docker network detail information:
start container with forwarding port setting
ex. # docker run -p 60022:22 -p 2181:2181 -p 8090:8090 -p 60000:60000 -p 60010:60010 -p 60020:60020 -p 60030:60030 qmi
start container with hostname setting
ex. # docker run –hostname qmi_docker qmi
start container with input/output tty
stop container
build image from container
error message:
com.a.b.c.exception.BaseDAOException: org.apache.hadoop.hbase.security.AccessDeniedException: org.apache.hadoop.hbase.security.AccessDeniedException: Insufficient permissions for user ‘Cowman’ (table=ABC, action=READ)
in jvm conf. add
“-DHADOOP_USER_NAME=webuser”
<VirtualHost pr.site.org:80> ServerName pr.site.org ServerAdmin webmaster@localhost DocumentRoot /var/www/pr.site.org # !-- add this section <Directory /var/www/pr.site.org> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory> # !-- ErrorLog ${APACHE_LOG_DIR}/pr_error.log CustomLog ${APACHE_LOG_DIR}/pr_access.log combined </VirtualHost>
a2enmod rewrite
service apache2 restart
Ref.
[1] Victor Hung’s Diary: 「教學」解決 WordPress 固定網址設定 404 錯誤
[2] DigitalOcean: WordPress permalinks tried everything
Java code:
public static void main(String[] args) { String stringValue = Bytes.toStringBinary(Bytes.toBytes(1532080782183l)); System.out.println(stringValue); Long longValue = Bytes.toLong(Bytes.toBytesBinary(stringValue)); System.out.println(longValue); }
HBase shell command:
hbase(main):056:0> Bytes.toStringBinary(Bytes.to_bytes(1532080782183)) => "\\x00\\x00\\x01d\\xB7!{g" hbase(main):057:0> Bytes.toLong("\x00\x00\x01d\xB7!{g".to_java_bytes) => 1532080782183
java -jar checkstyle-8.12-all.jar -c qmi_checks.xml {Qmi_Project} -f xml -o report.xml
xsltproc -o output.html checkstyle-noframes-severity-sorted.xsl input.xml
Source: docker容器内cron不执行
vim /etc/pam.d/crond
#
#
#
account sufficient pam_access.so
account include password-auth
session sufficient pam_loginuid.so
session include password-auth
auth include password-auth
required: failure of such a PAM will ultimately lead to the PAM-API returning failure but only after the remaining stacked modules (for this service and type) have been invoked.
sufficient: if such a module succeeds and no prior required module has failed the PAM framework returns success to the application or to the superior PAM stack immediately without calling any further modules in the stack. A failure of a sufficient module is ignored and processing of the PAM module stack continues unaffected.
Source: stackopenflow: Changing git commit message after push (given that no one pulled from remote)
git comment --amend
git push --force
error log: /opt/rh/python27/root/usr/bin/python: error while loading shared libraries: libpython2.7.so.1.0: cannot open shared object file: No such file or directory
check libpython2.7.so.1.0 exist?
find . -name 'libpython2.7.so.1.0'
if the file was exist: edit the ldconfig config
echo "/opt/rh/python27/root/usr/lib64" > /etc/ld.so.conf.d/python27.conf
ldconfig
if the file was not exist: install python27
(to install python2.7 in centos 6 , source: vcloudnine: Python 2.7 for CentOS 6)
yum install centos-release-SCL
yum install python27
Source: stackoverflow: Find when a file was deleted in Git
$ git log -1 -- o-core/o-service/src/main/java/path/file.java
commit 0d5ab0e5d9df7d7b5906ff8db169f43b760daea0
Author: cowman cowman@mitake.com.tw
Date: Mon Dec 18 17:58:26 2017 +0800
remove file.java</code>