海运的博客

Firefox下JS修改about:config配置代理服务器

发布时间:July 28, 2014 // 分类:Firefox // No Comments

var prefs = Components.classes["@mozilla.org/preferences-service;1"]
                    .getService(Components.interfaces.nsIPrefService);
prefs = prefs.getBranch("network.proxy.");
prefs.setIntPref("type", '1'); 
prefs.setIntPref("http_port", '3128'); 
prefs.setCharPref('http', '192.168.1.1')
prefs.setBoolPref('socks_remote_dns', 'true')
//socks将http修改为socks

更多参数:https://developer.mozilla.org/en-US/Add-ons/Code_snippets/Preferences#nsISupportsString

Linux下资源容器

发布时间:July 24, 2014 // 分类:Linux服务 // No Comments

Python处理同义词

发布时间:July 23, 2014 // 分类:Python // No Comments

下载WordNet词库:

wget http://wordnetcode.princeton.edu/3.0/WNprolog-3.0.tar.gz

安装Python模块Whoosh解析词库:

yum -y install python-pip
pip install whoosh

直接加载词库文件并解析:

from whoosh.lang.wordnet import Thesaurus
t = Thesaurus.from_filename("wn_s.pl")
print t.synonyms("hail")

使用索引,生成索引:

from whoosh.filedb.filestore import FileStorage
t = Thesaurus.from_filename("wn_s.pl")
fs = FileStorage("index")
t.to_storage(fs)

通过索引解析:

from whoosh.filedb.filestore import FileStorage
from whoosh.lang.wordnet import Thesaurus
fs = FileStorage("index")
t = Thesaurus.from_storage(fs)
print t.synonyms("hail")

记将域名从Godaddy转到Maddogdomains

发布时间:July 23, 2014 // 分类: // No Comments

1.Godaddy处解锁域名
2.Godaddy处Email Authorization code
3.Maddogdomains处申请转移相应域名并付款
4.Maddogdomains发送邮件附Transaction ID和Security Code
5.登录Maddogdomains账户Pending Transfers添加Transaction ID和Security Code及Godaddy的Authorization code
6.收到Godaddy的域名转移提醒邮件,无操作
7.登录Godaddy Pending Transfers Out立即同意转出
8.此时Godaddy帐户已无转出的域名,Maddogdomains刷新即可看到转入的域名,整个过程历时10分钟。

分类
最新文章
最近回复
  • 海运: 恩山有很多。
  • swsend: 大佬可以分享一下固件吗,谢谢。
  • Jimmy: 方法一 nghtp3步骤需要改成如下才能编译成功: git clone https://git...
  • 海运: 地址格式和udpxy一样,udpxy和msd_lite能用这个就能用。
  • 1: 怎么用 编译后的程序在家里路由器内任意一台设备上运行就可以吗?比如笔记本电脑 m参数是笔记本的...
  • 孤狼: ups_status_set: seems that UPS [BK650M2-CH] is ...
  • 孤狼: 擦。。。。apcupsd会失联 nut在冲到到100的时候会ONBATT进入关机状态,我想想办...
  • 海运: 网络,找到相应的url编辑重发请求,firefox有此功能,其它未知。
  • knetxp: 用浏览器F12网络拦截或监听后编辑重发请求,修改url中的set为set_super,将POS...
  • Albert: 啊啊啊啊啊啊啊啊啊 我太激动了,终于好了英文区搜索了半天,翻遍了 pve 论坛没找到好方法,博...