<?xml version="1.0" encoding="utf-8" ?><rss version="2.0"><channel><title><![CDATA[xhl_will的博客]]></title><description><![CDATA[]]></description><link>https://blog.youkuaiyun.com/xhl_will</link><language>zh-cn</language><generator>https://blog.youkuaiyun.com/</generator><copyright><![CDATA[Copyright &copy; xhl_will]]></copyright><item><title><![CDATA[ubuntu下如何查看软件的版本以及安装目录]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/23831293</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/23831293</guid><author>xhl_will</author><pubDate>Wed, 16 Apr 2014 11:17:21 +0800</pubDate><description><![CDATA[首先用命令：

cat /etc/issue 


或

lsb_release -a 


确定linux系统的版本，因为如果是RedHat下面的部分命令用不了。


然后：

1. 查询版本

dpkg -l 软件名


例如：dpkg -l gedit，或

aptitude show 软件名



2. 查询安装的目录

dpkg -]]></description><category></category></item><item><title><![CDATA[mysql 计算两个时间的间隔]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8558819</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8558819</guid><author>xhl_will</author><pubDate>Thu, 31 Jan 2013 11:16:15 +0800</pubDate><description><![CDATA[最近做项目要从记录里找出 并按距离当前时间最近的来排序，这就要计算每个记录的时间与当前时间的差值。一开始用了 


ABS( log_time - NOW() )


但是发现出来的结果并不对，是一个有小数点后有6个零的一长串数，有时候距离现在更远的时间得到的时间差反而更小，很奇怪。
所以减法还是不要随便乱用的好，原来mysql里有一个计算时间间隔的函数 TIMESTAMPDIFF(]]></description><category></category></item><item><title><![CDATA[Git创建新的空分支]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8530840</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8530840</guid><author>xhl_will</author><pubDate>Tue, 22 Jan 2013 17:26:09 +0800</pubDate><description><![CDATA[在偶尔的情况下，你可能会想要保留那些与你的代码没有共同祖先的分支。例如在这些分支上保留生成的文档或者其他一些东西。
如果你需要创建一个不使用当前代码库作为父提交的分支，你可以用如下的方法创建一个空分支:

git symbolic-ref HEAD refs/heads/branchname
这时你会发现你已经在 branchname 这个分支下了，接着


rm .git/inde]]></description><category></category></item><item><title><![CDATA[扑克中的秘密]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8487161</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8487161</guid><author>xhl_will</author><pubDate>Wed, 09 Jan 2013 20:28:32 +0800</pubDate><description><![CDATA[听着poker face，心什么来什么的就查了一下poker的资料。


---------------------


扑克牌 共有 54 张，其中 52 张是正牌，表示一年 52 个星期；两张是副牌，大王代表太阳，小王代表月亮；一年的司机四季的春、夏、秋、冬用桃、心、梅、方来表示，其中红心、方块代表 白昼，黑桃、梅花代表
 黑夜。




每一季是 13 个星期，扑克牌]]></description><category></category></item><item><title><![CDATA[git技巧：删除在本地有但在远程库中已经不存在的分支]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8450193</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8450193</guid><author>xhl_will</author><pubDate>Sat, 29 Dec 2012 13:07:27 +0800</pubDate><description><![CDATA[上篇 讲到用

$ git remote show origin
可以查看远程库的一些信息，及与本地分支的信息。有时候可能遇到如下情况


$ git remote show origin

* remote origin
  Fetch URL: ... .git
  Push  URL: ... .git
  HEAD branch: master
  Remote branche]]></description><category></category></item><item><title><![CDATA[git push 操作]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442546</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442546</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 11:36:21 +0800</pubDate><description><![CDATA[git push 的格式详见 这里。


之前 git push 的默认操作是matching:
all your branches were sent to the remote as long as there already are branches of the same name over there.


在新出的 Git-1.8.0 中提到在下个版本中（注意不是1.8.]]></description><category></category></item><item><title><![CDATA[Linux 如何重启 apache]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442423</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442423</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 10:57:12 +0800</pubDate><description><![CDATA[httpd -k restart
关键是找到httpd这个文件
如果
[root@test bin]# httpd restart
-bash: httpd: command not found
明显是bash在path所指的目录下找不到httpd，试试找到它，然后用绝对路径。
比如我们这里是

/usr/local/apache2/bin/httpd -k restart]]></description><category></category></item><item><title><![CDATA[git技巧：综合]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442304</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442304</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 10:54:11 +0800</pubDate><description><![CDATA[查看git版本

$ git --version
git version 1.7.11.msysgit.1
查看git所有配置项


$ git config -l
core.symlinks=false
core.autocrlf=true
color.diff=auto
color.status=auto
color.branch=auto
color.interactive=tr]]></description><category></category></item><item><title><![CDATA[Git 1.8.0 改进内容]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442289</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442289</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 10:36:16 +0800</pubDate><description><![CDATA[Git v1.8.0 Release Notes
========================

Backward compatibility notes
----------------------------

In the next major release (not *this* one), we will change the
behavior of the "git push"]]></description><category></category></item><item><title><![CDATA[git技巧：配置和删除配置]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442277</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442277</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 10:34:47 +0800</pubDate><description><![CDATA[git配置某一项：

$ git config alias.co checkout
git删除某一项配置：


$ git config --unset alias.co]]></description><category></category></item><item><title><![CDATA[git：更改远程仓库指向 remote url]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442250</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442250</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 10:32:39 +0800</pubDate><description><![CDATA[更改仓库指向：        #仅修改.git/config文件中repositories的url

$ git remote set-url origin git@github.com:test/thinkphp.git
当然，还有一种方法哦，那就是
$ git config -e直接编辑其中origin的url就行了，退出时记得保存

[core]
        reposito]]></description><category></category></item><item><title><![CDATA[个性化你的git log]]></title><link>https://blog.youkuaiyun.com/xhl_will/article/details/8442197</link><guid>https://blog.youkuaiyun.com/xhl_will/article/details/8442197</guid><author>xhl_will</author><pubDate>Thu, 27 Dec 2012 10:28:55 +0800</pubDate><description><![CDATA[git log命令可一接受一个--pretty选项，来确定输出的格式.
如果我们只想输出hash

$ git log --pretty=format:"%h"


git用各种placeholder来决定各种显示内容：

下面内容来自这里



%H: commit hash


%h: 缩短的commit hash


%T: tree hash]]></description><category></category></item></channel></rss>