Feb
26
2009
4

Adding Top Sites in Safari 4 Beta

Safari 4 beta was released just a few days ago, and I really like it so far.  The only issue I have run into so far is that there appears to be no way to add sites to the Top Sites list.  There it apparently a way to drag-and-drop, but I couldn’t get it working.  There is another way, and it turns out to be fairly simple.

First, open Finder and go to /Users/yourname/Library/Safari and open TopSites.plist.  This will bring up the Plist Editor with a Windows registry style database.  Under Root, there should be 3 subitems: BannedURLStrings, DisplayedSitesLastModified, and TopSites.  The first one stores any sites you have removed from the list by clicking the X in edit mode (to get to edit mode, click the edit button on the Top Sites page.  You can use it to pin and delete sites, but not add them).  DisplayedSitesLastModified probably stores when Safari last refreshed the images of each site.  TopSites stores the list of top sites, and this is the one we are interested in editing.

Each TopSite entry is a key in the format “Item #” where # is a number from 1 to however many sites you have and keeps track of the order in which sites display, and the type of each item is Dictionary.  The Plist Editor assigns the numbers for you (since the type is Array).  Under each item, there are 2-5 keys.  At the minimum, there is an entry for TopSiteTitle, which contains the title, and TopSiteURLString, which contains the URL (both String format).  If the site is pinned, it will have a Boolean value called TopSiteIsPinned set to true (checked).  If the site has a feed, it will have a String called TopSiteFeedURLString and a Boolean called IsUnread.

The easiest way to add a new Top Site is to select an existing site with the same number of keys as the one you want to add, then hit command+c to copy it, then select the item you want to add it after and hit command+v to paste.  Make sure you the item you want to add it after is collapsed or the new item will be pasted as a child of the item you selected.  Now, just edit the URL and title (though the title might be updated automatically), save the .plist, and you are done.

Plist Editor

Updates:

1. I did not realize that Property List Editor.app does not come with Leopard by default.  For me it is in /Developer/Applications/Utilities, so it was probably installed with Xcode.  You can download it by itself here from Apple.

2. There is a drag-and-drop way to add sites, but it only works if the Top Sites page is open in its own window.  I’m guessing that this is a bug because it makes adding items to Top Sites very non-obvious.

Written by admin in: Uncategorized |
Feb
07
2009
1

Homemade Laptop Lock

While researching laptop locks for my Mac, I read numerous reviews about them damaging the lock slot or being very easy to defeat.  I did not want to buy a lock that had the potential to damage my computer with normal use, so I started designing my own.

My first idea was a Bestbuy-style lock with a bar that holds the computer at the hinge, but it was going to be difficult to build since I would have to drill a hole in a 1/2″ metal rod.  After a few more drawings, I settled on this design.

Materials:
3 feet 1″ aluminum angle stock
3 feet 1″x1/8″ aluminum flat stock
1 2′X4′x1/2″ sheet of MDF
About 2 feet 3/16″ clear plastic tubing
15 #6×3/4″ machine screws
16 #6 nuts
1/4″ eye bolt
1/4″ washer
2 1/4″ nuts
3 “6 washers
6 feet of 3/16″ stainless steel cable
2 crimps to make loops in cable
2 padlocks
4 felt feet
Superglue
JB Weld Epoxy (NOT JB Kwik).  I actually used some specialized epoxy paste, but two quarts of it, the smallest size they sell, costs $65.  J-B Weld is, in my opinion, the best product that you can buy from a local hardware store for this application.
Red (permanent) thread locker

Tools Required:
Drill with various bits.  A drill press helps, but it isn’t necessary.
Hacksaw for cutting aluminum
Circular saw for cutting MDF
Optional: A Dremel for rounding nuts (more…)

Written by admin in: Uncategorized |
Jan
29
2009
0

Firefox 3.1 Beta 2

I know it has been out for a while, and beta 3 is expected any day now, but I finally installed Firefox 3.1 Beta 2 because I got tired of Firefox’s CPU use.  With 50 tabs open, Firefox 3.0 was using a constant 20 percent just sitting in the background.  Normally that wouldn’t be a big deal, but when I am running on battery power, every little bit counts.  I am happy to say that 3.1 Beta 2 uses noticeable less CPU power—12-15% with the same tabs open in the background.  Memory use is about 40Mb more, but that is not bad when the total memory is 260Mb.

One of the most anticipated features of Firefox 3.1 is Tracemonkey, the Javascript precompiler.  I did a quick benchmark, and Firefox 3.1 is 2.25x as fast as Safari 3 overall.  Of course, it is not a very fair comparison since Safari 4 should offer the same speed improvements.  I did not test Firefox 3.0 since I did not want to restart Firefox twice.  Subjectively, Digg and Gmail (both javascript-heavy sites) are noticeably faster.

The beta seems a bit buggy, but am assuming they will get it worked out by the final release.  So far, I have had issues with the download/upload path selector dialog box lagging terribly whenever I use it.  It also seems to be saving temporary files on my desktop when I open a file instead of saving it. (I know I should make sure these bugs are reported, but I don’t have time right now.)

