firefox 历史书签记录的相关介绍与设置

相关介绍
//书签和历史保存在places.sqlite中,places是FF3增加的管理历史和书签的系统,它可以实现相当复杂且灵活的历史查询,
//而且操作很方便,它可以保存favicon,还能对书签进行任意信息的描述,还提供了新的UI供用户管理,
//参考Places on the Mozilla wiki,
//Places存储在SQLite数据库文件中,接口是mozStorage,
//历史与会话的区别-江3,
//Firefox智能书签夹-江3,
//实时书签-RSS+Atom-江3,实时书签比书签更加复杂
//书签在线管理-江3,
//关于Places的全部官方docs,
//与Places.sqlite有关的扩展、软件:
//PlacesCleaner、Places Maintenance,
//Add Bookmark Here ²、删除重复书签BDC、修改书签图标BFC、书签自动排序ASB
//Speedyfox,可以压缩所有Sqlite数据库文件
//FavIcon Reloader,刷新places.sqlite中的书签图标

//书签
//扩展:Delete Bookmark Icons、 Places Maintenance、Vacuum Places Improved、SpeedyFox、
user_pref(“browser.bookmarks.max_backups”, 2);//最多自动备份?份书签,0即不自动备份
user_pref(“browser.places.smartBookmarksVersion”, 4);//关于智能书签夹? -1禁用;0 恢复;4 默认;
//user_pref(“browser.bookmarks.autoExportHTML”, false);//退出时自动备份书签到HTML文件?默认false,因FF3+已备份JSON至bookmarkbackups文件夹中,参考,Bug384370,
//历史

//user_pref(“places.history.enabled”,true);//记住我的浏览和下载历史?默认true;参考,为了隐私和减少places.sqlite 的碎片/体积,同时防御历史嗅探攻击,
//下面4个参数默认不存在:
//user_pref(“browser.history_expire_days”, 0);//历史记录?天(非负数) 参考,
//user_pref(“browser.history_expire_sites”, 0);//历史记录?个网站数(正整数) 参考,
//user_pref(“places.history.expiration.max_pages”, 0);//历史记录中保留最大独立URL数量(正整数) 参考,
//user_pref(“browser.history_expire_days_min”,0);//为了防止历史过早过期,历史记录最少保存?天(正整数)
user_pref(“browser.bookmarks.restore_default_bookmarks”, false);//安全模式时恢复默认书签?参考,
//在启动安全模式时,会显示对话框“重置火狐”,点击时就会改变该参数为true,并用默认的书签文件bookmarks.html替换现在的书签
//为了保护你现在的书签,这个参数应该始终为false,默认false;该参数属于临时性状态标记类参数

//图标
//这3个参数到底负责什么有点儿乱
//user_pref(“browser.chrome.site_icons”, true);//显示网站图标?当该值为false时,会覆盖参数 2, 3, and browser.chrome.image_icons.max_size,参考,
//user_pref(“browser.chrome.load_toolbar_icons”, 0);//显示书签菜单、书签栏上的图标?0 不显示;1 显示已经缓存的;2 始终显示;当该参数为0 时,优先级高于参数 1;参考,
//user_pref(“browser.chrome.favicons”, true);//显示地址栏、书签菜单、标签上的图标?前提参数 1 为true, 参考,参数优先级最高,当参数1为false时,就彻底禁用图标了

