Showing posts with label mozilla. Show all posts
Showing posts with label mozilla. Show all posts

Friday, June 19, 2009

TenGrandIsBuriedThere and Crop Cricles

I've always wondered if I had a part in spawning the firefox crop circle.

I posted to spreadfirefox.com back in 2004.

Amusing thought - Crop Circles
Posted by CloCkWeRX on Fri, 10/22/2004 - 16:42Firefox Marketing Ideas

:) Speaks for itself. Ties into the Nov. 9. mystery and ILoveBees ideas.

"Something is coming.
Something big.
Something alien to most of us...
Something that's from out of this world..."

First off, you need a field. Second, you need a manual. Third, you need a worried farmer.


Come 2006, they made the crop circle.

They give credit to some Mozilla folk.


Matt and John, Mozilla video interns, came up with the idea a few weeks beforehand. Fueled by the enthusiasm of Asa Dotzler at Mozilla, suddenly the crop circle was within reach. While at OSCON 2006 in Portland, the three of them ran into members of the OSLUG, and things really started to take shape.



Whoever really generated the idea, it gives me no end of pleasure that it's hitting back at the horrible Microsoft marketing campaign, bribing users to switch to IE8 while insulting the rest of us.




Reblog this post [with Zemanta]

Wednesday, August 06, 2008

Browsing Concepts

Mozilla labs is calling for Concepts.

Mine is 'specific content area zoom'.




I want to be able to easily zoom on one particular content div / container; for instance on a news site.

Scenario:
* I've got a content div
* Right click on it (similar to firebug’s select element)
* Everything else on the page is dimmed out, and shrunk (font-size: 0.01em!)
* That particular div becomes ever so slightly larger.

Ideally:
* Mousewheel zoom would still work; but only on the selected element.
* Up/Down buttons let you easily select the parent node/child node, so you can go from focusing on a P to a container DIV
* Back / Forth buttons easily let you navigate between the next child nodes.

Screenshots:

A normal page
zoom1

The content I want, in 'selection mode' (I stole from firebug)
zoom2

The spotlight / zoom
zoom3

Monday, June 02, 2008

Saturday, April 12, 2008

Operator user script: Add to Google Contacts (GData API)

I wanted to export a hcard to my google contacts with Operator, but there was no such thing.

I went off and tinkered around with the google contacts API, and operator.

