Firefox is ace! The plugin architecture means that you can increase the functionality by adding extras.
Control browser operations with your mouse
Out of all of them this makes navigation a dream. Imagine the following scenario: you are looking for something on the web and it is likely you will have to visit a lot of sites to find it. Typically, your hunt will start with a search on Google or some kind of specialist forum site. After you get your search results back you have 2 choices on navigation method.
- Click the first link read what it says, find it’s not what you want, click the back button then click the next link in the list, or
- Mouse gesture down on each link on the page, which opens that page in a new tab, then starting with the first tab scan each page, closing it if it isn’t relevant.
The choice is clear. One method uses twice the bandwidth, twice the processing power and takes 4 times longer; and the other method is what real men do (and by men I include computer women too).
British English Dictionary
Everone shud spel propaly, evan the Amerikans.
Fetch Text URL
This is a simple little utility that allows you to take a piece of plain text and launch it as a new web page. Not all webmail, forums or pages, spot URLs properly and don’t automatically encase them in the appropriate <a hef= tags to create a link. The plugin lets you highlight a piece of text and launch it in a new browser or tab.
Splits the screen in two to display local and remote files. Allows multiple file downloads.
Advanced URL Builder
Highlight some text and create a URL with it. Highlight a postcode from someone’s “Contact Us” page and look it up on Google Maps.
Windows support the Network Time Protocol (NTP).
This article gives you the steps you must take in order to make your client pickup the time from the network and set your local clock.
net time /setsntp:myhostname
net stop w32time
net start w32time
Where myhostname is the name of your NTP server.
C:\Documents and Settings\myuser>net time
Current time at \\MYHOSTNAME is 11/4/2009 1:13 PM
The command completed successfully.
You can find more goodies relating to the registry settings here.
Each quarter I do my VAT (Value Added Tax) return. This is the tax that gets added on to each purchase in the UK. It’s a little reminder that I must do my billing. Honestly, I have so much fun doing the work I do, that I forget to bill people sometimes!
Using my current technology, it’s a little long winded so I thought I’d document how I do it, to remind me to find a way to do it better.
Obviously this method is going to be terribly geeky, but hay - I am who I am
All my time accounting is handled by MantisBT which is the issue tracker I use. I wrote the current implementation of the billing feature so I thought I’d better use that! I have it on good authority that I’m not the only one!
The applications needed for this work are: web browser, PuTTY and Open Office, so load then in now!
- Login to MantisBT.
- Select Billing from navigation bar.
- Select the Project you are going to prepare the billing for. The page will automatically reload.
- Select the data period you are billing for. Leave the Cost as zero.
- Click Get TimeTracking Information
- Cut the text in the results page; starting before the first issue identifier and drag down to the end of the time on the last issue line.
- In PuTTY and jump to you nearest unix box.
- Load Vi.
- Paste copied text into Vi’s session.
- Remove all references to my user name.
- Jump to the top of the page.
- From the start of the line create a macro to format the data.
- Do control+g to get the number of lines. Divide it by 2 then, to give say 20. Then repeat macro for each line: 20@a.
- Clean up additional spaces:
- Select all the text and paste it into Open Office spread sheet.
- The Text Import dialogue will appear, so select Separated by Comma and click Ok.
- Highlight the column containing the time information.
- Right click and select Format Cells…
- Set category to Time and choose 13:37 which is HH:MM.
- Hit Ok and the cells will be changed to the correct format.
- Select the cell underneath the last time.
- After the opening bracket the cursor changes so you can select all the cells you want to be in the summation. Hit return when you have finished selecting them.
- Select the cell again and add the formatting.
- Now you can cut and paste the report anywhere you like.
I have used some Vi macro’s. Take a look at my article Vi’s super commands to see an example of how to set up a Vi macro.
Vi is one of the most powerful text editors, but it really separates the men from the boys. GUI’s are highly over rated - all you want is a big black page. Apart from some clear context colouring what more do you need to write code?
One of Vi’s strengths is pattern matching with search and replace features. Below I have outlined the reasons why developers choose this as their favourite editor.
Search and replace
Search and replace is done using sed syntax which follows the form: which lines, what to look for, what to replace it with and then how much to do.
Firstly we need to specify a range of lines to apply our change to.
- Missing this option out means the current line.
- n - line number n.
- a,b - from line a to line b.
- .,$ - from the current line to the end of the file.
- % - all lines.
Now we specify the command function, which in this case is search. We do that with a single ’s’ character.
Next comes the parameter separator. Most people use a forward slash but you can use anything. If your search pattern has a lot of forward slashes then you don’t have to delimit them if you use a different separator. I use a greater than symbol - ‘>’.
The following lines are equivalent.
Next comes the pattern you are looking for. This is a regular expression which can keep matches in buffers to use in the replacement section.
- [Dd]avid [Nn]ewcomb - camel case match.
- ^davidnewcomb - match davidnewcomb at the start of the line.
- davidnewcomb$ - match davidnewcomb at the end of the line.
- david\(newcomb\) - match davidnewcomb and save newcomb in buffer number 1.
- \(david\)\(newcomb\) - match davidnewcomb and save david in buffer number 1 and newcomb in a buffer number 2.
Add another separator character and now specify what we want to replace the search match with. I’ll use the example above.
- nothing - this is the equivelent to delete the text.
- David Newcomb - make sure you have used camel case everywhere.
- nothing - as above
- nothing - as above
- mr \1 - change my title but keep my surname.
- \1 \2 - add a space between my name.
Another separator character and finally add the scope. Without the search scope the pattern matcher will stop after replacing the first occurance on the line. Adding the global flag ‘g’ will allow the matcher to find and replace all the matches on the line.
This sequence, looks for a comma followed by a zero or more spaces followed by a digit, and save the digit in slot 1. Replace all that text with a comma and the digit from slot 1. Do it for each occurrence on the line.
How do you change:
0000367: Update the site contact us page 00:30
0000368: Correct the new section 00:30
0000369: How to access webmail 00:15
0000367,Update the site contact us page,00:30
0000368,Correct the new section,00:30
0000369,How to access webmail,00:15
ready for CVS paste import to Open Office or Excel.
Simples! Go to the first character on the line, hit escape to enter control mode and type:
Where ESC is pressing the escape key.
How can I remember that!!!! It’s all very simple.
- q - create a macro.
- a - save the macro in slot ‘a’.
- w - the first command in the sequences, move one word forwards.
- 2s - delete the next 2 characters and start editing.
- , - write a comma.
- ESC - to enter control mode.
- $ - go to the end of the line.
- 3b - move 3 words back.
- h - one more character to the left.
- cw - delete the next word and put into editing mode.
- , - write a comma.
- ESC - to enter control mode.
- 0 - go to the start of the line (back to the start).
- q - end the macro definition.
The macro does a whole step and returns to the starting point. Now that the macro is defined you can start using it.
- n - optionally, play the macro n times.
- @ - play the macro.
- a - play macro ‘a’
By the former Chairman of Uni-Lever:
“The person who gets on best, is the person who makes the most of the situation in which they find themselves.”