Friday, 27 June 2008

Install dnsmasq for Faster Browsing via your own Local DNS Cache

Is your ISP's DNS response time is crappy... Install your own DNS cache in 15 minutes :)

Local DNS Cache for Faster Browsing on Ubuntu Machine

You can run a DNS cache on your computer. This will speed up the process of looking up domain names when browsing.

The following instructions are for someone with a broadband internet connection, where the computer gets it’s local IP address using DHCP from the router in your home or office.

Install dnsmasq in Ubuntu

Dnsmasq is a lightweight, easy to configure, DNS forwarder and DHCP server. It is designed to provide DNS and optionally, DHCP, to a small network. It can serve the names of local machines which are not in the global DNS. The DHCP server integrates with the DNS server and allows machines with DHCP-allocated addresses to appear in the DNS with names configured either in each host or in a central configuration file. Dnsmasq supports static and dynamic DHCP leases and BOOTP for network booting of diskless machines.

- From Ubuntu Geek

Thursday, 26 June 2008

Ubuntu Firefox 3 High CPU

I was experiencing regular CPU spikes of 25% not sure if this is related to LiveBookMark updating or the anti-phishing feature.
I had turned off the anti-phishing stuff previously but it could, apparently, still be related to it trying to update its blacklist.

[Update]
Related to:
https://bugzilla.mozilla.org/show_bug.cgi?id=329534
Bug 329534 – Live bookmarks load way too agressive (lock up/hang/freeze browser)

Firefox Speedups

The ones I have went with:

nglayout.initialpaint.delay = 0
content.notify.backoffcount = 5
content.notify.ontimer = true
browser.cache.disk.capacity = 150000
image.animation_mode = once
plugin.expose_full_path = true

"Use Tweak Network Settings" extension to set the rest.

Note:
1. Type about:config in the address bar and then press Enter.

2. If a search shows that the item does not exist by default.
Right-click anywhere in the about:config window, select New and then Boolean(true/false) or Integer(values) from the pop-up menu.



These worked with FF2:

network.http.pipelining, true
network.http.proxy.pipelining, true
network.http.pipelining.maxrequests, 8
content.notify.backoffcount, 5
plugin.expose_full_path, true
ui.submenuDelay, 0

content.interrupt.parsing, true
content.max.tokenizing.time, 2250000
content.notify.interval, 750000
content.notify.ontimer, true
content.switch.threshold, 750000
nglayout.initialpaint.delay, 0
network.http.max-connections, 48
network.http.max-connections-per-server, 16
network.http.max-persistent-connections-per-proxy, 16
network.http.max-persistent-connections-per-server, 8

Monday, 23 June 2008

Enable Slogger 0.6.20061221 with Firefox3

I have found that Slogger works fine* with Firefox3 so all we need to do is bump the version number of the extension.

There are a lot of ways to do this, my favored solution is detailed below. (Backing up your profile now would be a good idea).

Workaround to enable Slogger 0.6.20061221 with Firefox 3.0

1. Install: MR Tech Toolkit (formerly Local Install) 6.0.1

2. Install:
Slogger 0.6.20061221

On the install popup I had to check the box "Override MaxVersion compatibility checking".

Once installed I went to Tools > Addons > Extensions
Slogger was marked as non-compatible, to fix that I right clicked and chose "Make Compatible".
It now read as compatible with 1.5 - 3.0

