Felix Yan | 2010-07-16 | 318 views
恩,作为笔记系列的文章,内容会比较混乱.
这段时间以来,作为Ubuntu双十版的小白鼠,虽然挂彩数次,不过也在 @yegle @tjmao @poplarch @BOYPT @liangsuilong @jimmy_xu_wrk 等等推友的帮助下搞定重生.
以下是这段时间来发现的好东西:
1, @tualatrix 大大的notify脚本(Felix降碳版)
#!/bin/bash
# Copyright: TualatriX GPL v3
# Website: http://imtx.cn/archives/1516.html
# Please add the following line to ~/.bashrc to enable the bash completion support
# complete -o filenames -F _root_command notify
$* && \
notify-send "\"$*\" finished successfully" || \
notify-send "\"$*\" failed"
并在 ~/.bashrc 里加入:
complete -o filenames -F _root_command notify
以适应bash的自动完成功能. 原文在此
这玩意着实好用, 不过本猫发现10.04及以上版本会出现找不到notify-send命令,这时只需要
# apt-get install libnotify-bin
就好.
Read the rest of this entry »
Felix Yan | 2010-02-06 | 441 views
dabr默认没有140字自动截断功能,有时候长推发不出去犹然不知,这里Felix给出一个简单的方法为dabr添加140字自动截断功能(未处理网址等特殊结构):
打开 /common/twitter.php 文件,找到
function twitter_update() {
twitter_ensure_post_action();
$status = twitter_url_shorten(stripslashes(trim($_POST['status'])));
在其下添加:
if (function_exists('mb_substr')) {
if (mb_strlen($status,'utf-8') > 140)
$status = mb_substr($status, 0, 140, 'utf-8');
}
即可:)
若想添加省略号, Read the rest of this entry »
Felix Yan | 2010-01-23 | 717 views
众所周知,Dabr/奶瓶腿默认的图片上传服务Twitpic在很久以前就已经惨遭杯具,为了让广大手机推友能完善体验到Twitter衍生的强大的图片功能,Felix将现在流行的数种未被墙的图片上传服务(Twic.li/Mobypicture/imgur/Img.ly/TwitSnaps/Tweetphoto)加入了Dabr的代码中。
完成后的效果应该是这样:

下面就是我的修改啦!
在common/twitter.php里找到
'twitpic' => array(
'security' => true,
'callback' => 'twitter_twitpic_page',
),
替换成
'picture' => array(
'security' => true,
'callback' => 'twitter_picture_page',
),
(毕竟添加了很多种图片上传服务后,菜单也不能再叫twitpic了:-) ) Read the rest of this entry »