Written by admin in: Uncategorized |
Dec
15
2008
0

How I hacked my paypal account

I tried to log into my ebay account to sell an old computer today, but I realized that I didn’t have my security key.  They have a reset form, but they didn’t have the right phone number on file, so it wouldn’t have worked.  I tried to reset it by logging into my paypal account.  Normally, that would have been a problem since my paypal account is also protected by the security key, but I know a way to bypass it.  I’m not going to say how I did it because I want paypal to pay me for finding a bug; I just have to write them a letter.

Once I was logged into Paypal, I tried deactivating the security key, then saying I forgot it, but ebay still asked for it when I tried to log in.

The ebay form for getting a temporary security code to login says to contact them if the phone number is incorrect, but that is basically impossible.  The only way to contact them is by email, and that takes 2 days.  I don’t have 2 days because I need to sell this computer before Christmas, and it’s probably already too late.  There is a phone number (search for ebay phone number), but they just tell you to go to their website, which is not helpful.  To make things worse, if you try to email them, they make you log in.  I had to make a second ebay account to send them an email.

Next  I tried calling Paypal customer service to see if they could deactivate the security key in me eba account, and although they were very helpful, they could not really do anything for me because it was an ebay issue.  They tried, though.  The representative helping me talked to their “specialist” to see if there was anything they could do.  She even told me it is very hard to get ahold of ebay because they do not have a customer service phone number, and live help was not available at the time.

The ebay phone number and the lady at paypal both mentioned live help.  I couldn’t find anything on ebay about it, so I searched for it.  Sure enough, the first result was ebay live help.  After waiting about a minute for a representative, all I had to do was verify some information in my account, and they were able to deactivate the security key.

Overall the process was extremely difficult for something that provides dubious security (I was able to bypass it on my Paypal account).  If you ever need to contact ebay, good luck.  It is definitely not easy!

Written by admin in: Uncategorized |
Dec
11
2008
0

Renaming Files

I had a folder with a bunch of pictures I wanted to rename, a fairly common problem.  I searched for a file renamer for Mac, and the first thing I tried ended up being a 10 day trial.  Why does every little tool have to cost money for macs?  So instead of looking for a free renamer (I know they exist), I wrote a simple script.  I have no experience with Bash, so it took me a while to make it work, but at least I learned something.  The only problem right now is that the script doesn’t add leading zeros, so file 100 shows up before file 20.

This was my first time writing a script in Bash, but it seems like more trouble than it is woth.  Next time I think I’ll use PHP or Python or something.  Overall, writing the script was a lot more satisfying than downloading a program to do the work for me.  I still wouldn’t want to be a programmer for a living, though.

Written by admin in: Uncategorized |
Dec
09
2008
0

On the Cutting Edge

I got tired of waiting for the new Nvidia driver to be added to the 8.10 repositories, so today I upgraded to 9.04 (Jaunty) alpha 1.  The desktop has already crashed twice with the new driver but at least I can read my blog and have compiz effects enabled at the same time.  I just have to rely on Firefox’s session saving a little more.

I probably won’t install any updates for a while (maybe until 9.04 is released) because I learned my lesson with Firefox 3 beta, which kept getting worse with each subsequent beta until just before it was officially released.

Written by admin in: Uncategorized |
Nov
24
2008
0

Installing Ubuntu on my Mac (Software)

I am still working on setting up all the packages the way I like.  Usually, the first thing I do on any Ubuntu installation is get rid of the ugly brown/orange theme.  I did that this time (changed the theme to Clearlooks and the login window to Happy Gnome with browser), but I left the desktop background for now.  I actually kind of like it because it looks like it is meant to be brown (not like titlebars, which should never be brown/orange).  Eventually, I’d like to change the boot screen/loading bar to the Kubuntu one since I like blue a lot better than brown/orange.

Next, I turned on some transparency to give the OS a more modern look.  I made both taskbars (“panels”) mostly transparent (right-click–> properties–> background–> solid color then move the slider).  Next, I made the terminal window white on black and maybe 50% transparent.

After that, I went into add/remove programs and removed some stuff I don’t need, like Xsane (I don’t have a scanner), Orca (I have no need for a screen reader/magnifier), and the Ubuntu Firefox plugin.  I also added random stuff like Qcad, gparted, the Macromedia Flash plugin (found under all availible applications), PPracer (an entertaining penguin racing game), and Advanced Desktop Effects Settings (lets you configure Compiz).

As I was writing this, I discovered that Firefox/Xorg/Nvidia has a huge bug that freezes everything when I try to scroll a page with a static background image in Firefox, like this page for example.  It looks like I might have to wait for an update to the Nvidia driver since the troubleshooting steps on their website made Xorg not start (I hate Xorg).  I have the Nvidia-restricted driver disabled for now, and while the lack of Compiz is OK, I mis ppracer.  Another workaround is to turn off page styles in Firefox.  Go to View–>Page Style–>No Page Style and sites will be useable but not pretty

