MediaWiki实现短Url

记录一下我安装MediaWiki后所作的几点修改:

我的wiki安装在/wiki下, 通过绑定子域名wiki来访问wiki.iworm.net

安装过程没什么说的, 装好之后, 发现所有的url都是wiki.iworm.net/index.php?title=条目名称
为了能实现输入wiki.iworm.net/条目名称 就能访问到某个条目的目的, 必须要修改.htaccess, 这里的内容都是网上找来的

.htaccess, 内容为
RewriteEngine on
AddCharset utf-8 .utf8

RewriteCond %{REQUEST_URI} !index.php
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d [OR]
RewriteCond %{REQUEST_FILENAME} -l
RewriteRule ^(.+) $1 [L]

# redirect to main page
RewriteRule ^/*$ /index.php?title=首页 [L,QSA]

# anything else is to be treated as a title
RewriteCond %{REQUEST_URI} !index.php
RewriteRule ^(.+)$ /index.php?title=$1 [L,QSA]

修改好之后会发现输入wiki.iworm.net/条目名称可以访问了, 但是点击随机页面的时候还是以wiki.iworm.net/index.php?title=条目名称这种形式的url, 因为我们刚才只是做了一些规则的映射, mediawiki自己还不知道你期望的url规则是什么, 必须要配置LocalSettings.php才行.
打开LocalSettings.php, 修改$wgArticlePath = “/$1″; 如果没有这个属性, 就加上, 如果有, 就修改成这样的.
保存之后wiki关于url的地方就都改成短url了

Share
Posted in 互联网 | Tagged | Leave a comment

在BlueHost上安装Subversion

一开始是按照Bluehost论坛上的方法来安装, 但是发现无法支持http, https协议, 又按照半瓶墨水的方法来安装, 这次支持http协议了, 但是依然不支持https.

后来google了一下, 经过多次摸索, 终于安装成功, 下面分享经验.
cd ~
mkdir install
mkdir src
cd src
#下载
wget http://subversion.tigris.org/downloads/subversion-1.6.4.tar.gz
wget http://subversion.tigris.org/downloads/subversion-deps-1.6.4.tar.gz
wget http://www.openssl.org/source/openssl-0.9.8k.tar.gz
tar xzvf openssl-0.9.8k.tar.gz
tar xzvf subversion-deps-1.6.4.tar.gz
mv subversion-1.6.4 deps
tar xzvf subversion-1.6.4.tar.gz

#编译OpenSSL
cd openssl-0.9.8k
./config –prefix=$HOME/install/openssl
make
make install
cd ..
cd deps

#编译apr
cd apr
./configure –prefix=$HOME/install/apr LDFLAGS=”-L/lib64″
make
make install
cd ..

#编译apr-util
cd apr-util
./configure –prefix=$HOME/install/apr-util –with-apr=$HOME/install/apr LDFLAGS=”-L/lib64″
make
make install
cd ..

#编译serf
cd serf
./configure –prefix=$HOME/install/serf –with-apr=$HOME/install/apr –with-apr-util=$HOME/install/apr-util –with-openssl=$HOME/install/openssl LDFLAGS=”-L/lib64″
make
make install
cd ..

#编译zlib
cd zlib
./configure –prefix=$HOME/install/zlib
make
make install
cd ..

#编译neon, subversion是否支持https就看这个组件编译的时候是否支持ssl了, 编译完成后, 你会看到一个summary, 上面明确显示支持ssl就对了
cd neon
./configure –prefix=$HOME/install/neon –enable-shared –enable-ssl –with-ssl –with-libs=$HOME/install/openssl LDFLAGS=”-L/lib64″
make
make install
cd ..
cd..

#编译subversion
cd subversion-1.6.4
cp -R ~/src/deps/sqlite-amalgamation ./
./configure –prefix=$HOME/install/subversion –without-berkeley-db –with-zlib=$HOME/install/zlib –with-apr=$HOME/install/apr –with-apr-util=$HOME/install/apr-util –with-serf=$HOME/install/serf –with-neon=$HOME/install/neon –with-ssl LDFLAGS=”-L/lib64″
make
make install

把svn添加到环境变量中, 会方便使用
cd ~
vi .bashrc
在文件最后增加PATH=$PATH:$HOME/install/subversion/bin存盘退出

参考:
在Bluehost 64位主机上安装SVN
Setting up Subversion on Bluehost
Linux/Ubuntu 下编译安装 Subversion-1.4.0 (svn) 全攻略!
subversion-1.5.0 编译参数
Installing the Subversion Client with SSL Support on Linux

Share
Posted in 操作系统, 编程 | Tagged , , , , | 7 Comments

说说开心网

开心网流量最近火速上升

社交网站不可能只有找朋友, 添加好友, 捏你一下, 踢你一脚, 其他什么功能都没有, 要有灵魂, 开心网的灵魂是游戏, Facebook的灵魂是N多Application

很多开心网用户已经感觉到了厌倦

是时候开始新的创作了, 否则他的流量图只能是一座山

开心网从游戏开始, 不如就围绕游戏发展

添加一个各个游戏之间的货币兑换功能或许是一个好的开始

Share
Posted in 互联网 | Tagged , , | 3 Comments

第一个Blog

这是我最开始确立写网络日记的时候,页面代码的截图,可以很明显看到,我建立这个网站的其中一个原因就是写日记。

从下往上看,第一条是2003年2月18日

Share
Posted in 互联网, 回忆 | Tagged | 5 Comments

今天参加了WordCamp Shanghai 2008

第一次参加Blogger的活动,觉得很激动,也很兴奋。早上10点起床,打开丁丁查地图,磨蹭一下,10点40出发。为什么去这么早呢?因为我知道我选的路线需要换乘一部公交车,所以时间把握不准,就早点去啦。

换乘910后,车走的是四平路,看着这条路会让我想起很多初到上海时的事情,因为我供职的第一家公司就是位于杨浦区中原路的网腾公司。想想这4年来,自己由刚毕业到现在,真是感慨万千。

下了车,看着路标走到了复旦大学新闻学院,很顺利就找到了会场。但还有很多人打电话给志愿者,问会场位置。我觉得主办方应该在学院门口贴海报,这样才能让其他人更顺利的找到。

签到后,领到了一件纪念T-Shirt。看来我来的还算早,会场里没几个人,Matt也还没到。过了一会儿,我跟坐我后面的人聊了起来,他竟然是我老乡,哈哈。此时看到了白鸦,坐在角落里,戴着五角星的帽子。Matt来了之后,我去找他拍照,他的笔记本表面贴了好多标志啊,难道又是一个让大家赞助买的笔记本?

会议开始了,首先是Matt讲Wordpress的过去现在和将来,展示了2.7版本,没什么太出彩的地方。接着是吴海林讲美国文化和开源软件。接着是白鸦作为主持人和台下互动。这个挺有意思的,他说5句话,来概括一个Blog,让大家猜这是谁的Blog。其中我猜对了“他的名字是白色的,一只奇怪的鸟”--白鸦的Blog,“他的眼睛变成了蓝色,曾经让很多人担心”--Webleon,但是规则限制,只拿到了一个奖品,哈哈。被猜的Blog中还有我最喜爱的煎蛋,带三个表的王晓峰,爱早报等。大家都没猜出来的是“他的名字是黑色的,背景是白色的,Logo是彩色的,不能回复的Blog”--谷歌黑板报。

今天很高兴认识了几个新朋友,大家常来看看啊。

照片限于网速,要传一夜了,等到明天白天有时间我把上传好的照片链到Blog上。

Update: 网络不好, 可能要今天晚上传了

我的Brunch, 竟然从10点半支持我到6点

我们的摄影师

我们的Matt

Matt的笔记本很花哨哦

见到了传说中的白鸦

更多照片, 请见我的Smugmug相册

Share
Posted in 互联网 | Tagged , , , | 5 Comments

我的Ubuntu增加了新源

《再谈 Ubuntu 8.04 Hardy LTS 软件源设置》上看到了一些常用源的列表,加上去之后,更新速度明显快了很多,今天晚上更新是全速,而以前更新都是20K左右,并且原来没找到更新的软件现在也有更新了。

我是上海电信用户,根据上述文章,选择了一些源之后,把无法访问的去掉,剩下的就是我目前在使用的源。

# deb cdrom:[Ubuntu 8.04 _Hardy Heron_ - Release i386 (20080423)]/ hardy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

deb http://cn.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates main restricted
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## universe WILL NOT receive any review or updates from the Ubuntu security
## team.
deb http://cn.archive.ubuntu.com/ubuntu/ hardy universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy universe
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://cn.archive.ubuntu.com/ubuntu/ hardy multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ hardy-updates multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-updates multiverse

## Uncomment the following two lines to add software from the ‘backports’
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://cn.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse
# deb-src http://cn.archive.ubuntu.com/ubuntu/ hardy-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical’s
## ‘partner’ repository. This software is not part of Ubuntu, but is
## offered by Canonical and the respective vendors as a service to Ubuntu
## users.
deb http://archive.canonical.com/ubuntu hardy partner
# deb-src http://archive.canonical.com/ubuntu hardy partner

deb http://security.ubuntu.com/ubuntu hardy-security main restricted
deb-src http://security.ubuntu.com/ubuntu hardy-security main restricted
deb http://security.ubuntu.com/ubuntu hardy-security universe
deb-src http://security.ubuntu.com/ubuntu hardy-security universe
deb http://security.ubuntu.com/ubuntu hardy-security multiverse
deb-src http://security.ubuntu.com/ubuntu hardy-security multiverse
# deb http://us.archive.ubuntu.com/ubuntu edgy universe
deb http://ppa.launchpad.net/banshee-team/ubuntu intrepid main
deb-src http://ppa.launchpad.net/banshee-team/ubuntu intrepid main
deb http://ppa.launchpad.net/do-core/ubuntu hardy main
deb-src http://ppa.launchpad.net/do-core/ubuntu hardy main

###########################################
##New Added List
###########################################
deb http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-security main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-updates main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-proposed main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.cn99.com/ubuntu/ hardy-backports main restricted universe multiverse

deb http://ubuntu.cn99.com/ubuntu-cn hardy main restricted universe multiverse

deb http://us.archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy restricted main universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy universe
deb http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://us.archive.ubuntu.com/ubuntu/ hardy-updates universe

deb http://archive.ubuntu.com/ubuntu/ hardy main restricted
deb-src http://archive.ubuntu.com/ubuntu/ hardy restricted main universe
deb http://archive.ubuntu.com/ubuntu/ hardy universe
deb http://archive.ubuntu.com/ubuntu/ hardy-updates universe
deb-src http://archive.ubuntu.com/ubuntu/ hardy-updates universe #Added by software-properties

deb-src http://security.ubuntu.com/ubuntu hardy-security restricted main universe

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-updates main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-backports main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-security main restricted universe multiverse

deb http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main multiverse restricted universe
deb-src http://ubuntu.csie.ntu.edu.tw/ubuntu/ hardy-proposed main restricted universe multiverse

Share
Posted in 操作系统 | Tagged , | Leave a comment

WordCamp China 2008报名开始了

其实一直都在关心类似的Blog活动,只是因为各种原因没能参加。

今年终于有机会了,不会放过的。

WordCamp China 2008官方网站

论坛

Share
Posted in 互联网 | Tagged | 2 Comments

青浦淀山湖之行

周六朋友公司组织了一次网友活动, 组织去青浦淀山湖玩水上运动, 票价只要45元/人, 包括皮划艇, 帆船, 龙舟.

Share
Posted in 娱乐 | Tagged | 4 Comments

买房了

买房是我一生中的除了结婚之外的第二件大事.

上一篇说到我们已经付了意向金, 周日房东就在中介协议上签字, 确认把房子卖给我们. 同时, 我们除了自己存了一点点钱, 剩下的首付都是借的, 感谢W,Y,S,L,T,L,L,G同学给予的大力支持.

因为付定金时比较仓促, 对中介, 房东, 小区等没有充分调查, 所以我周一, 周二请两天假. 周一早上把分散在各张银行卡里的钱都汇聚到一张卡上, 然后去税务局打印税单. 中午到中介后, 查看了房东身份证, 把房东姓名 + 空格 + 身份证号编辑成短信, 发送到10665110, 几秒钟后, 收到一条短信, 说姓名和身份证符合, 然后可以登录www.id5.cn查看身份证照片. 当我看到照片时, 发现照片上的人和身份证复印件上的人看起来是一个人, 但是穿的衣服不一样. 我为了查清楚房东身份, 就去了趟附近的派出所, 户籍室的民警告诉我姓名, 身份证号码, 照片没错, 之所以两张照片不一样是因为那是两代身份证上的照片. 恩, 放心了. 我又到小区里, 向保安, 小区里的行人, 物业等人询问小区的安全, 生活方便程度等问题, 得到都是肯定的回答. 之后又去了工商局, 查了一下中介, 确定这是一个合法的公司.

周日中介带我们到交易中心做了一次产权调查, 没问题. 但是我怕最近两天有变, 所以周二上午我又到了交易中心, 再次进行了产权调查, 仍然一切正常. 上海的二手房购房合同内容都是固定的, 只有少数几个选项可以选择, 头一天晚上我就仔细阅读了合同, 并且根据合同说明拟定了补充条款. 周二下午到了中介, 他们拿出打好的样张给我看, 我就让他多补充了两条到补充条款中. 房东到了, 我们就在中介的陪同下去银行给房东转账. 转账完毕, 房东写了首付款收条给我, 然后回到中介签合同. 合同签好, 律师和贷款公司的业务员都来了. 律师先询问卖方, 她的家人是否同意卖房, 合同上的签字是否是她本人签的等等. 之后, 我, 老婆, 房东, 律师, 4个人拍了合照. 房东就可以先离开了. 我们就开始不停的签字, 大概签了10份文件, 包括几份贷款合同. 律师把我们的所有证件和他的律师证放在一起拍照, 之后就算办理完了手续. 等银行把贷款合同批下来, 我们就能办理房屋的过户手续了.

银行办事效率还挺高, 3天, 贷款就批了. 周三, 我们都到了交易中心, 手续都是中介负责去办, 我只负责交钱, 缴了印花税, 契税, 还有其他的各种费用之后, 就算办理完了过户手续, 20天之后就可以拿到新产证了.

买房需要的各种资料

  1. 身份证, 房产证上想写谁名字, 就需要谁的身份证
  2. 户口本, 同身份证
  3. 结婚证
  4. 公司开的收入证明, 如果能去税务局打印税单就更好了
  5. 学历证明
  6. 公积金帐号
  7. 首付款收据
  8. 买卖合同
  9. 还款的银行卡和存折, 没有存折可以不提供

如果房子是夫妻合买的, 需要提供两个人的证件. 贷款合同上会有选项, 说贷款是一个人贷款, 还是家庭贷款, 无论选哪种, 要保证还款人的收入证明上的税后收入总额是月供的2倍以上.

买房需要缴纳的各种费用

  1. 契税, 我只记得是外环以外的房子, 单价超过7000, 就要缴成交价的3%, 如果单价小于7000, 就是成交价的1.5%
  2. 交易手续费, 建筑面积 * 2.5元/平方
  3. 合同印花税, 成交价 * 0.05%
  4. 登记费, 住宅80, 非住宅300, 售后公房50
  5. 配图费, 25
  6. 权证印花税, 5
  7. 他项权利登记费, 商业贷款或组合贷款200, 纯公积金贷款100
  8. 评估费, 成交价小于100万的, 费用为500, 大于100万的, 成交价 * 0.1%, 这项费用是交给评估公司的
  9. 保险费, 用于贷款人发生意外, 或住房在火灾, 海啸等灾害中损毁, 就不需要付剩下的银行贷款了, 仅限于商业贷款. 公积金贷款的免责条款中已经包含了上述内容.
  10. 买卖合同公证费, 听说是外籍人士才需要进行合同公证
  11. 贷款合同公证费, 贷款额 * 0.03%, 外地人购房公证费200, 这个费用中介说也不用交的
  12. 纯公积金贷款服务费, 300, 商业贷款或组合贷款500
  13. 中介费, 成交价 * 1%

需要注意的是, 银行贷款额只能是5000的整数倍.

尾款

还有一点就是尾款, 为了保证房东不会发生水电煤, 物业费等欠费, 所以需要扣房东5000-10000的尾款, 待交房当日查验过房子的各种费用都没有拖欠后, 付给房东. 比如, 房屋总价是100万, 首付20万, 贷款79万, 这样就差了房东1万. 待交房当日, 查清费用拖欠后, 把这1万付给房东. 这样房东就收到了100万. 如果房子发生了费用拖欠, 就需要在这1万中扣除, 余额付给房东.

需要查验的东西

  1. 房东身份证, 一定要查清身份证上的姓名, 身份证号, 照片是不是真的, 具体可以到www.id5.cn或派出所去查
  2. 房屋产权, 最好是签合同当天去交易中心再次调查一下, 一共10项, 每项5元, 如果10项都查, 就是30元
  3. 中介营业执照, 去工商局的档案室查, 费用40元
  4. 房子中是否有户口, 如果有的话, 需要在合同上明确标出什么时候迁出
  5. 房子的水电煤, 物业费缴费情况
Share
Posted in 生活 | Tagged | Leave a comment

看房记7:荣顺苑

上周看完春晖新村的房子,觉得那里交通不方便,后来想想,还不如买到绿地的,那里起码还占个交通方便。而且总价低,首付少,有多少钱办多少事。

老婆在篱笆上发帖,把我们看房的经过写了下来,后来有人回复说他刚买了荣顺苑的房子,5楼,他买的时候2楼还有一套没卖出去。有了这个线索,我们到搜房网上查了下荣顺苑,这个小区在地铁站旁边,大概10分钟的样子,里面有幼儿园,周围菜场,小学,医院,银行等。看起来不错,我们就决定周六去那边看看。

到了中介,他带我们去看房。一进小区,我和老婆就感觉这里环境不错,到了房子里,我们强压制住内心的激动。哇,这房子太棒了,超大的客厅,没人住过的二手房,唯一缺点就是两个卧室稍微小了点。按照中介说的,把厨房和小阳台的墙打掉,能使厨房更大,而且他说这个小区里几乎所有人家都是打通厨房和小阳台的。我们在屋子里就避开中介,小声说,太棒了,我们就买这里吧,不过对着中介还是说我们再考虑以下。出了屋子,中介带我们在小区里转了一下,介绍了幼儿园,小游乐场,老年活动中心,越说我们越高兴。回到中介,他给我们仔细算了一下买房的总花费。这个房子是03年底竣工的商品房,其中有几栋楼被拆迁办买去了,作为一些居民的动迁房,但是房东没搬进来,也没出租过。总价是87w,再加上3w多的税费中介费,差不多要90多w。但是这个小区的位置好,生活,交通都很方便。实在是个不可多得的好地方。不过对于90多w的支出,我们还是需要考虑一下的。

告别中介后,我们又到了绿地新干线和北桥春天看房子, 到了小区, 我就跟老婆说, 这两个小区明显和荣顺苑不是一个档次的, 北桥春天的房价跟荣顺苑差不多, 那不如买荣顺苑了. 这时我们就决定去定荣顺苑的房子, 我给家里打了个电话, 看看能不能帮我们凑点钱付首付. 之前我们已经跟朋友打过招呼, 说可能会向他们借钱. 此时已经没心思看房子了, 脑子里都是荣顺苑.

在回家的路上, 我就在打电话筹钱了. 下了车, 我们到肯德基坐下吃点东西, 正吃着, 中介打电话过来说, 有个人看中了荣顺苑的房子, 他们准备付定金, 问我们到底要不要. 我说等等回复他. 跟老婆和家人商量了一下, 确定我们是真的喜欢那个房子, 就告诉中介, 我们要了. 等等去中介付定金.

付定金之前, 我们叫上两个朋友, 和中介一起再次去看房, 在确定房子质量没什么问题后, 我们付了1w的意向金. 然后等房东收到这个钱之后, 这个钱就算是定金了, 此时双方如果反悔, 就需要赔偿对方了.

我们约定周二, 也就是8月5日签合同.

赶紧去筹钱啊, 东借西借, 加上自己存的一点, 终于凑够了首付.

地图

小区

厨房

厨房阳台向外看

客厅

客厅

小卧室

大卧室

洗手间

小区

小区

小区

更多荣顺苑照片, 请访问我的Smugmug相册.

Share
Posted in 生活 | Tagged | 12 Comments