This blog moved to medium->https://medium.com/@cocoamaemae

Wednesday, March 15, 2017

How to install el-get

What's el-get
The tool to install or configure elisp packages.

How to install
Using github is general way. Run the blow.
cd ~/.emacs.d
git clone https://github.com/dimitri/el-get.git

After install el-get was done, specify using el-get and directories to install elisp packages
Add the below to ~/.emacs.d/init.el or ~/.emacs.d/init

;; el-get
(add-to-list 'load-path (locate-user-emacs-file "el-get"))
(require 'el-get)
;; packages downloaded by el-get into ~/.emacs.d/elisp
(setq el-get-dir (locate-user-emacs-file "elisp"))





Tuesday, February 7, 2017

How to use yum

Basic syntax

yum <options> <package names>


options

# install specified packages
install

# uninstall specified packages
remove

# Search packages which are enable to install

search

# search packages and show which packages are root
whatprovides

# Respond as yes against questions
-y

# Specify a yum configuration file
-c <file path>

e.g.

# Install packages
yum install <options> <package names>

# Uninstall packages

yum remove <package names>

# Downgrade packages

yum downgrade <package name>

# Display packages installed

yum list installed

# Clear cache


yum clear all

# Install vim and emacs
sudo yum install -y vim emacs

# Uninstall vim and emacs

sudo yum remove vim emacs

Wednesday, January 18, 2017

How to use supervisor

Brief
Surmise about supervisor

What is Supervisor?
make any modules a daemon

Environment 
CentOS

How to install
# add epel repository
sudo yum -y install epel-release

# install

sudo yum -y install supervisor

# start supervisor


sudo systemctl start supervisord

How to configure

# make a module a daemon
sudo supervisorctl start <module name>

Create a configuration file under /etc/supervisor.d/

e.g.

/etc/supervisor.d/xxx.ini

# xxx is a module name which is registered
cat /etc/supervisor.d/xxx.ini

[program:xxx]

command=xxx
user=***
autostart=false
autorestart=true
log_stdout=true
log_stderr=true
redirect_stderr=true
stdout_logfile_maxbytes=**MB
stdout_logfile_backups=**
stdout_logfile=***

Tuesday, January 17, 2017

Thursday, December 22, 2016

How to create date SQL by MySQL or MariaDB

The following is examples of SQL avaiable in MySQL and MariaDB

# 1 month ago
NOW() - INTERVAL 1 MONTH

# 3 months and 7 days ago
NOW() - INTERVAL 3 MONTH -INTERVAL 7 DAY

# Specify hour, minute, second
DATE_FORMAT(now() - interval 1 year - interval 3 month, '%Y-%m-%d')

Wednesday, December 14, 2016

How to use du

What's du?
Reports the size of directory trees

Basic syntax
du <options> <file or directory name>


options

# Show capacity
-h

# Show amount of files or directories
-s

# Specify tree depth
--max-depth

e.g.
# Show capacities from root path tree
du -sh /

Front End Development Tools

TaskRunner Tool executing multiple tasks by only one execution. Tasks are like CSS preprocessor, Transpire, Module Bundler, etc... e.g. ...