使用*nix给你的Kindle推送卫报
正好在读卫报,写个给 Kindle 推送的小脚本,适用于所有带cPanel的空间,使用Cron jobs来自动定时推送,或者你自己的电脑、VPS之类的都行。
脚本如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | #!/bin/sh #this part will generate the file name, such as: gdn-2012-03-05.mobi prefix='gdn-'; date=`date '+%Y-%m-%d'`; file=$prefix$date.mobi; #here is the push addres of your kindle. for multiple push please separate with , emailto='这里填写你的kindle推送地址'; #subject of the email that goes out emailsubject='Kindle Push for '; #body of the email can be defined here emailbody='Reach the attachemnt for push of the day. '; wget -q http://mythic-beasts.com/~mark/random/guardian-for-kindle/$file echo $emailbody | mutt -s "$emailsubject$date" -a $file "$emailto"; rm $file |
换个窗户看世界
接下来更精彩~
Read more »
你还有在用 Treo 吗?







话说这么多经典里面你用过多少呢?
一条命令,将OSX的UI中文字体改为冬青体
首先,为什么要换字体呢?先上一张流传已久的图看一看:
OSX 默认的 STHeitiSC/TC 确实不太靠谱,在系统自带的字体中,Hiragino Sans GB(亦称冬青体)是效果最好的中文替代字体。在终端中使用以下命令即可替换默认字体为冬青体:
1 | sudo sed -ie 's/STHeitiTC-Light/Hiragino Sans GB/g;s/STHeitiSC-Light/Hiragino Sans GB/g' /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist |
然后打开磁盘工具修复磁盘权限后重启系统即可发现改变。如果需要恢复原始配置,请执行:
1 2 | sudo rm /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist sudo mv /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.pliste /System/Library/Frameworks/ApplicationServices.framework/Frameworks/CoreText.framework/Resources/DefaultFontFallbacks.plist |
然后修复权限并重启系统即可。(曾出现个例无法自动备份文件到 *.pliste,请自行承担风险)
(Original post by me is HERE)
重置 Mac OS X Lion 的账户密码
以前系统安装盘启动后能找到一个密码还原的程序,用于忘记密码的情况。由于 Lion 内置 Recovery HD,所以这个方法看似不太灵光了(菜单里已经没有这一项了)。
没关系,只要启动到 Recovery HD,启动终端,输入:
resetpassword |
看到什么了?
那个……不要恶作剧哦~
为了防止杯具和餐具发生,请设定使用固件密码工具设定启动密码。