about:config
network.dnsCacheExpiration : 3600 (int.)
network.dnsCacheEntries : 1000 (int.)
2009年11月14日
2008年9月23日
Firefox hacks
In Depth: 8 hacks to make Firefox ridiculously fast | PCAnswers
Firefox has been outperforming IE in every department for years, and version 3 is speedier than ever.
But tweak the right settings and you could make it faster still, more than doubling your speed in some situations, all for about five minutes work and for the cost of precisely nothing at all. Here's what you need to do.
1. Enable pipelining
Browsers are normally very polite, sending a request to a server then waiting for a response before continuing. Pipelining is a more aggressive technique that lets them send multiple requests before any responses are received, often reducing page download times. To enable it, type about:config in the address bar, double-click network.http.pipelining and network.http.proxy.pipelining so their values are set to true, then double-click network.http.pipelining.maxrequests and set this to 8.
Keep in mind that some servers don't support pipelining, though, and if you regularly visit a lot of these then the tweak can actually reduce performance. Set network.http.pipelining and network.http.proxy.pipelining to false again if you have any problems.
2. Render quickly
Large, complex web pages can take a while to download. Firefox doesn't want to keep you waiting, so by default will display what it's received so far every 0.12 seconds (the "content notify interval"). While this helps the browser feel snappy, frequent redraws increase the total page load time, so a longer content notify interval will improve performance.
Type about:config and press [Enter], then right-click (Apple users ctrl-click) somewhere in the window and select New > Integer. Type content.notify.interval as your preference name, click OK, enter 500000 (that's five hundred thousand, not fifty thousand) and click OK again.
Right-click again in the window and select New > Boolean. This time create a value called content.notify.ontimer and set it to True to finish the job.
3. Faster loading
If you haven't moved your mouse or touched the keyboard for 0.75 seconds (the content switch threshold) then Firefox enters a low frequency interrupt mode, which means its interface becomes less responsive but your page loads more quickly. Reducing the content switch threshold can improve performance, then, and it only takes a moment.
Type about:config and press [Enter], right-click in the window and select New > Integer. Type content.switch.threshold, click OK, enter 250000 (a quarter of a second) and click OK to finish.
4. No interruptions
You can take the last step even further by telling Firefox to ignore user interface events altogether until the current page has been downloaded. This is a little drastic as Firefox could remain unresponsive for quite some time, but try this and see how it works for you.
Type about:config, press [Enter], right-click in the window and select New > Boolean. Type content.interrupt.parsing, click OK, set the value to False and click OK.
5. Block Flash
Intrusive Flash animations are everywhere, popping up over the content you actually want to read and slowing down your browsing. Fortunately there's a very easy solution. Install the Flashblock extension (flashblock.mozdev.org) and it'll block all Flash applets from loading, so web pages will display much more quickly. And if you discover some Flash content that isn't entirely useless, just click its placeholder to download and view the applet as normal.
6. Increase the cache size
As you browse the web so Firefox stores site images and scripts in a local memory cache, where they can be speedily retrieved if you revisit the same page. If you have plenty of RAM (2 GB of more), leave Firefox running all the time and regularly return to pages then you can improve performance by increasing this cache size. Type about:config and press [Enter], then right-click anywhere in the window and select New > Integer. Type browser.cache.memory.capacity, click OK, enter 65536 and click OK, then restart your browser to get the new, larger cache.
7. Enable TraceMonkey
TraceMonkey is a new Firefox feature that converts slow Javascript into super-speedy x86 code, and so lets it run some functions anything up to 20 times faster than the current version. It's still buggy so isn't available in the regular Firefox download yet, but if you're willing to risk the odd crash or two then there's an easy way to try it out.
Install the latest nightly build (ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/), launch it, type about:config in the address bar and press Enter. Type JIT in the filter box, then double-click javascript.options.jit.chrome and javascript.options.jit.content to change their values to true, and that's it - you're running the fastest Firefox Javascript engine ever.
8. Compress data
If you've a slow internet connection then it may feel like you'll never get Firefox to perform properly, but that's not necessarily true. Install toonel.net (toonel.net) and this clever Java applet will re-route your web traffic through its own server, compressing it at the same time, so there's much less to download. And it can even compress JPEGs by allowing you to reduce their quality. This all helps to cut your data transfer, useful if you're on a limited 1 GB-per-month account, and can at best double your browsing performance.
2008年7月11日
10 handy bash aliases
Cut down on Linux command-line typing with these 10 handy bash aliases | 10 Things | TechRepublic.com
Cut down on Linux command-line typing with these 10 handy bash aliases
The Linux desktop has come a long, long way, but there are still times when I have to use the command line. (I am a hardcore user, after all.) But even though I’m used to typing, spending hours upon hours with my fingers at the keyboard, I still grow tired of typing the same commands over and over. To reduce that tedium, I always add aliases to my .bashrc file.
What is an alias?
An alias is basically a shortcut for a command you place in your ~/.bashrc file. Aliases cut down on typing and can save you from having to look up a command. (If your memory is like mine, this can be a real boon!)
Aliases are set up near the bottom of the of the .bashrc file. You’ll see a commented-out section that indicates where you should put them. The format of an alias is:
Alias NICKNAME='full command here'
The keyword alias must be used. The nickname is what you will type at the command line. Make this nickname easy to remember. The = sign must also be used. After the = sign, you enter the full command, including flags and switches, enclosed in single quotes. Once you are done, save the .bashrc file and open up a new terminal. I always find it best to leave the original terminal window open in case there are problems. In the new terminal, type the alias nickname and the command will run.
To get you started, I’ve compiled the following list of aliases I have used over the years to help make my command-line experience a bit easier.
Note: This information is also available as a PDF download.
#1: The ssh alias
This one should be a no-brainer for those of you who frequently secure shell into particular boxes. For this I add an alias like so:
alias server_name='ssh -v -l USERNAME IP ADDRESS'
Just change server_name to a memorable name for the server. Then, change USERNAME and IP ADDRESS to suit your needs.
#2: The ls aliases
Some distributions don’t include some of the handier ls commands. Generally, I like to see full listings instead of just filenames. For that I always include this alias:
alias ll='ls -l'
Another handy ls alias is this:
alias la='ls -a'
#3: The rm safety net
I can’t tell you how many times I have “rm’d” a file I shouldn’t have “rm’d”. To avoid this, I add this alias:
alias rm='rm -i'
Adding the ‘-i’ flag it forces rm into interactive mode, which will ask you whether you’re sure you want to remove a file.
#4: The more useful df command
This handy tool tells you how much space you have left on a drive. Only thing is, if you run the command by itself it replies in 1K blocks. Most people would prefer to see this in terms of MB. To make that happen, add this alias:
alias df='df -h'
Now, every time you run the df command, the information will be returned in a human-readable format.
#5: The nonstandard Firefox
Many times, I install Firefox in strange directories (or have more than one version of Firefox installed for testing purposes). For this, I will add an alias to start the correct Firefox. Say, for example, I have the beta of the newest, upcoming Firefox release installed, as well as the current stable Firefox. They are both installed in my home directory in different subdirectories. I will then add two aliases like so:
alias ff1='/home/jlwallen/firefox/firefox'
alias ff2='/home/jlwallen/firefoxb3/firefox'
Now I can start the stable firefox with ff1 or the beta with ff2.
#6: The bookmark alias
Speaking of Firefox, let’s create an alias to open up it to a specific URL:
alias fftr='/home/jlwallen/firefox/firefox http://www.techrepublic.com'
This alias will open Firefox directly to the TechRepublic Web site.
#7: The constant editing of a file
There are certain files that I am constantly editing. For instance, when I used Enlightenment E16 (I now use E17), I was frequently editing the menu file ~/e16/menus/user_apps. Instead of constantly opening up a terminal and entering nano ~/.e16/menus/user_apps, I used an alias that allowed me to type emenu and start editing. I used this alias:
alias emenu='aterm nano -e ~/.e16/menus/user_apps'
Now, I just enter the command emenu (or I can enter that in the run command dialog) to open up this file in an editor.
#8: The apt-get update
There are numerous ways to use an alias to help you with apt-get. One of my favorite is to add this alias:
alias update='sudo apt-get update'
I only need to enter update and will be prompted for the sudo password. You can modify this to suit your frequent apt-get needs.
#9: The rpm batch install
I like to do a lot of batch installing with rpm. I will typically dump a bunch of rpm files into an empty directory (created for this specific purpose) and run the command rpm -ivh ~/RPM/*rpm. Of course, an alias makes this even easier:
alias brpm='rpm -ivh ~/RPM/*rpm'
You have to create the ~/RPM directory and enter the root password for this to work.
#10: The long, arduous path
There are some paths that I often change to that seem to take eons to type. When I was working on the Afterstep window manager, I had to constantly change to the ~/GNUstep/Library/AfterStep/start to edit menus. After a while, you get tired of typing cd ~/GNUstep/Library/AfterStep/start just to get to the directory. So I added an alias like so:
alias astart='cd ~/GNUstep/Library/AfterStep/start'
Naturally, you can change that to fit your needs. This will save you a lot of typing.
So there you have it: a few simple bash aliases that will ease the load on your fingers. You can modify them to suit you, and they’ll give you a good start on creating your own handy bash aliases.
標籤:
command_line,
hack,
linux
2008年7月5日
fon hack
Rex’s blah blah blah » Fonera 與 SD Card!
可能不少人都知道 La Fonera 上用了 SPI Bus ,而且尚留有一組 SW 腳位可用。透過這個腳位,我們可蠻容易的加上 SD Card 或 MMC Card。» Fonera SD Card Hack on Jkx@home » Blog Archive
Fonera SD Card Hack(T)ttrick Infinite Space: Important Patch for FreeWLAN Addons
I read on several websites, that some people managed to wire a SD Card (or a MMC) to a Fonera access point. After a little googling, I discover this can be done easily, so I decided to test.. but I run into one issue so I decided to describe the process here.
Important Patch for FreeWLAN Addons(T)ttrick Infinite Space: Make a Serial Console Cable for La Fonera
特別感謝
感謝阿德、Freddy提供發生問題的FON進行研究,才會有這個解決方法的誕生!相關留言可在FreeWLAN的介紹網頁找到。
Make a Serial Console Cable for La FoneraFreeWLAN - Trac
前言
這次要介紹的主角是Serial Console Cable。它最主要的用途,就是透過Serial Port來操作FON的Console,並能在FON一開機時取得內部訊息,對於想要完全惡搞的人來說,是一把強力的螺絲起子。
訂閱:
文章 (Atom)