---
* "works fine"
Manually Slogging individual pages via a button works fine.
Automatically Slogging onPageload does not seem to work at all :(
Thanks to Stefan Sorger for pointing this out.
---
Notes:
Slogger creates a complete log of your browsing history - so when you need that web site and find it has disappeared - you have a local copy!

This log is added to in date order and records the Title and optionally, keywords and a note called a clip.

The problem is it looks as if it may no longer be supported by Ken Schutte.

Sunday, 22 June 2008

Howto post code on Blogger

http://bguide.blogspot.com/2008/02/howto-add-custom-css-class-to-blogger.html

Add the following code into your template:

/*
Custom CSS class to display code snippets.
http://bguide.blogspot.com/
2008 Feb 03
*/
.mycode
{
border:1px dashed #aaaaaa;
background:#eeeeee;
white-space:pre;
font-family:monospace;
font-size:9pt;
line-height: 10pt;
height:auto;
width:auto;
padding:5px;
margin-left:10px;
overflow:auto;
}


This goes in your post:

< div class="mycode">

/* Paste the code snippet here */

< /div>


Note: can't get div within div to display correctly - fudged it by adding a space e.g < /div>

Slogger Customised Profile

This profile has been altered to save to one sloggerLog.xml file in the folder /home/bob/data/Slogger.


prefsettings["localfileDir"] = "/home/bob/data/Slogger/data/$year-$month-$day";
prefsettings["localfile"] = "$year-$month-$day_$hour-$minute-$second-$millisecond.$typeext";
prefsettings["dlmanager"] = false;
prefsettings["logfileEnable"] = true;
prefsettings["logfileDir"] = "/home/bob/data/Slogger";
prefsettings["logfileName"] = "sloggerLog.xml";


xml_completeU.js:



prefsettings["profName"] = "XML log & complete pagesU";
prefsettings["profDescr"] = "-- Uses tags to save history information in XML format.\n-- Writes a header & footer and escapes special characters, so the log file is valid XML.\n-- Creates an XSL file which is used to format the XML file for display in a browser.\n-- Saves (complete) pages to your folder within FF profile directory\n-- Filters localfiles, etc\n";
prefsettings["savepageEnable"] = true;
prefsettings["savepageType"] = 0;
prefsettings["localfileDir"] = "/home/bob/data/Slogger/data/$year-$month-$day";
prefsettings["localfile"] = "$year-$month-$day_$hour-$minute-$second-$millisecond.$typeext";
prefsettings["dlmanager"] = false;
prefsettings["logfileEnable"] = true;
prefsettings["logfileDir"] = "/home/bob/data/Slogger";
prefsettings["logfileName"] = "sloggerLog.xml";
prefsettings["logfileContent"] = "\n $year-$month-$day $hour-$minute-$second-$millisecond\n data/$year-$month-$day/$year-$month-$day_$hour-$minute-$second-$millisecond.$typeext\n $url\n $host\n $savetype\n $filename\n $type\n $title\n $keywords\n $desc\n $clip\n\n";
prefsettings["logfileAppend"] = false;
prefsettings["escapeXML"] = true;
prefsettings["add_logfile_menuitem"] = true;
prefsettings["text_logfile_menuitem"] = "View today's XML log file";
prefsettings["logfileHeader"] = "\n\n\n";
prefsettings["logfileFooter"] = "
\n";
prefsettings["styleEnable"] = true;
prefsettings["styleName"] = "slogger.xsl";
prefsettings["styleContent"] =



Note: can't post the "prefsettings["styleContent"] =" as the text is interpreted by the blogger software instead of being displayed - if needed check the provided "xml_complete.js"



prefsettings["enableRepeatDelay"] = true;
prefsettings["repeatDelay"] = 10;
prefsettings["enableBlacklist"] = true;
prefsettings["enableWhitelist"] = false;
prefsettings["blacklist"] = "\"$host\"==\"127.0.0.1\" ||| \"$url\".match(/^file:/) ||| \"$url\".match(/^about:/)";
prefsettings["whitelist"] = "";
prefsettings["submitFurl"] = false;
prefsettings["submitSpurl"] = false;
prefsettings["submitMyYahoo"] = false;
prefsettings["submitStumbleUpon"] = false;
prefsettings["submitDelicious"] = false;
prefsettings["customScriptEnable"] = false;
prefsettings["customScript"] = "";
prefsettings["customScriptStart"] = true;
prefsettings["confirmEnable"] = true;
prefsettings["confirmString"] = "url|title|keywords|clip";


Things to do after installing Ubuntu.


Applications:

Thunderbird
Firestarter
Notecase
grsync
Revelation Password Manager


Ubuntu Tweak:
Tick Nautilus options.


Advanced Desktop Effects Settings:(ccsm)
Desktop Cube
Rotate Cube
Expo
Widget Layer
Animations
Cube Reflections
Fading Windows
Wobbly Windows
Windows decorations
Scale addons
Scale


Pulse audio:
libasound2-plugins paman padevchooser paprefs pavucontrol pavumeter


Media/Codecs:
Add repository http://packages.medibuntu.org/
mplayer
sudo apt-get install ubuntu-restricted-extras
Got BBC Palyer working by the following:
sudo apt-get remove –purge totem-mozilla
sudo apt-get install mozilla-mplayer


Firefox:
Config- Default UserMy Config- Default UserEnabled Extensions: [23]
Installed Plugins: (10)
  • Default Plugin
  • Demo Print Plugin for unix/linux
  • DivX Browser Plug-In
  • GCJ Web Browser Plugin (using IcedTea) 1.0
  • iTunes Application Detector
  • mplayerplug-in 3.50
  • QuickTime Plug-in 6.0 / 7
  • RealPlayer 9
  • Shockwave Flash
  • Windows Media Player Plugin