I did this all while experimenting with Flock 1.1, (by the way, Flock still sucks, but this time because it's only got a handful of sites it integrates with); so if it breaks in your fancy new firefox, don't look at me!

To use it;
Copy and Paste, save as add-google-contact.js
Install Operator
Tools, Options, Operator
User scripts tab
Find add-google-contact.js
Find a site with hcards (like this one), and export away to your Google account!

var add_google_contact_login_details = {email: false, password: false, auth_token: false};

/**
* A helper method to send http requests to the google services.
*/
function add_google_contact_send_request(method, url, content, auth, content_type) {
request = new XMLHttpRequest();

request.open(method, url, false);

if (auth) {
request.setRequestHeader("Authorization", "GoogleLogin auth=" + auth);
}

if (content_type) {
request.setRequestHeader("Content-type", content_type);
}

try {
request.send(content);

if (request.status == 200 || request.status == 201 || request.status == 409) {
return request.responseText;
}
dump(request.status);
dump(request.responseText);
} catch (ex) {
dump(ex);
}

return null;
}

/**
* Extracts information out from a hCard semantic object
* and returns a google-friendly XML representation.
*/
function add_google_contact_create_xml_from_vcard(hcard) {
var i;
var full_address;
var email;
var tel;
var url;
var xml = "";

xml += "<atom:entry xmlns:atom='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>" + "\n";
xml += " <atom:category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/contact/2008#contact' />" + "\n";

//Parse name
xml += " <atom:title type='text'>" + hcard.fn + "</atom:title> " + "\n";

xml += " <atom:content type='text'>Notes</atom:content>" + "\n";

if (hcard.email) {
for (i = 0; i < hcard.email.length; i++) {
email = hcard.email[i];

type = 'home';
if (email.type && email.type[0] == 'work') {
type = 'work';
}

xml += " <gd:email rel='http://schemas.google.com/g/2005#" + type + "' address='" + email.value + "' />" + "\n";
}
}


if (hcard.tel) {
for (i = 0; i < hcard.tel.length; i++) {
tel = hcard.tel[i];

type = 'home';
if (tel.type && tel.type[0] == 'work') {
type = 'work';
}
xml += " <gd:phoneNumber rel='http://schemas.google.com/g/2005#" + type + "'>" + tel.value + "</gd:phoneNumber>" + "\n";
}
}


if (hcard.adr) {
for (i = 0; i < hcard.adr.length; i++) {
adr = hcard.adr[i];
full_address = "";
if (adr["street-address"]) {
full_address += adr["street-address"] + " ";
}

if (adr["locality"]) {
full_address += adr["locality"] + " ";
}

if (adr["region"]) {
full_address += adr["region"] + " ";
}

if (adr["postal-code"]) {
full_address += adr["postal-code"] + " ";
}

if (adr["country-name"]) {
full_address += adr["country-name"] + " ";
}

if (full_address != "") {
xml += " <gd:postalAddress rel='http://schemas.google.com/g/2005#work'>" + full_address + "</gd:postalAddress>" + "\n";
}
}
}


xml += "</atom:entry>" + "\n";

return xml;
}

/**
* Send a create contact request for the email & auth_token provided.
*
* The contact is described in xml.
*
* @see add_google_contact_create_xml_from_vcard()
*/
function add_google_contact_create_contact(email_address, auth_token, xml) {
url = 'http://www.google.com/m8/feeds/contacts/' + escape(email_address) + "/base";

return add_google_contact_send_request("POST", url, xml, auth_token, "application/atom+xml");
}

/**
* Fetch an authorisation token for a given
* username and password
*
* @return An authorisation token string
*/
function add_google_contact_login(username, password) {
var url = 'https://www.google.com/accounts/ClientLogin';
var content = "";

content += "accountType=HOSTED_OR_GOOGLE";
content += "&Email=" + username;
content += "&Passwd=" + password;
content += "&service=cp";
content += "&source=NoCompany-Operator-0.1";


response = add_google_contact_send_request("POST", url, content, null, "application/x-www-form-urlencoded");


// Sample response
/*
HTTP/1.0 200 OK
Server: GFE/1.3
Content-Type: text/plain

SID=DQAAAGgA...7Zg8CTN
LSID=DQAAAGsA...lk8BBbG
Auth=DQAAAGgA...dk3fA5N
*/
if (response) {
parts = response.split("\n");
return parts[2].substring(5);
}

return null;
}

function add_google_contact_get_login_details() {
var passwordManager = Components.classes["@mozilla.org/passwordmanager;1"]
.getService(Components.interfaces.nsIPasswordManager);

var e = passwordManager.enumerator;

//Ask the existing password manager for google account details
var queryString = 'https://www.google.com';

while (e.hasMoreElements()) {
try {
var pass = e.getNext().QueryInterface(Components.interfaces.nsIPassword);

if (pass.host == queryString) {
email_address = pass.user;
password = pass.password;

//TODO: Check if the email_address is valid (I store my username without the @ details)
return {email: email_address, password: password, auth_token: false};
}
} catch (ex) {
dump(ex);
}
}

//We didn't find the details. Oh dear.
//Better ask nicely.

var prompts = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);


email_address = {value: ""};
password = {value: ""};
check = {value: true};

var result = prompts.promptUsernameAndPassword(null, "", "Enter email and password for your Google Account:",
email_address, password, "Remember password", check);


if (check.value) {
try {
passwordManager.addUser(queryString, email_address.value, password.value);
} catch (ex) {
dump(ex);
}
}

return {email: email_address, password: password, auth_token: false};
}


var add_google_contact = {
description: "Add to Google Contacts",
shortDescription: "Add Google Contact",
scope: {
semantic: {
"hCard" : "fn"
}
},
doAction: function(semanticObject, semanticObjectType, propertyIndex) {
//Do we have login details?
if (add_google_contact_login_details.email == false) {
add_google_contact_login_details = add_google_contact_get_login_details();

//If the user cancelled finding them...
if (add_google_contact_login_details.email == false) {
return false
}
}

if (!add_google_contact_login_details.auth_token) {
add_google_contact_login_details.auth_token = add_google_contact_login(add_google_contact_login_details.email,
add_google_contact_login_details.password);
}

xml = add_google_contact_create_xml_from_vcard(semanticObject);

result = add_google_contact_create_contact(add_google_contact_login_details.email, add_google_contact_login_details.auth_token, xml);
}
};

SemanticActions.add("add_google_contact", add_google_contact);

Sunday, October 28, 2007

Thunder! Lightning!

Since I last wrote about Lightning things have really moved along.

Recently we saw the release of Lightning 0.7 for Thunderbird - this is a significant step towards matching, then beating outlook.

I can't seem to find a screenshot, but most of the rough edges which existed in the previous release have disappeared, the UI seems polished, and the experience while using it is... pleasing.

