最近经常有面试,免不了做些临时抱佛脚的事情。此博客正适合这个用途:

Java Revisited

不知有多久了,联系页面上的Captcha验证加载不了,说是找不到一个js文件:

http://api.recaptcha.net/js/recaptcha_ajax.js

 万能的stackoverflow上面找到解决办法,需要在/plugins/captcha/recaptcha/recaptcha.php中把下面一行:

const RECAPTCHA_API_SERVER = "http://api.recaptcha.net";

 替换为

const RECAPTCHA_API_SERVER = "http://api.recaptcha.net/recaptcha/api";

问题的原因是google悄悄改了captcha的api路径,不知最新版的joomla更新了没有

 

2011年买的顶配thinkpad x220(i7-2620m,8g,128g ssd)用了差不多三年的时间,前不久突然挂了。症状是点不亮,插电也不给电池充电。当年零零碎碎花了差不多2000欧,不可能就此扔掉,而且在当前这种运算力过剩的年代,这台三年前的顶配机器哪怕是给我做开发也完全够了,换新根本就是浪费,所以要修,但是。。。

因为身处法国这样的“发达”国家,修好这么一台笔记本就成为几乎不可能的事情:拿到店里,很多店家直接说机器留下,拆机费几十欧元,也就是不管拆开后能不能修,这几十欧是先扔给人家了。各种不爽,找到一家熟人的店,人拍胸脯说是主板坏了,能修,于是我满怀希望的留下机器开始等我的本子原地满血复活。。。结果一周后一个电话过来,说某配件坏了,问是什么件死活不说,而且找不到备件更换,修不了了,让我去把机器拿回来。好在是熟人,拆机费就不收了

ipv6是个听上去很牛,实际上却没啥用的玩意,每次装完系统都要把它禁掉。Ubuntu下面禁用ipv6很简单,在/etc/sysctl.conf里加上几行:

#Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

启用新的配置:

sudo sysctl -p

Apparently, it's not installed by default with jdk. In fact, there is a link to the zip but the file itself isn't downloaded. So, simple solution:

sudo apt-get install openjdk-6-source

 

I wrote a utility script to do some automatic moving and copying stuff, put it in a directory, exported the dir in $PATH with bashrc and it worked well with my normal user. But when I tried to sudo the script, it couldn't be found. Copy bashrc for root didn't work better. Finally google helped me out: it's the secure_path stuff on my way.

In fact, when we sudo a command, the system makes a env_reset first. So all our settings in bashrc are lost, including customized $PATH. So the solution is to modify /etc/sudoers, either we completely disable the secure_path reset:

第8页 共10页