阿小信大人的头像
Talk is cheap. Show me the code. Linus Torvalds

centOS安装mysql2015-09-24 18:11

####安装mysql

下载

sudo rpm -Uvh http://dev.mysql.com/get/mysql-community-release-el7-5.noarch.rpm
sudo yum install mysql-server
service mysql stop
mysqld_safe --skip-grant-tables &
mysql -u root
> use mysql;
> update user set password=PASSWORD("NEW-ROOT-PASSWORD

......
#Linux/Mac#   #mysql 评论[0]阅读全文[988]

通过浏览器实时分享终端内容2015-09-11 18:48

在开会时要看别人终端的内容,没有投影仪,或者有投影仪但是对有像我这种近视又不戴眼睛的同学来说是很不方便的,所以急需一个能通过浏览器实时分享终端内容的工具。

tty相关的工具很多,类似tty.js、gotty这些,只能分享终端给别人使用,不能实时的直播你在终端的动作。还有个ttystudio是做终端gif录像的。

要说的实时分享的工具是ttyrec和ttycast,安装:

npm install -g ttyrec ttycast

完成后调整你的终端大小,这个终端的大小就是浏览器里面显示的大小,调整好后:

ttyreccast outfile.tty

......
#Linux/Mac#   评论[1]阅读全文[1075]

CentOS安装nginx2015-08-13 21:42

可能会需要安装开发库

yum install readline-devel pcre-devel openssl-devel

追加 nginx 的 yum 仓库,需要创建一个文件 /etc/yum.repos.d/nginx.repo,并将下面的其中一个内容复制进去:

[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/$releasever/$basearch/
gpgcheck=0
enabled=1

安装

yu

......
#Linux/Mac#   评论[1]阅读全文[958]

args for pwd in shell2015-07-07 13:36


ashin@MacBook-Pro:~/Projects/turalyon/turalyon
> echo ${PWD:A}
/Users/ashin/Projects/turalyon/turalyon
ashin@MacBook-Pro:~/Projects/turalyon/tu

......
#Linux/Mac#   评论[0]阅读全文[819]

nginx特定的http状态码2015-06-12 11:52


**ngx_http_special_response**

:::text
494, request header too large
495, https certificate error
496, https no certificate
497, http to https
498, canceled
499, client has closed connection

![](http://blogpostpics.qiniudn.com/2015_06_12_11_51_36.jpeg)

......
#Linux/Mac#   #nginx 评论[0]阅读全文[1014]

Mac OSX上pip安装M2Crypto2015-05-21 16:36

先要安装swig不然直接安装会报错

# Cleanup
pip uninstall m2crypto
brew uninstall swig --force

# Install swig 3.0.4 and compile m2crypto
brew update
brew install homebrew/versions/swig304
brew link homebrew/versions/swig304
pip install m2crypto

......
#Linux/Mac#   评论[0]阅读全文[5997]

CentOS升级Python2.6到2.72015-04-24 14:47

#### Python2.6升级Python2.7:

编译环境准备

yum groupinstall "Development tools"
yum install python-devel zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel

下载安装2.7

tar -jxvf Python-2.7.11.tgz
cd Python-2.7.11
./configure --prefix=/usr/

......
#Linux/Mac#   评论[0]阅读全文[1599]

Mac屏幕录像转成gif2015-04-04 13:18

**屏幕录像**

打开Quicktime Player -> 文件 -> 新建屏幕录像 -> 点击/拖动鼠标进行录像区域选择(点击是进行全屏录制) -> 完成后选择文件 -> 存储为一个.mov的视频文件

**转换为gif**

安装ffmpeg和gifsicle

brew install ffmpeg
brew install gifsicle
# brew install imagemagick

转换:

ffmpeg -i in.mov -s 600x400 -pix_fmt rgb24 -r 10 -f gif - |

......
#Linux/Mac#   评论[0]阅读全文[1119]