So if you want to try this but can't really find an excuse to do so, why don't you use thunderbird + imap + gmail, and then add your google calendar too. Try it for a week, and blog about how you got on.

Saturday, February 10, 2007

Firefox Extensions, Round 2

I've been trialling some firefox extensions to solve my garbage collection problem.

So far, the best of the lot is the Aging Tabs extension, which I've now got fading out tabs to pitch black if I haven't used them in 5 minutes or so.

PermaTabs was also useful - but there's something about the implementation that irks me. I can't put my finger on it.


Morning Coffee overlaps with PermaTabs; so I haven't really seen it become useful; and the rest have seen little use

.

Friday, February 09, 2007

Tab Extensions for Firefox

Here's a list of extension I'm trying out in order to solve my tab problem. The Aging Tabs extension sounds the most promising.

Thursday, December 07, 2006

Stats, Why People Should Be Shot & Murder Planning

I got my name in a newsletter for yelling at people for un-blogger friendly web design, still own in the top 10 for murder planning, and am edging up when it comes to why people should be shot.

I just edged over the 500 post mark, and on top of that all (and yet another disaster of a week); I serve 80-90,000 pages a day as part of my work application.

I've also indirectly influenced 85% of our 2,500+ daily users to use Firefox.

Holy crap; numbers scare me.

Sunday, December 03, 2006

Full page zoom in Firefox

From the Burning Edge:

Fixed: 323934 - [Mac] Change default toolkit on Mac to cairo-cocoa.

Mac is the last major platform to switch to using Cairo for graphics. Now that all major platforms are using Cairo, it is possible to make changes to Gecko that rely on the use of Cairo. For example, it is now possible to fix the use of units in Gecko, which will in turn make it possible to implement full page zoom. Because so much cross-platform Gecko work depended on getting Cairo turned on on Mac, the switch may have been rushed, leading to more regressions than is usual for a large change.

Firefox 3.0, I can't wait.

Thursday, November 30, 2006

Gecko 1.9 is spinning up...

Gecko 1.9 is starting to come together. This will be pretty awesome, not just because it'll help draw smiley faces.

From the roadmap:
  • Cairo for rendering; meaning better performance.
  • Python for XUL
  • Javascript 2
  • More oompf for XULRunner - this will directly help songbird, for instance.
I'm kind of excited.

Tuesday, November 07, 2006

Analytics and Valex

I switched on Google Analytics, on just the login page of Valex.
The code made it into production just yesterday - along with the shiny new training site.

For Monday, here's our stats.
Visits: 1,633
Pageviews: 2,228

On the login page. Just the login page. Ack.

84.14% of our users use firefox, with 1.5.0.7 beating 2.0 by a fair bit.
Basically no one is using Internet Explorer 7.

I'm amazed at just how much traffic we're getting. No wonder people won't stop calling me about password resets...

Saturday, November 04, 2006

Lijit / Outfoxed

Outfoxed is something I encountered some time ago - it's just like StumbleUpon but provides a bit more under the hood.
It's just become lijit.com; and it's still a firefox extension. It's a bit hard to get started with it - but create an account and find the 'get the extension' link on the left hand side.


Tuesday, October 31, 2006

Wanted: Firefox W3C validator plugin

  1. You view a page
  2. You hit CTRL+U to view the source
  3. There is a 'validate this' button
  4. The extension submits to the W3C validator SOAP service
  5. The results are parsed and rendered inline.

Dear lazyweb, please build me this.

Tuesday, October 10, 2006

Stiff asks, great programmers answer

Interview with Linus Torvalds, Dave Thomas, David Heinemeier Hansson, Steve Yegge, Peter Norvig, Guido Van Rossum, Bjarne Stroustrup, James Gosling and Tim Bray.

Interesting read. Go read it, and if you like post your own answers in the comments here...

How did you learn programming? Were any schools of any use? Or maybe you didn’t even bother with ending any schools :) ?
mIRC scripts (hah!), HTML, and basic PHP. A bit of javascript. I then went off to AIT and went through iCarnegie.

What do you think is the most important skill every programmer should posses?
Humor, and the ability to work in a team without direction. Obsessive compulsive urges to document things and put in meaningful info into version control software / any public communication.

Do you think mathematics and/or physics are an important skill for a programmer? Why?
Not really; most math is terrible for preparing you to build a web application. Which is what I do.

What do you think will be the next big thing in computer programming? X-oriented programming, y language, quantum computers, what?
SPARQL backed web applications. Or apps based on XULRunner; like Songbird - half program, half browser, half finished, totally nifty...

If you had three months to learn one relativly new technology, which one would You choose?
I don't care about new stuff, I just want to be able to compile PHP extensions properly! On any platform I need to also...

