- 浏览: 132856 次
- 性别:
- 来自: 北京
最新评论
-
wudixiaotie:
white_crucifix 写道吓死宝宝了,以为有erlan ...
erlang hibernate -
white_crucifix:
吓死宝宝了,以为有erlang版的hibernate框架
erlang hibernate -
zzjmates:
...
rails缓存清空 -
wudixiaotie:
没用过rubymine
rails调试 -
string2020:
和工具(rubymine)提供的调试方式比,那个好
rails调试
文章列表
erlang gen_server的一个困惑
- 博客分类:
- erlang
如果用gen_server,那么必须要在启动的时候给他个名字,这个名字是为了register。可是,如果我要做一个游戏的后端,同时会有几十万上百万的gen_server进程,那么光是名字用到的atom就已经超过atom table的限制了阿(max=1048576),这要怎么办呢??难道不用gen_server??或者在启动的时候扩大atom table的最大容量(erl -t size)??但是每个atom refers 都是需要占用memory的阿??!!怎么办??
后来带着这个困惑找了一圈,原来这种情况的化就启动gen_server的时候别用local启动,而是global,这样gl ...
centos crontab
- 博客分类:
- Linux
新建crontab:
crontab -e
创建当前用户的时间表
输出:
crontab: installing new crontab
发现不好使,日志里有输出:
/var/log/cron
Apr 1 14:18:01 iZ25yiy40hdZ CROND[8679]: (www) CMD (cd /home/www/express && /usr/local/rvm/rubies/ruby-2.2.0/bin/rake RAILS_ENV=production daily:run)
但是实际没执行。
这是什么原因呢,原来new cro ...
centos更新web开发相关源
- 博客分类:
- Linux
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
sudo yum install epel-release
su -
cd /etc/yum.repos.d
wget http://rpms.famillecollet.com/enterprise/remi.repo
yum--enablerepo=remi update redis
如果这个命令还是不能升级redis,则需要手动修改remi.repo,把里面的enabled=0 全部改成enabled=1
然后再执行
...
linux curl
- 博客分类:
- Linux
带参数的post请求 curl -d 'mobile=13412341234' http://192.168.1.1/api/user/sign_in
能看见cookie的post请求 curl -v -d 'mobile=13412341234' http://192.168.1.1/api/user/sign_in
git remote add origin ssh://www@123.1.1.1:3000/home/www/foo/
I experienced the same problem and it was due to SELinux.
To check if SELinux is running:
# getenforce
To disable SELinux until next reboot:
# setenforce Permissive
Restart Nginx and see if the problem persists. If you would like to permanently alter the settings you can edit /etc/sysconfig ...
# 设置密码
redis> CONFIG SET requirepass secret_password # 将密码设置为 secret_password
OK
redis> QUIT # 退出再连接,让新密码对客户端生效
[huangz@mypad]$ redis
redis> PING # 未验证密码,操作被拒绝
(error) ERR operation not permitted
redis ...
CentOS 使用yum命令安装出现错误提示”could not retrieve mirrorlist http://mirrorlist.centos.org ***”
刚安装完CentOS,使用yum命令安装一些常用的软件,使用如下命令:yum –y install gcc.
提示如下错误信息:
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
Could not retrieve mirrorlist http: ...
linux查看当前是什么版本的系统
- 博客分类:
- Linux
发行版:
发行版:
cat /etc/issue
linux版本:
cat /proc/version
git从一台电脑的本地分支clone
- 博客分类:
- GitHub
git clone root@192.168.1.1:/var/www/fuckyou
如果提示:
ssh: connect to host 192.168.1.151 port 22: Connection refused
则要开启目标机器的openssh server
sudo apt-get install openssh-server
然后ps -ef | grep sshd
如果启动了就ok了
在virtualbox的虚拟机中安装ubuntu,从外部访问ubuntu的rails server,发现总是connection refused,原来默认启动server的命令rails s的话绑定的地址是localhost:3000结果,由于是桥接模式,虚拟机的localhost对应的是127.0.0.1,所以外部的系统无法访问到这个地址,桥接的ip没有对应到localhost上。导致问题的出现。
解决办法有两个:
1.修改/etc/hosts:把ip对应到localhost上。
2.启动rails server的时候用下述命令:
rails s -b 192.168.1.151
...
sudo apt-get install virtualbox-guest-dkms
sudo apt-get install curl
\curl -sSL https://get.rvm.io | bash
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt-get install vim
sudo vim /etc/hosts
cd /var/lib/apt/lists/partial/
sudo rm -rf *
sudo apt-get upd ...
转载自(http://feifeifather.blog.163.com/blog/static/21342203220140895556458/)
当运行apt-get update后出现如下错误时:E: Some index files failed to download, they have been ignored, or old ones used instead.
可以将目录下/var/lib/apt/lists/partial/所有的文件清掉,再次运行apt-get update即可!自带源在大陆不好。
转自:http://www.cnblogs.com/kaima/archive/2009/10/13/1582337.html
网页的缓存是由HTTP消息头中的“Cache-control”来控制的,常见的取值有private、no-cache、max-age、must-revalidate等,默认为private。其作用根据不同的重新浏览方式分为以下几种情况:(1) 打开新窗口如果指定cache-control的值为private、no-cache、must-revalidate,那么打开新窗口访问时都会重新访问服务器。而如果指定了max-age值,那么在此值内的时间里就不会重新访问 ...