01 2016 档案

摘要:Visualizing Concurrency in Go 阅读全文
posted @ 2016-01-28 12:54 格通 阅读(148) 评论(0) 推荐(0) 编辑
摘要:http://blog.equanimity.nl/blog/2015/03/15/erlang-one-weird-trick-goodiebag/ http://erlang.org/pipermail/erlang-questions/2012-December/071223.html 备注一 阅读全文
posted @ 2016-01-27 21:11 格通 阅读(387) 评论(0) 推荐(0) 编辑
摘要:设置时间:date -s "2016-02-26 23:58:0"恢复到正常时间:ntpdate pool.ntp.org在使用ntpdate过程中,遇到过问题: 7 Feb 00:25:30 ntpdate[5648]: Can't adjust the time of day: Invalid ... 阅读全文
posted @ 2016-01-27 11:42 格通 阅读(1136) 评论(0) 推荐(0) 编辑
摘要:Magnus Ahltorp的Mysql Driver里面介绍emysql的缺陷:1. 隔离不够好,2.不能伸缩mysql-otp使用1个进程1个mysql连接,隔离得很好。推荐使用。mysql-otp-poolboy使用poolboy + erlang-otp 来形成线程池,使用poolboy来避... 阅读全文
posted @ 2016-01-26 20:10 格通 阅读(863) 评论(0) 推荐(0) 编辑
摘要:utf8mb4支持emoji表情,在mysql中设置连接字符集为utf8mb4可以直接储存emoji表情。可以在客户端连接中设置:SET NAMES utf8mb4查看是否起效:SHOW VARIABLES LIKE 'char%';在mysql-otp可以在mysql:start_link/1函... 阅读全文
posted @ 2016-01-26 19:28 格通 阅读(658) 评论(0) 推荐(0) 编辑
摘要:Erlang doesn't detect net splits by itself. You could start looking atnet_kernel:set_net_ticktime/2 (try to increase this value if your node issufferi... 阅读全文
posted @ 2016-01-23 17:22 格通 阅读(167) 评论(0) 推荐(0) 编辑
摘要:今天部署一个阿里云服务器,所有配置项都改好了,就是连接不上本机。反复查找,防火墙端口和网卡接口都配置对了,selinux也关闭了,但就是连接不上阿里云内网的ip。由于连接是本机,把ip填写为127.0.0.1就可以了,猜测是阿里云内部网络的dns服务器不稳定。因为我们部署有几个服务器,我用setup... 阅读全文
posted @ 2016-01-23 15:08 格通 阅读(668) 评论(0) 推荐(0) 编辑
摘要:PHP 开发环境一键安装包, 有个叫lnmp。这个ltnmp看起来更新比较多,开发比较频繁,包括的组件更多。安装和使用教程:http://www.moqifei.com/ltnmp标记一下。 阅读全文
posted @ 2016-01-23 11:17 格通 阅读(205) 评论(0) 推荐(0) 编辑
摘要:今天发现一个问题,2个erlang节点,1个主动ping另外一个不通,然后等待另外一个ping过来,2个节点才连通。记录一下。首先,erlang节点的cookie是一致的。查了文档,cookie一致就可以连通的。其次,跟用户权限没关系,超级用户跟普通用户是一样的。后来google了一番,发现了几个相... 阅读全文
posted @ 2016-01-22 13:08 格通 阅读(886) 评论(0) 推荐(0) 编辑
摘要:记录一下使用的具体命令,具体参考:Centos设置禁止密码登录而只使用密钥登录SSH方法 优先参考这个。ssh使用公钥授权不通过的问题解决Xshell配置ssh免密码登录-密钥公钥(Public key)与私钥(Private Key)登录#mkdir ~/.ssh#ssh-keygen -t rs... 阅读全文
posted @ 2016-01-22 12:53 格通 阅读(435) 评论(0) 推荐(0) 编辑
摘要:sed '/^echo/!s/text/subtext/g'如果是以echo开始行首的行就不进行替换。参考sed substitution conditional 阅读全文
posted @ 2016-01-21 09:54 格通 阅读(220) 评论(0) 推荐(0) 编辑
摘要:静态ip参考Ubuntu通过PPTP协议使用VPN动态ip直接使用network-manager 阅读全文
posted @ 2016-01-19 21:23 格通 阅读(44) 评论(0) 推荐(0) 编辑
摘要:cd yourdirectoryperl -e 'for(){((stat)[9]<(unlink))}'参考Efficiently delete large directory containing thousands of files 阅读全文
posted @ 2016-01-19 20:49 格通 阅读(238) 评论(0) 推荐(0) 编辑
摘要:find . -size 0 -name "*.log" -exec rm {} \; 阅读全文
posted @ 2016-01-19 20:48 格通 阅读(139) 评论(0) 推荐(0) 编辑
摘要:find . -type d -maxdepth 1 | grep "./" | sed 's/\.\///g' | sed 's/-[0-9].*$//' | sort -u 阅读全文
posted @ 2016-01-19 17:33 格通 阅读(221) 评论(0) 推荐(0) 编辑
摘要:yum install `yum deplist emacs | grep provider | awk -F: '{print $2}' | awk '{print $1}' | xargs`yum install libX11-devel libjpeg-turbo-devel libpng-d... 阅读全文
posted @ 2016-01-19 17:32 格通 阅读(324) 评论(0) 推荐(0) 编辑
摘要:grep -vxFf b.txt a.txt > newa.txt更好的方法是comm -1 -3 b.txt a.txt > newa.txt来自Tool in unix to subtract text files? [duplicate] 阅读全文
posted @ 2016-01-19 16:40 格通 阅读(253) 评论(0) 推荐(0) 编辑
摘要:linux:svn propset svn:executable on *svn commit -m "add executable property" 阅读全文
posted @ 2016-01-19 16:23 格通 阅读(229) 评论(0) 推荐(0) 编辑
摘要:$emacs在emacs查看里面,输入:C-u 0 M-x byte-recompile-directory然后输入~/.emacs.d即可。 阅读全文
posted @ 2016-01-19 14:14 格通 阅读(194) 评论(0) 推荐(0) 编辑
摘要:在同一个生产环境中,多语言配合开发是常态,暂时发现几个不同方法。1. 共享数据库。数据库是瓶颈,如果有其中一个锁住了数据库,其他的所有的都会崩溃。2.使用thrift多语言RPC调用。3.使用rabbitmq等消息队列。 阅读全文
posted @ 2016-01-19 13:16 格通 阅读(283) 评论(0) 推荐(0) 编辑
摘要:$erl -name a@localhost -setcookie abc -remsh b@localhost1>fprof:trace([start, {file, "/home/getong/first.trace"}, verbose, {procs,all}]).2>fprof:trac... 阅读全文
posted @ 2016-01-19 13:12 格通 阅读(304) 评论(0) 推荐(0) 编辑
摘要:random模块使用相同的种子,在不同的进程中会出现相同的结果。rand的模块使用不同的种子,在不同的进程中不会出现相同的结果。2个模块都是erlang自带的。然后erlang在文档里面注明推荐使用rand替换random最近部署出了问题,就是因为项目有个文件名称也是rand.erl,源码删了,但编... 阅读全文
posted @ 2016-01-15 18:16 格通 阅读(202) 评论(0) 推荐(0) 编辑
摘要:mysqldump -u root -p -h --opt -d --single-transaction | sed 's/ AUTO_INCREMENT=[0-9]*\b//' > .sql使用 if not existssed -i 's/CREATE TABLE/CREATE TABLE... 阅读全文
posted @ 2016-01-15 13:03 格通 阅读(554) 评论(0) 推荐(0) 编辑
摘要:find . -name file -exec echo abc > {} \; fail应该改用:find . -name file -exec bash -c 'echo abc > {}' \;或者for i in `find . -name file`do echo abc > $i... 阅读全文
posted @ 2016-01-13 15:04 格通 阅读(436) 评论(0) 推荐(0) 编辑
摘要:git clone https://github.com/erlang/otpcd otpgit taggit checkout -b OTP-18.2.2 OTP-18.2.2./otp_build allexport LANG=en./configure --prefix=/usr/local/... 阅读全文
posted @ 2016-01-12 21:25 格通 阅读(380) 评论(0) 推荐(0) 编辑