https://www.gravatar.com/avatar/5f48da38e786436afece6f2e46196202?s=240&d=mp

Linux Shell

Mac 终端高亮

Mac 下的终端居然没有高亮。

先看最终效果:

https://statics.lshell.com/terminal-highlighting.png

将以下代码拷贝到 ~/.bash_profile 中:

#enables colorin the terminal bash shell export  
export CLICOLOR=1  
#sets up thecolor scheme for list export  
export LSCOLORS=gxfxcxdxbxegedabagacad  
#sets up theprompt color (currently a green similar to linux terminal)  
export PS1='[033[01;32m]u@h[033[00m]:[033[01;36m]w[033[00m]$ '  
#enables colorfor iTerm  
export TERM=xterm-color  

```使~/.bash_profile生效 运行以下命令,或者重启终端  

source ~/.bash_profile

Win 10 XShell 6 经常未响应

作为一个运维,每天有8个小时都在使用 Xshell ,基本每天要开几十个窗口,虽然大部分操作都写在了WEB后台,但是仍然会有Xshell的需求;不知从何时起,同时打开多个(大于3)ssh 连接的时候,Xshell 大概率的会导致未响应,偶然在官方论坛上找到了解决方案:

SVN:E200030: sqlite[S11]: database disk image is malformed

When I tried svn up, I got an error.

E200030: sqlite[S11]: database disk image is malformed  

```I found a solution on [stackoverflow](https://stackoverflow.com/questions/13675615/svn-cleanup-sqlite-database-disk-image-is-malformed).```
sqlite3 .svn/wc.db "pragma integrity_check"  
sqlite3 .svn/wc.db "reindex nodes"  
sqlite3 .svn/wc.db "reindex pristine"  

2018 我们一起走过

https://statics.lshell.com/2019-life.jpg

工作

于今年6月份离开了上家公司,在现在的公司中又变成了我一人单独搞运维工作了,想起这几年来,不知道是什么原因,我总是会因这样那样的问题导致我始终在单干,没有同行的交流学习,其实我是一个自律性比较差的人,不愿去想太多,一般都只是抱着完成任务的心态去做,不会计划,或者说不会去执行,很多事情都靠三分钟热度。比起大D的有计划有执行力差得太远,包括写总结也是跟大D学的。

Install and configure Redis on Ubuntu 16.04 with systemd

Manage my redis service with systemctl

Author: @hackedunit
I just fixed a bug.

  1. Install pre-requisities
$ sudo apt-get install  tcl8.6-dev
```2. Install Redis  

$ cd /tmp
$ wget http://download.redis.io/redis-stable.tar.gz
$ tar xzvf redis-stable.tar.gz
$ cd redis-stable
$ make
$ make test
$ sudo make install

$ sudo mkdir /etc/redis
$ sudo cp /tmp/redis-stable/redis.conf /etc/redis
$ sudo vi /etc/redis/redis.conf

how to install mysqlclient in python2/python3 on windows 10

how  to install mysqlclient in python2/python3 on windows 10
Installing mysqlclient on windows is very cumbersome.
here is a simple way :

  1. According to the version of python, download the corresponding file on this page.
       - python2.7:
         - 32 bit: mysqlclient‑[version]‑cp27‑cp27m‑win32.whl
         - 64 bit: mysqlclient‑[version]‑cp27‑cp27m‑win_amd64.whl
       - python3.7:
         - 32 bit: mysqlclient‑[version]‑cp37‑cp37m‑win32.whl
         - 64 bit: mysqlclient‑[version]‑cp37‑cp37m‑win_amd64.whl
    2.  install it
       - command: pip install  mysqlclient‑[version]‑cp37‑cp37m‑xxx.whl
    3.  done