Update: It looks like the version 180 of the Nvidia-restricted driver should fix the Firefox problem (and do cool stuff like accelerate HD video playback more).  It’s in beta right now, but hopefully they add it to the official repository soon.

Written by admin in: Uncategorized |
Nov
17
2008
0

Installing Ubuntu on my Mac (Hardware Issues)

I have been waiting to install Linux on my Macbook Pro for a while, but since I had a bootcamp partition I could not do so easily.  Now that I do not need Windows in bootcamp for a while (I still have it as a VMWare image), I can finally install Linux easily.

First, I installed Kubuntu 8.10 because I wanted to see what all the hype about KDE4 was about.  KDE4 was nice, but I was disappointed by Kubuntu in general.  It doesn’t seem to have everything that plain Ubuntu has, like all the easy tools for configuration.  Next, I tried an OpenSUSE 11.1 beta 5 live CD (to get KDE4.1), but I couldn’t get the NVIDIA drivers working easily, and I didn’t feel like messing with it.  I considered Fedora 10 Preview (again, for KDE4.1), but my experience is that it is always good to wait a few months before trying the latest Fedora version since a lot of RPMs depend on certain versions and will not run on newer versions.  Maybe I’ll try it in VMWare when it is officially released.

In the end, I went back to Ubuntu 8.10 even though I don’t particularly like Ubuntu.  I have to say that I am very happy with this release.  Even though not a lot has changed since 8.04, it seems like they spent their time on getting everything to work well.  Installation was easy, and after I installed restricted drivers or my video card and wireless card, both of those are working well.  There were still some odd things I had to do to get it working well on my Mac, though.

The first problem was that the brightness controls did not work.  Looking at the screen nearly gave me a headache it was so bright.  Luckily, it is a simple fix:

Edit /etc/modules (in the terminal, type sudo gedit /etc/modules then enter your password) and add mbp_nvidia_bl on a new line at the end (make sure to save it).

The next problem was the color profile.  My MBP’s LCD looks terrible using any kind of default profile, so I have been using a calibrated profile I found online (search Mac forums with your monitor’s ID to find a profile for your LCD).  To get Ubuntu to load it, I am using xcalib.  The first step is to install it:
sudo apt-get install xcalib
Next, you need to get it to run on startup.  To do that, I went to System–>Preferences–>Sessions and clicked add.  Name it whatever you want, and for command, enter xcalib /pathtoyourprofile (for example, xcalib /home/matt/Desktop/Spyder2express2.2.icc)
This will load it after you log in.  I am still working on figuring out how to get it to load sooner so the login screen does not look bad.

The next thing to configure was my bluetooth mouse.  For some reason, it would not connect to the mouse after rebooting unless I removed and readded the mouse.  I don’t know what I did, but it works now.  By the way, Fn+F12 (AKA F12 on a normal keyboard) will bring up the context menu if you need to right click on something before you get the mouse working.

Finally, I had to get sound working.  To do so, edit /etc/modprobe.d/options and add options snd_hda_intel model=mbp3 at the end.

One more thing-Ubuntu is not one of the choices if I hold Option when I boot up, so I have to use rEFIt.  Since I do not want to install rEFIt yet, I am using it on a CD that does show up in the boot menu.  Eventually, I will try to get everything to work more seamlessly, but this is good enough for now.

That’s all the hardware issues I have encountered so far.  It’s too bad it still takes so much manual configuration–I was hoping to just install Ubuntu and have everything work.  I am really writing this for my own reference because it took a bit of work to figure everything out, and there is no way I will remember everything I did if I have to reinstall, but I am also posting it to help anyone who may encounter the same issues.

Written by admin in: Uncategorized |
Oct
05
2008
0

Peltier Junction

I got a tiny box in the mail today that came all the way from China.  Inside are my two peltier junctions for the candle-powered iPod charger project.  The first thing I did when I unpacked them was to hook one of them up to a battery.  Sure enough, one side got a little cold, and one side got warm.  Cool!  Next, I tried two AA batteries instead of one, and the temperature difference was a lot more noticeable.  I don’t have any big power supplies with me right now, but after a quick calculation, I realized that I could use the power supply for my 4 port USB hub (rated for 5V 2A) without shorting it out.  the temperature difference was even greater at 5V, but after about a minute, the hot side could not dissipate heat fast enough, and the cold side started getting steadily hotter.  I’m not going to try the full 12V until I get some heatsinks.  I also have to check the resistance because it’s possible that at 12V the device will draw more than the maximum rated current (3A).

Since I only need one peltier for the iPod charger project, I am thinking about using the other one to make a cooler that will stay cold in the car or outside when powered by a 12V battery.  I could get a cheap styrofoam cooler, then attach two heatsinks with fans to the peltier.  The only issue is that I am not sure if a single 43W peltier will keep a styrofaom cooler cold enough to be useful.  I wouldn’t want to spend money building it only to discover that I have a box that stays at a comfortable but useless (for food) 60 degrees.

Written by admin in: Uncategorized |
Sep
25
2008
0

Comments!

Comments are now enabled.  Feel free to comment.

Written by admin in: Uncategorized |

Powered by WordPress | ©2008 Matt