//书签可以按照多种标准排序,通过查看菜单或者点击列标题,下面的排序参数不光针对书签管理器,还包括侧边栏、书签栏
//下面一个是排序方式,一个是排序标准,你应该能区分吧
//user_pref(“browser.bookmarks.sort.direction”, “Natural”);//排序方式?参考,
//Natural 自然顺序A~Z; ascending 相反Z~A;
//user_pref(“browser.bookmarks.sort.resource”, “rdf:http://home.netscape.com/NC-rdf#Name”);//排序标准?参考,
//按名字,默认:rdf:http://home.netscape.com/NC-rdf#Name
//按URL:rdf:http://home.netscape.com/NC-rdf#URL
//按书签关键字:rdf:http://home.netscape.com/NC-rdf#ShortcutURL
//按描述:rdf:http://home.netscape.com/NC-rdf#Description
//按创建时间:rdf:http://home.netscape.com/NC-rdf#BookmarkAddDate
//按修改时间:rdf:http://home.netscape.com/WEB-rdf#LastModifiedDate
//按最后访问时间:rdf:http://home.netscape.com/WEB-rdf#LastVisitDate
*
//FF3.6之前版本有效的参数

//FF23进一步增强了书签的价值,修改了书签夹图标,让当前的状态更加醒目
//但该页已存在与places.sqlite 中星号变为黄色,点击星号添加书签,点击倒三角弹出下拉菜单

Advertisements

Using Google to DDoS any website

