Tag Archives: 博客

清理WordPress冗余数据库

在我休假的这段时间,WordPress两次关停,从阿里云的邮件件,可能的原因有二:

  1. 数据库体积过大;
  2. 网络负载高过;

控制台显示,数据库达到48M,对于如此小的一个站点,确实大了,可是WordPress自2.6开始,一直自动备份每一个修改版,如果不借助第三方的工具,可能无法清理这些数据。

至于网络负载,从百度统计的数据看,10月3日九点打开服务到十一点第二次关停,正常的用户访问只有4个PV,而网络日志显示有2487条记录,来自阿里云的IP却异常之多,其它则为谷歌、百度的爬虫。一个邪恶的猜测:

Continue Reading

MediaWiki HTML 插入外链图片

我的MediaWiki搭建在万网虚拟主机之上,受到很多限制,不能通过经典的GeSHi+Pygmentize实现语法高亮,最后曲线救国,找到了基于Alex Gorbatchev SyntaxHighlighter 的插件,不再依赖Python,终于像个Programming Wiki的样子。

语法高亮解决了,另一个隐痛就是图片问题1,一则MediaWiki配置上传很不容易,建站伊始,即尝试过,告败;二则,虚拟主机的空间有限,本身也存不了多少图片。一度使用Confluence的公开空间保存图片,但也不太方便。后来在同事的启发下,申请了七牛云的免费存储空间,只要保持10元余额,即可享用自定义域名的10G空间,用户体验还不错,主要用于WordPress图床服务。但回过头来又想攻克MediaWiki的图片,终于在昨天深夜,找到HTMLTags,安装成功之后,简单配置如下:

Continue Reading

续费服务器

产品名称:虚拟主机xxxx版

成功日:2016-05-30

到期日:2021-03-16

费用:864元 / 36个月

第二次收到邮件:

Continue Reading

Add footnotes to WordPress

Easy Footnotes is a WordPress plugin for easily adding footnotes to your WordPress posts. Fitting name, eh?

Easy Footnotes is simple to use. Activate the plugin and then start adding footnotes to your WordPress posts using the shortcode [note]Footnote content[/note].

Easy Footnotes will automatically count up your footnotes (feetnotes) and inserts a number where the footnote shortcode is placed as well as appending an ordered list of all your notes to the bottom of your post. Then users have two easy ways to view your notes. They can simply hover over the label and your footnote will be displayed in an easy to read tooltip using the jQuery qTip2 plugin. When clicking on the label the user will be scrolled down the page to the corresponding tooltip at the bottom of the post. They can then easily navigate back to where they were by clicking the return to top icon at the end of each tooltip.

Continue Reading

Two WordPress hotkey plugins

Note: Before focusing on WordPress, most of my daily writings were posted in Confluence. I love the hot keys of Confluence, which are really time and energy saver. About a year ago, I wrote some simple client code to mirror the Confluence’s actions. But it was too simple, almost ugly. Worse, it cannot run properly on Windows. When I copy some texts, the program will also activate the new post page.

These two WordPress plugins may help me to improve my code.

Continue Reading

2016年03月08日 14:34

The Elegant Icon Font – 360 Of The Best Free Icons For The Modern Web.

Romangie 主题使用的分类图标,就是 ElegantIcons,从 style.css 中可以查到。上午试图猜测 data-icon 的属性,修改 Status 的图标,几乎用了一个小时,无果。

中午理性思考,发现源头,参考官方的文档,成功解决问题。同时也修改了 Standard 的图标,并找到漏网之鱼:搜索结果页。

一个图标能抵很多文字,插件开发或者应用开发,除 bootstrap 集成的icon之外,还可以直接用第三方的,比如大名鼎鼎的Font Awesome,还有这个轻量级的 Elegant Icon Font。它们其实都是字体,我们可以自己调色,以和应用的主色协调。

© 2006-2017. Powered by WordPress Romangie & Bootstrap. ICP No. 15008795