What do you think makes some programmers 10 or 100 times more productive than others?
Attention to detail and the ability to communicate. If you can't articulate what's on your mind; how can you express ideas in code?

What are your favourite tools (operating system, programming/scripting language, text editor, version control system, shell, database engine, other tools you can’t live without) and why do you like them more than others?
Unix like environments, PHP 5, Editplus, SVN, bash, mysql, ZendCodeAnalyzer and PHPUnit. Oh, and firefox.

What is your favourite book related to computer programming?
*Shrug* - there was a decent one on refactoring, but I've lost it.

What is Your favourite book NOT related to computer programming?
A Fire Upon The Deep, by Vernor Vinge; or Revelation Space by Alastair Reynolds (I just finished it; it's awesome)

What are your favourite music bands/performers/compositors?
Derb; Cosmic Gate; etc. If it's hard trance, I'll tend to like it. My tastes wander a lot as I buy more vinyl.

What about you; readers?

Friday, September 08, 2006

Who wants a job! PHP Programmer - Adelaide

Valuation Exchange, which is more or less my full time obsession, is hiring.

From the job ad:

  • Interesting Projects
  • Great team environment
  • Utilise full range of skills
An opportunity exists within our programming team for a PHP5 developer.
The role will be to work within the programming team to deliver high-quality code that improves the user experience and adds new functionality to our code base.

It is essential that you have experience with:
  • Version control (CVS or SVN)
  • PHP frameworks (PEAR, or Zend, or Propel, or Solar, or Cake, etc)
  • PHP5 OOP
  • PHPUnit / test-driven development

We will look favourably on candidates with experience in large projects (ie, having to scale with LAMP) or open-source projects (because you'll be used to having people pick on your code) but neither is essential. We also would regard experience with XML/SOAP highly.
Salary will be commensurate with experience.


But that tells you nothing. Valuation Exchange - we're in the valuation industry (duh). We create software that supports banks when people come in for home loans. We receive requests, find a valuer who can reach the property, and return a detailed report about the value of someone's home to the bank all within 48 hours.

That means that we code everything from web services (SOAP, REST), decent user interface design (we've got ~200 forms to capture info), security, geospatial stuff and statistical reporting.

This project is %$#@ing huge. It handles a very significant portion of all valuation work in the country - so next time you go for a home loan, Valuation Exchange could be involved somewhere along the line.
What's even more amazing:
  • It's written in PHP, not .NET or Java - and banks are impressed!
  • It's reasonably standards friendly (XHTML + CSS means simpler, cleaner design)
  • We push Firefox as our main 'client' application. Entire companies are making the switch, just to work with our application...

If you're interested, apply now. Put some thought into writing your cover letter too - we want to know about what you can do, where you've done it before, and what you think you can offer us. Don't hide it in doublespeak, trying to impress us with large words - just be honest.

Thursday, August 31, 2006

Firefox 2.0b2 so close I can smell it...

So very close... Here!

Political Suicide By Hansard, Updated

The Criminal Code Amendment (Suicide Related Material Offences) Act 2005 is what is raising heckles, as far as I can gather.

To recap: the Hon. Sandra Kanck came out in state parliment and tried to demonstrate how stupid the amendment was. Then everyone kicked up a fuss.

Basically, the amendment says it's offense to have certain material and publish it on the internet. Here's a snippet from the actual amendment.

(3) To avoid doubt, a person is not guilty of an offence against subsection (1) merely because the person uses a carriage service to:

(a) engage in public discussion or debate about euthanasia or suicide; or

(b) advocate reform of the law relating to euthanasia or suicide;

if the person does not:

(c) intend to use the material concerned to counsel or incite committing or attempting to commit suicide; or

(d) intend that the material concerned be used by another person to counsel or incite committing or attempting to commit suicide.

(4) To avoid doubt, a person is not guilty of an offence against subsection (2) merely because the person uses a carriage service to:

(a) engage in public discussion or debate about euthanasia or suicide; or

(b) advocate reform of the law relating to euthanasia or suicide;

if the person does not:

(c) intend to use the material concerned to promote a method of committing suicide or provide instruction on a method of committing suicide; or

(d) intend that the material concerned be used by another person to promote a method of committing suicide or provide instruction on a method of committing suicide; or

(e) intend the material concerned to be used by another person to commit suicide.
Huh? What?! What Kanck said was protected by the very amendment itself! What the vultures said was 'shameful' is actually catered for in law!

That's awesome. One party, Kanck, doesn't like the law because it tries to prohibit information being free under certain circumstances, and the rest of the state government doesn't like the law because it allows people to get away with speaking freely about suicide in order to cause debate!