Google uses its FeedFetcher crawler to cache anything that is put inside =image(“link”) in the spreadsheet.
For instance:
If we put =image(“http://example.com/image.jpg”) in one of the cells of Google spreadsheet, Google will send the FeedFetcher crawler to grab the image and cache it to display.

However, one can append random request parameter to the filename and tell FeedFetcher to crawl the same file multiple times. Say, for instance a website hosts a 10 mb file.pdf then pasting a list in the spreadsheet will cause Google’s crawler to fetch the same file 1000 times.

=image(“http://targetname/file.pdf?r=0”)
=image(“http://targetname/file.pdf?r=1”)
=image(“http://targetname/file.pdf?r=2”)
=image(“http://targetname/file.pdf?r=3”)

=image(“http://targetname/file.pdf?r=1000”)

Appending random parameter, each link is treated as different thus Google crawls it multiple times causing a loss of outbound traffic for the website owner. So anyone using a browser and opening just a few tabs on his PC can send huge HTTP GET flood to a web server.

Here, the attacker does not need a huge bandwidth at all. Attacker requests Google to put the image link in the spreadsheet, Google fetches 10 MB data from Continue reading

Twister编译及安装

Twister编译及安装 [多节点方式]

注:该流程也适用单节点模式, 设置ip及工作节点的时候设置本节点即可.
1. Twister设置
1.1 设置Twister路径,编辑~/.bashrc [注: 最好是这个文件,本人也试过在.bash_profile, 但之后运行就出错了,不知道为什么!]

export TWISTER_HOME =/home/username/TWISTER

1.2 编辑Twster/bin/twister.properties

daemon_port=12500
pubsub_broker=ActiveMQ
data_dir=/home/lucktroy/twister-0.9/data
app_dir=/home/lucktroy/twister-0.9/apps
workers_per_daemon=8
nodes_file=/home/lucktroy/twister-0.9/bin/nodes
daemons_per_node=1

1.3 编辑Twsiter/bin/nodes, 添加工作节点

node02
node03

1.4 编辑Twister/bin/nb.properties [注:单节点模式]

#本人用的是node02做broker
broker_host = 10.10.10.2
broker_port = 3045
comm_type = niotcp

1.5 编辑Twister/bin/amq.properties [注:多节点模式]

uri=failover\:(tcp\://node03\:61616)

2. 下载ActiveMQ 5.4.2

把$ACTIVEMQ_HOME/activemq-all-X.X.X.jar 复制到 $TWISTER_HOME/lib/
3. 使用ant编译

[lucktroy@node01 twister-0.9]$ ant
Buildfile: build.xml

clean:
[delete] Deleting directory /home/lucktroy/twister-0.9/build

init:
[mkdir] Created dir: /home/lucktroy/twister-0.9/build

compile:
[javac] Compiling 107 source files to /home/lucktroy/twister-0.9/build

dist:
[mkdir] Created dir: /home/lucktroy/twister-0.9/dist/lib
[jar] Building jar: /home/lucktroy/twister-0.9/dist/lib/Twister-0.9.jar
[copy] Copying 1 file to /home/lucktroy/twister-0.9/lib

BUILD SUCCESSFUL
Total time: 4 seconds

4. 运行ActiveMQ, 这个时候终端一直会被该进程占用,因而下一步时需要再开启一个终端. [注: 高端用户可以用shell命令screen开启这个activemq,这样不必一直占用终端了!]

$ bin/activemq console
INFO: Using default configuration
(you can configure options in one of these file: /etc/default/activemq /home/jbz hang/.activemqrc)

INFO: Invoke the following command to create a configuration file
bin/activemq setup [ /etc/default/activemq | /home/lucktroy/.activemqrc ]

INFO: Using java ‘/usr/bin/java’
INFO: Starting in foreground, this is just for debugging purposes (stop process by pressing CTRL+C)
Java Runtime: Sun Microsystems Inc. 1.6.0_24 /usr/lib/jvm/java-1.6.0-openjdk-1.6 .0.0.x86_64/jre
Heap sizes: current=251264k free=248639k max=251264k
JVM args: -Xms256M -Xmx256M -Dorg.apache.activemq.UseDedicatedTaskRunner=tru e -Djava.util.logging.config.file=logging.properties -Dcom.sun.management.jmxrem ote -Dactivemq.classpath=/home/lucktroy/apache-activemq-5.4.2/conf; -Dactivemq.ho me=/home/lucktroy/apache-activemq-5.4.2 -Dactivemq.base=/home/lucktroy/apache-acti vemq-5.4.2
ACTIVEMQ_HOME: /home/lucktroy/apache-activemq-5.4.2
ACTIVEMQ_BASE: /home/lucktroy/apache-activemq-5.4.2
Loading message broker from: xbean:activemq.xml
INFO | Refreshing org.apache.activemq.xbean.XBeanBrokerFactory$1@5d6d2633: star tup date [Fri Apr 05 10:48:34 CDT 2013]; root of context hierarchy
WARN | destroyApplicationContextOnStop parameter is deprecated, please use shut down hooks instead
INFO | PListStore:/home/lucktroy/apache-activemq-5.4.2/data/localhost/tmp_storag e started
INFO | Using Persistence Adapter: KahaDBPersistenceAdapter[/home/lucktroy/apache -activemq-5.4.2/data/kahadb]
INFO | KahaDB is version 3
INFO | Recovering from the journal …
INFO | Recovery replayed 1 operations from the journal in 0.012 seconds.
INFO | ActiveMQ 5.4.2 JMS Message Broker (localhost) is starting
INFO | For help or more information please see: http://activemq.apache.org/
INFO | Listening for connections at: tcp://node03.cluster:61616
INFO | Connector openwire Started
INFO | ActiveMQ JMS Message Broker (localhost, ID:node03.cluster-55179-13651769 16124-0:1) started
INFO | jetty-7.1.6.v20100715
INFO | ActiveMQ WebConsole initialized.
INFO | Initializing Spring FrameworkServlet ‘dispatcher’
INFO | ActiveMQ Console at http://0.0.0.0:8161/admin
INFO | Initializing Spring root WebApplicationContext
INFO | camel-osgi.jar/camel-spring-osgi.jar not detected in classpath
INFO | Apache Camel 2.4.0 (CamelContext: camel) is starting
INFO | JMX enabled. Using ManagedManagementStrategy.
INFO | Found 4 packages with 15 @Converter classes to load
INFO | Loaded 146 type converters in 0.509 seconds
INFO | Connector vm://localhost Started
INFO | Route: route1 started and consuming from: Endpoint[activemq://example.A]
INFO | Started 1 routes
INFO | Apache Camel 2.4.0 (CamelContext: camel) started in 1.275 seconds
INFO | Camel Console at http://0.0.0.0:8161/camel
INFO | ActiveMQ Web Demos at http://0.0.0.0:8161/demo
INFO | RESTful file access application at http://0.0.0.0:8161/fileserver
INFO | Started SelectChannelConnector@0.0.0.0:8161

5. 运行Twister

$ ./start_twister.sh
node02
/home/lucktroy/.bashrc: line 10: /act/Modules/3.2.6/init/bash: No such file or directory
node03
Apr 5, 2013 10:48:55 AM org.apache.activemq.transport.failover.FailoverTransport doReconnect
INFO: Successfully connected to tcp://node03:61616
0 [main] INFO cgl.imr.worker.DaemonWorker – Daemon no: 0 started with 8 workers.
/home/lucktroy/.bashrc: line 10: /act/Modules/3.2.6/init/bash: No such file or directory
Apr 5, 2013 10:48:56 AM org.apache.activemq.transport.failover.FailoverTransport doReconnect
INFO: Successfully connected to tcp://node03:61616
2 [main] INFO cgl.imr.worker.DaemonWorker – Daemon no: 1 started with 8 workers.

6. 退出Twister

$ ./stop_twister.sh
node02
0 [main] DEBUG cgl.imr.script.StopDaemons – Stopping daemon on port number: 12500
7 [main] DEBUG cgl.imr.script.StopDaemons – Finished sending the term signal to daemons in host: node02
node03
0 [main] DEBUG cgl.imr.script.StopDaemons – Stopping daemon on port number: 12501
6 [main] DEBUG cgl.imr.script.StopDaemons – Finished sending the term signal to daemons in host: node03

7. 退出ActiveMQ, 进入步骤4的终端, Ctrl+C即可退出,也可以使用暴力kill~~

^C INFO | ActiveMQ Message Broker (localhost, ID:node03.cluster-55179-1365176916
INFO | ActiveMQ Message Broker (localhost, ID:node03.cluster-55179-136517691612
INFO | Connector openwire Stopped
INFO | Connector vm://localhost Stopped
INFO | PListStore:/home/jbzhang/apache-activemq-5.4.2/data/localhost/tmp_storag
INFO | Stopping async queue tasks
INFO | Stopping async topic tasks
INFO | Stopped KahaDB
INFO | ActiveMQ JMS Message Broker (localhost, ID:node03.cluster-55179-13651769
INFO | Connector openwire Stopped
INFO | ActiveMQ JMS Message Broker (localhost, ID:node03.cluster-55179-13651769

错误分析:
1. 运行中遇到如下错误:

$ Error getting System Properties:
java.lang.StringIndexOutOfBoundsException: String index out of range:
-1
Exception in thread “main” java.lang.NullPointerException
at cgl.narada.util.SystemInit.init(SystemInit.java:133)
at cgl.narada.node.BrokerNode.(BrokerNode.java:146)
at cgl.narada.node.BrokerNode.main(BrokerNode.java:926)

方案:添加unset module 到你的 ~/.bash_profile, 如下:

echo “unset module”>>~/.bash_profile

Twitter工程师眼中的新浪微博

编者的话:新浪微博曾是Twitter的仿照版,而现在两者似乎渐行渐远了,这种渐行渐远了直接将新浪微博和Twitter导入了不同的发展路径。新浪微博与Twitter到底有哪些不同呢?为此搜狐IT驻硅谷记者晴然专程拜访了Twitter的工程师。根据晴然的文章,在Twitter工程师眼中,新浪微博和Twitter的不同主要表现在以下4点:

  1,Twitter推崇“至简”原则,新浪微博则推崇“丰富”原则——新浪微博像是由多个产品经理同时牵头的公司。

  2,新浪微博像一个“微论坛”,鼓励讨论转发;Twitter则不鼓励讨论。

  3,新浪的系统设计鼓励大家玩“社交装B”,Twitter则专注新闻信息本身。

  4,Twitter找到精准广告的变现模式,已经盈利。新浪微博的盈利方式还未找到。

  以下为作者文章全文:

  不管业内怎样唱衰 新浪微博,至少阿里巴巴仍然认可新浪手里这张移动互联船票。新浪微博被阿里估值约32.56亿美元,按照新浪微博5亿注册用户数粗略计算,这相当于每个用户大约值40块人民币,比Facebook上市时每个用户5美元的估值(约32块人民币)还要高。赢了用户亏了钱的新浪微博跟自己的美国参照系Twitter形成鲜明对比;后者的注册用户也在5亿这个数量级,但却早已通过广告业务实现盈利。

Continue reading

Splinternet Behind the Great Firewall of China

Once China opened its door to the world, it could not close it again

Daniel Anderson

What if you could not access YouTube, Facebook, Twitter, and Wikipedia? How would you feel if Google informed you that your connection had been reset during a search? What if Gmail was only periodically available, and Google Docs, which was used to compose this article, was completely unreachable? What a mess!

These things happen almost every day in China. If you are a foreign visitor to China, you could experience what NBA player J.R. Smith encountered: “Dear China, The fact that u won’t let me work my Skype on my desktop or Twitter is really pissing me off.”20 As software developer Tony Hunt said, “That was really the most frustrating thing, as I never knew whether the connection had just dropped or if the site was being censored.”15

Most of these problems are caused by GFW (Great Firewall of China, also known as GFC), one of the most important building blocks in China’s comprehensive censorship system, and perhaps the most sophisticated Internet censorship system in the world.12 The Chinese government can remove the “harmful information” or even punish its authors inside China. For information hosted outside China, however, the Chinese authorities can do nothing but block or filter access. Without censorship at the international gateway of the Internet, the traditional censorship systems are utterly worthless. This is why GFW is so critical for the whole system, and so important to the stability of the Chinese state.
Continue reading

我姐和我女友是如何学编程的

英文原文:How my sister n my girlfriend learned to code,翻译:Ekaterina@yeeyan

在这篇博文中,我将记录下我教她们的方式,我构建这种学习过程的理由,以及这种学习方式奏效的原因。虽然以时间顺序列出她们在这段时间做的或学习的每一件事再容易不过,但是这毫无用处,而且读者们也会遗漏重点。了解学习过程中的细节并且明白它起作用的原因至关重要。所以我会从基本原则开始讲。

Continue reading

软件的未来

(一)传统的软件业已死

毫无疑问,传统的软件正在逐渐走向死亡。即使是象微软这样的软件业中的翘楚中的翘楚,也成天在想着转型的事情。难怪,鲍尔默成天在说他和盖茨的感情,但再好的感情,也掩饰不了他让盖茨退休的决心:一个以产品为中心的软件时代该结束了。他迫不及待地宣布:未来的软件是免费的。

当然了,这是一个迟到的宣言。因为Google们早就知道了:软件早就是免费的了。看看我们现在每天用的那么多软件:gmail、qq、msn、媒体播放器、杀毒软件。哪个不是免费的。我们甚至可以希望,就在不远的将来:一切的软件都可能是免费的。

这是一种不可阻挡的潮流。
Continue reading

DNS全球地址

国内外DNS服务器地址列表
DNS(Domain Name System)是域名解析服务器的意思,它在互联网的作用是把域名转换成为网络可以识别的IP地址。目前国内电信运营商通过使用DNS劫持的方法,干扰用户正常上网,使得用户无法访问Google、Gmail、Google AdSense、Google Maps等常用服务,昨天我介绍了使用OpenDNS的方法解决这个问题,由于OpenDNS的服务器在美国,如果使用的人多了有可能会速度变慢,因此今天我介绍一些其他国外的DNS服务器地址,供大家选择。

通常来说,香港、韩国、日本等国的DNS服务器速度会比较快,大家可以多用几个试试,尽量选择一个自己访问最快的DNS服务器,中国的电信运营商都是流氓,DNS服务器,早换早轻松。
Continue reading