昨天学校的英语机房重新开放了,传说电脑全部都换成了新的,今天特地来体验一下。为了让我们好好学习,英语机房是不能上外网的。不过对我来说,只要能访问内网就足够了。
内网 + PuTTY + SSH + Tunnel = 外网
但是PuTTY的SSH Tunnel设置我经常忘记,老得Google。现在记录下来,备查。
(更多…)昨天学校的英语机房重新开放了,传说电脑全部都换成了新的,今天特地来体验一下。为了让我们好好学习,英语机房是不能上外网的。不过对我来说,只要能访问内网就足够了。
内网 + PuTTY + SSH + Tunnel = 外网
但是PuTTY的SSH Tunnel设置我经常忘记,老得Google。现在记录下来,备查。
(更多…)对WordPress知之甚少,见笑了。
根据当前访问者是否登录返回布尔值true或false。
该函数不接受任何参数。
<?php if ( is_user_logged_in() ) { ... } ?>
根据当前访问者的登录情况,使用is_user_logged_in()函数在主题文件中展示不同输出结果。
<?php if ( is_user_logged_in() ) { echo 'Welcome, registered user!'; } else { echo 'Welcome, visitor!'; } ?>
今天用EditPlus的时候点了一下Check Last Version菜单,发现已经有3.21版本了,而我的还是3.20。看了一下官网的RSS,发现3.21是2010年12月17日正式发布的,已经一个多月了,看来以后得订阅一下。
当然,软件并不总是越新的版本越好,不能盲目的升级。于是浏览了一下what’s new页面,看看新增了什么功能:
<feature>
* ‘Use TR1 regular expression’ option (‘Preferences’->’General’).
* Customizable toolbar icon for User Tools.
* ‘User tool group’ option in the Setting & syntax dialog box.
* Supports floating window for Output Window and Cliptext/Directory Window.
* Allows dropping files on the Directory Window.
* ‘Add to Project’ command in the Directory Window.
* ‘Copy’/’Move’ button on the FTP Settings dialog box.
* Allows negative value in the line space option.
* Hides horizontal scrollbar in word wrap mode.
* Allows saving read-only files.
看到第一个新功能我眼前一亮,TR1正则表达式?这是什么东东?赶紧更新到EditPlus 3.21,打开帮助文档一看:
(更多…)很久以前就听说μTorrent已经推出Linux版本了,但是一直都没有使用过。今天Ihipop说把晨光的种子放到μtorrent server版下载,只要文件有中文文件名,就乱码。于是我就花时间测试了一下,目前最新版本是µTorrent Server alpha (3.0 build 24118),Linux环境是Ubuntu Server 9.10。
下载解压运行:
wget http://download.utorrent.com/linux/utorrent-server-3.0-24118.tar.gz
tar zxvf utorrent-server-3.0-24118.tar.gz
cd utorrent-server-v3_0/
./utserver –daemon
打开浏览器,输入http://localhost:8080/gui/,会提示需要身份验证,用户名是admin,密码为空,就可以进入Web UI进行控制了。
(更多…)