-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom.xml
More file actions
63 lines (50 loc) · 5.1 KB
/
atom.xml
File metadata and controls
63 lines (50 loc) · 5.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title><![CDATA[黔之驴]]></title>
<link href="http://beiersi.github.io/atom.xml" rel="self"/>
<link href="http://beiersi.github.io/"/>
<updated>2013-11-18T23:41:12+08:00</updated>
<id>http://beiersi.github.io/</id>
<author>
<name><![CDATA[贝尔斯]]></name>
</author>
<generator uri="http://octopress.org/">Octopress</generator>
<entry>
<title type="html"><![CDATA[ruby 字符串定义中百分号的用法]]></title>
<link href="http://beiersi.github.io/blog/2013/11/18/ruby-string-bai-fen-hao-yong-fa/"/>
<updated>2013-11-18T22:43:00+08:00</updated>
<id>http://beiersi.github.io/blog/2013/11/18/ruby-string-bai-fen-hao-yong-fa</id>
<content type="html"><![CDATA[<ol>
<li><code>%(string)</code> 、<code>%Q(string)</code> 相当于 <code>"string"</code> 。双引号字符串表达式</li>
<li><code>%q(string)</code> 相当于 <code>'string'</code> ,单引号字符串表达式,不会对字符串中的变量运算。</li>
<li><code>%r(string)</code> 相当于 <code>/string/</code> ,正则表达式。</li>
<li><code>%w(str1 str2 str3)</code> 相当于 <code>['str1', 'str2', 'str3']</code> 。</li>
<li><code>%W(str1 str2 str3)</code> 相当于 <code>["str1", "str2", "str3"]</code> 。</li>
<li><code>%s(string)</code> 相当于 <code>'string'.to_sym</code> 或 <code>:'string'</code> 。注意是单引号,所以不会对字符串中的变量表达式进行运算。</li>
<li><code>%x(string)</code> 相当于 `string`。执行系统中的命令,跟shell语法中的`cmd`差不多。如果命令有错会抛出异常并且没有返回。</li>
</ol>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[如何清除旧的linux kernel]]></title>
<link href="http://beiersi.github.io/blog/2013/11/02/qing-ru-he-chu-jiu-de-linux-kernel/"/>
<updated>2013-11-02T00:13:00+08:00</updated>
<id>http://beiersi.github.io/blog/2013/11/02/qing-ru-he-chu-jiu-de-linux-kernel</id>
<content type="html"><![CDATA[<p>前几天用aptitude upgrade升级,总是提示无法安装成功新的linux kernel,看到报错信息里面有以后bzip没有空间什么的(过了好几天,原文提示记不住了),df看了一下boot分区90%多了,网上搜索了一下,大概的解决办法应该删除之前旧的linux核心,可参考 <a href="http://askubuntu.com/questions/2793/how-do-i-remove-or-hide-old-kernel-versions-to-clean-up-the-boot-menu">这里</a>,执行命令:</p>
<figure class='code'><figcaption><span>命令参考</span></figcaption><div class="highlight"><table><tr><td class="gutter"><pre class="line-numbers"><span class='line-number'>1</span>
</pre></td><td class='code'><pre><code class='sh'><span class='line'>dpkg -l <span class="s1">'linux-*'</span> | sed <span class="s1">'/^ii/!d;/'</span><span class="s2">"$(uname -r | sed "</span>s/<span class="se">\(</span>.*<span class="se">\)</span>-<span class="se">\(</span><span class="o">[</span>^0-9<span class="o">]</span><span class="se">\+\)</span>/<span class="se">\1</span>/<span class="s2">")"</span><span class="s1">'/d;s/^[^ ]* [^ ]* \([^ ]*\).*/\1/;/[0-9]/!d'</span> | xargs sudo apt-get -y purge
</span></code></pre></td></tr></table></div></figure>
<p>。然后boot分区就有空间了。继续执行<code>apt-get upgrade</code>,成功升级。</p>
]]></content>
</entry>
<entry>
<title type="html"><![CDATA[ubuntu 13.10 下安装apache+passenger]]></title>
<link href="http://beiersi.github.io/blog/2013/11/01/ubuntu-13-dot-10-xia-an-zhuang-apache-plus-passenger/"/>
<updated>2013-11-01T15:26:00+08:00</updated>
<id>http://beiersi.github.io/blog/2013/11/01/ubuntu-13-dot-10-xia-an-zhuang-apache-plus-passenger</id>
<content type="html"><![CDATA[<p>前几天打开电脑以后,升级管理器提示可以升级到13.10,简单的备份了一下文件(本人用的双系统win7+ubuntu,大部分文件都放在ntfs分区下),开始升级,升级过程一路顺利,就是时不时提示需要替换某些配置文件,yes或no就行了。</p>
<p>重启之后,想起来前段时间用rvm安装了ruby2.0版本之后一直没有装passenger(因为平时总需要切换到win7,所以一直是在VirtualBox中的虚拟机来做开发的),所以打算装一下,按照惯例直接passenger-install-apache2-module,结果发现居然提示出错,看了一下提示找不到一些环境变量 APACHE_XX什么的,/etc/apache2 目录下有个envvars文件,看看觉得直接source envvars应该有戏,接着继续执行passenger-install-apache2-module,这次提示没有HOME变量了,这个是因为 envvars 文件的问题,里面有一行unset HOME,所以手动执行以下export HOME=xxx,安装顺利进行。</p>
<p>后面一路配置,按惯例/etc/apache2/site-available/创建好站点,执行a2ensite又提示找不到site,google一把,原来需要所有文件名都加.conf结尾,文件改名,然后a2ensite xxx.conf,重启apache,浏览器访问,终于看到了成功运行的结果。</p>
]]></content>
</entry>
</feed>