强制Chrome浏览器Https加密访问网站

强制Chrome浏览器Https加密访问网站

  强制Chrome浏览器加密访问网站其实也就是强制Chrome浏览器http重定向到https,这种技巧对于经常修改Hosts的网友可能用处较大些。比如修改Hosts后访问Twitter,多数情况下访问http://www.twitter.com是不能访问的,要输入https://twitter.com才行。

  本站以前介绍过可以手动输入网址后在账号中设置默认https访问,这样点网站内的链接才不会出现"链接被重置"等一些情况,不过现在有更简单实用的方法实现。

  chrome://net-internals是一个Chrome内置的开发者工具,直接在浏览器地址栏输入地址栏输入chrome://net-internals/可打开选项页面。强制Chrome浏览器http重定向到https的方法:

  1.在地址栏输入地址栏输入chrome://net-internals
  2.点倒数第二个HSTS标签,在Add domain下方的"Domain:"后面输入想强制Https访问的网址,如图:

  输入网址后再点 Add按钮即可。

  设置完成后所有该域名下的子目录都会强制加密访问,如果想删除相关设置,在Delete domain下的方"Domain:"后面输入想删除的网址,然后点delete按钮即可。

linux free drop_cache 释放内存

Drop Caches

Kernels 2.6.16 and newer provide a mechanism to have the kernel drop the page cache and/or inode and dentry caches on command, which can help free up a lot of memory. Now you can throw away that script that allocated a ton of memory just to get rid of the cache...

To use /proc/sys/vm/drop_caches, just echo a number to it.

To free pagecache:

  # echo 1 > /proc/sys/vm/drop_caches 

To free dentries and inodes:

  # echo 2 > /proc/sys/vm/drop_caches 

To free pagecache, dentries and inodes:

  echo 3 > /proc/sys/vm/drop_caches 

This is a non-destructive operation and will only free things that are completely unused. Dirty objects will continue to be in use until written out to disk and are not freeable. If you run "sync" first to flush them out to disk, these drop operations will tend to free more memory.

tar 压缩解压常用命令

一直都只记着用tar命令怎么给gz的文件解压缩。可是,一旦下到个bz2的文件就不知道怎么处理了。

这就是知识不扎实的结果,无奈,只好仔细查一下man手册,和向“鸟哥”请教。

现记录一下,呵呵。高手勿怪。

tar [-cxtzjvfpPN] 文件与目录

参数:

-c :建立压缩文件的参数命令(creat的意思)

-x :解压缩文件的参数命令

-t :查看tar包里文件的命令特别注意,在使用参数时,c/x/t只能有一个,不能同时存在
因为不可能同时压缩与解压缩。

-z :是否同时具有gzip的属性,即是否需要用gzip压缩

-j :是否同时具有bz2的属性,即是否需要用bzip2压缩(记不住的就是它)

-v :压缩过程中显示文件,这个常用,呵基本上我现在每次解压都会看一下里面的文件

-f :使用文件名,之后立即加文件名,不能再加别的参数

-p :使用原文件的原来属性(属性不会根据用户而变),这个从来没用过。。

-P :可以使用绝对路径来压缩

-N :比后面接的日期(yyyy/mm/dd)还要新的才会被打包进新建的文件中

–exclude FILE :在压缩的过程中,不要将FILE打包

呵,基本上我现在常用的四个命令如下:

压缩成gzip文件:

tar -zcvf shell.tar.gz shell/

将gzip文件解压:

tar -zxvf shell.tar.gz

压缩为bz2文件:

tar -jcvf shell.tar.bz2 shell/

将bz2文件解压:

tar -jxvf shell.tar.bz2

==============2010.05.26补充============

如果只想将文件打成tar包,不做压缩,同样很简单:

tar -cvf shell.tar shell/

同样,解压你也就知道了

tar -xvf shell.tar

220 busybox ping探测mtu大小


 
/ # ping   192.168.3.1  -s 1472 -b
 
s表示包大小
-b表示禁止分片
 
ping的最大包长是1472

安装office 2010后,电脑启动变慢,主要是网卡启动很慢 解决方法

到服务中禁用Microsoft .NET Framework NGEN v4.0.30319_X86,理由如下:


 安装完VS2010后,默认会安装.Net 4.0的类库,但是这个安装后系统会更新一个补丁,并且开机会自动启动Microsoft .NET Framework NGEN v4.0.30319_X86服务,在xp系统中


会是网络连接延迟大约1分钟才会正常启动,根据官网的说法(http://msdn.microsoft.com/zh-tw/magazine/cc163610.aspx)会提示效能,但是如果不是必须的,还是在服务中将此服务禁用,至少我目前没发现会出现什么问题,但是这个服务开启的话,会让你的网卡启动很慢...