June, 2007


20
Jun 07

Google Analytics

I added google analytics to this site. It’s not because I want to see how many visitors are coming (I know, it’s not many) but because I’d like to see any searches that are leading here. The dreamhost web control panel isn’t all that exciting, and I don’t want to work too hard at getting stats.

Google analytics made it real easy to install, and I used a plugin from http://www.oratransplant.nl/uga/ to add a wordpress plugin, which just inserts the javascript at the top of every page. Now I get to see all the funky searches that people are using on the web, a little peep into peoples minds.


15
Jun 07

MacOS MySQL terminal tip

Desktop ClippingHere’s something that saves me time when I’m starting a new database and still testing PHP scripts which input to the database. I want to clear the database of all information, but don’t want to have to recreate the database structure. I just want a bare bones database with no content, so I can see exactly what information is going in and what information is getting messed up along the way.

I’m working in terminal. I write a series of commands to delete the contents of the tables I want cleared. Instead of pressing return each time, I separate them with a semicolon. Here’s an example:

delete from authors;delete from reports;delete from paper_authors; delete from journals;

This deletes all information from the four tables: authors, reports, paper_authors and journals.

Now I highlight the line, right up to the last semicolon, and drag it to the desktop to make a clipping. Next time I want to clear my db, I drag the clipping from the desktop onto the terminal window and press enter. Automagic.

You can do this with any command you want too, from ftp open commands to long folder names. Drag any folder onto the terminal window and the path shows up, saving lots of stubby fingers.

And for an extra bit of magic, look what happens when you drag a folder on a BBEdit or Textedit window. Useful for folders of mp3s.


12
Jun 07

Safari 3 makes my gmail slow

I downloaded the new safari beta 3 to see what it is like. I love the speed that it renders web pages, it’s definitely faster than firefox on mac. There’s still a lot missing though. The first thing I looked for was google chat in gmail, which has never been available for me in safari. It still isn’t there though, so I’ll have to keep using iChat for my gChat. The next thing I noticed was that gmail has started sputtering, taking forever to load the inbox, giving errors when trying to send mail, generally giving strange errors which I’ve never seen before.

The windows version was nice too, for speed at least. I don’t know what that funky big bar on top is like. Now it looks like an upside down imac. Big forehead browser.


11
Jun 07

Identifont identified the typeface in nymphomation

One of the sites which really make the internet great is Identifont. If you’re looking to find out what a particular typeface is, you can go there, answer a series of questions about the shapes of the letters, and it will give you your font. It gives a nice link to a place where you can buy it too, presumably where it’s making money from.
I was reading a little of Jeff Noon’s “nymphomation“, and thought that the font might be Futura. I went to the site, answered 22 questions such as..

“what shape is the tail on the capital Q?”
“is the dot on the i round or square?”

and found out that the typeface they use in my copy is “Avenir”, not Futura. Here’s the link to it.
Avenir


6
Jun 07

Google maps – embed a map in your page

When you get a new google map api, they give you some sample code to start with. If you want to put that code into it’s own page, with just the map, it’s easy enough. Just make a new page, paste the code in and save it. That’s what I did with my sample code. If you want to add that map to a page (like this page), you can use an iframe to do it. An iframe is just a html page embedded in another page, like a little window. So if I want to put this page:

http://nevan.net/maps/map.html

into this page

I can code it like this:

<iframe src="http://nevan.net/maps/map.html" style="width: 520px; height: 320px;"></iframe>

Here’s the result:

As a note, I gave the iframe 20 pixels more height and width to make up for margins and avoid scroll bars appearing.


6
Jun 07

Google Maps – very easy to add to my site

I just added google maps to my site, and it was much easier than I thought it would be. A while back, I tried to get google adsense, but found that you need content before they install it. Google maps is much easier, all they need is a website and directory where it’ll be used, and a google id. Here’s how to do it..

If you haven’t got a gmail account, go get one at http://gmail.com

Go to the google maps api page http://www.google.com/apis/maps/ and fill out the site and directory where you want to put maps. I put in http://nevan.net/maps/

You’ll get an api key which you can use in pages, and sample code, with a map centred on somewhere in America. Here’s what the code gives:

http://nevan.net/maps/map.html

In all, the whole thing only took 3 minutes. Next, it’s time to start learning how to change the maps.