Category Archives: Tech

Flip Ultra and easy way to make Mac icons from images

So we got a Flip Ultra, when you plug it into the USB port it shows up with an ugly default USB drive icon in the desktop. I wanted to change it to a picture of the Flip Ultra itself. I googled on how to make Mac icons and found this post. It involves using either a PS plugin or Icongrapher. I tried that and it was a bit too much work to just make an icon.

It then occurred to me that I can just look at the info (?-I) on any image file, clip on the icon in the File Info dialog, ?-C that, go to the File Info dialog of thing I want to change the icon for, and ?-P to paste that in. Real simple!

FLIPVIDEO Info
Uploaded with plasq‘s Skitch!

Now I should really make that image transparent so it looks better. We love the Flip btw, super easy to use, quality is pretty damn good too. If you get one use one of these links…

😉

(your RSS readers might not show embedded iframes so see the post in the browser if you don’t see anything)

MySpace / OpenSocial makeRequest examples

I just refactored some of my MySpace code this afternoon, to contact an outside server from an OpenSocial app you have to use the makeRequest call, here’s how my makeRequest wrapper looks like:

function makeRequestWrapper(target, callback) {
  try {
    var server_base_url = "http://dev-host.yourdomain.com/myspace"
    var params = {
      METHOD : 'GET',
      AUTHORIZATION : gadgets.io.AuthorizationType.SIGNED
    };
    gadgets.io.makeRequest(server_base_url + target, callback, params)
  } catch(er) {
    console.log(er.message);
  }
}

Here’s how you call this from the MySpace canvas surface:

function submitForm() {
  makeRequestWrapper(
    "/form_submit?" + $("#user_info_form").formSerialize(),
    function (data) {
      submitFormCallback(gadgets.json.parse(data.text));
    }
  )
}

In the userFormCallBack method, you can access the JSON object as arg.foo.

Method to perform makeRequest from the home and profile surfaces (I have no idea why they are different, but this works):

function retrieveHistory() {
  makeRequestWrapper("/show_history",
    function (data) { displayHistory(data); }
  )
}

Notice here you don’t need use data.text like you have to in the canvas surface. I found out that MySpace ignores the request type, on canvas it always returns a JSON object and if your server endpoint returns a JSON encoded object (like with render :json => my_hash.to_json in Rails ), it is stored in data.text, so you have to parse that with gadget.json.parse() to get another JSON object. On the home and profile surfaces it always returns HTML, you can parse the data as it (no need to use data.text), or you can just display the html returned with something like $(“div#blah”).html(data), if you use jQuery.

Flickr Leech beta is live

I like it, I’ve visiting flickrleech to check out the Interestingness stream at least once a day for years, it’s also a great way to check out anyone’s Flickr stream… The new version’s beta just came out:

Flickr Leech beta is live! (by AndrewNg.com)

I prefer the original version for its usage of square thumbnails, but found out I can get it back from the preference pane:


Much better:

Flickr Leech beta (square thumbs) (by AndrewNg.com)
Check it out at beta.flickrleech.net

BusySync 2.0 Beta

I’ve been looking for a simple way to sync and share multiple calendars between iCal and GCal, BusySync 2.0 just went beta and I gave it a try. It’s almost there, a major problem is that I can only sync with one Google account. A lot of us have at least two – a personal one and a work one (with Google apps for domains), I have 3 of them (I don’t use my personal one but would probably use it if it makes syncing calendars easier, I know I can create multiple calendars per account and share private feeds so I can use a single account to work with the other accounts but I will stress that simple is the goal here).

I actually haven’t tested out the syncing part thoroughly, so far I’ve done what I would call subscribing, will make some appointments on both iCal and GCal later to see how it well handles them.

The other slight problem is that it’s 20 bucks and I need a license on each computer, I need at least 2 and 40 bucks for syncing calendars is quite a bit IMO… I don’t have the time for it or I’ll write it myself, I’m sure it’s non-trivial though, coz it’s been forever since gCal came out and there still isn’t something that works well. What I used to do is to subscribe to a private feed and make modifications on GCal only, so my iCal has an read-only view.

For syncing info between my Mac and my Treo Missing Sync works extremely well, the Blackberry version works well also.The guys at Mark/Space seems to understand syncing really well, maybe they should write an ical/gcal sync.

New MacBook Pros get dissected, look like old MacBook Pros – Engadget

I couldn’t wait for the update to come out as I badly needed a new laptop, also didn’t want to set everything up twice at the new job. (though next time Migration Wizard might actually work)

The changes to the MacBook Pro are minor but nice, not enough to get me to eBay this one for it. I could use the bigger hard drive so my iTunes lossless library would actually fit on my laptop, faster and more efficient processor (45nm!) with new SSE4 instructions, better battery life, and better graphics performance will be nice for Photoshop work. I don’t really care for MultiTouch myself, I’d much rather get a Wacom tablet. I read that Intel will update the Santa Rosa platform with Montevina in June, might upgrade it then. 🙂

We’d love to tell you that during AnandTech’s dissection of the “new” MacBook Pros they made a shocking discovery about the internals of the systems that brought into light significant changes and / or upgrades to the computers. We’d like nothing more then to say that it appears Apple has completely reworked the architecture of these machines to be harder, better, faster, and stronger. But honestly? They’re exactly the same as the old models, save for those little Penryns, and as a result, kind of boring. Don’t believe us? Take a look at the photos — you’ll see.

[From New MacBook Pros get dissected, look like old MacBook Pros – Engadget]

using Quicksilver to get TinyURL

If you use Twitter you probably use TinyURL to shorten your URLs pretty often, I looked into doing this with Quicksilver, there are a couple of blog posts that show you how to do it, but none of them I really liked. One even said it was crap himself in the beginning of the post.

What I really want is this:

  • I would copy the URL I want to shorten to my OS X clipboard
  • I run something in Quicksilver
  • The clipboard will be updated with the shortened URL

This turned out to be extremely easy to do. Here’s a Ruby script that does exactly that. If you make the script executable, Quicksilver should include it in its catalog. So just copy a long URL into your clipboard (?-C), invoke Quicksilver, type the filename (I just type “tiny”), and wola, your clipboard will have the TinyURL so you can paste (?-V) it into wherever.

#!/usr/bin/env ruby
require 'net/http'
require 'uri'

def shorten(url)
  Net::HTTP.get_response(URI.parse("http://tinyurl.com/api-create.php?url=#{url}")).body
end

IO.popen('pbcopy', 'w').puts "#{shorten(IO.popen('pbpaste', 'r+').read)}"

beta fbml tag for autocomplete

When I wrote my last app at OnMyList I had to roll my own autocomplete/typeahead feature with FBJS, I was looking at Preload FQL and found out last Dec they added a beta Typeahead tag, I tried it out with the FBML test console and it works great.

It’s def worthwhile to check out their beta features.

oh btw, this Typeahead is static, which means there is no way to ask it to do an ajax call to get results dynamically. I’m sure they’ll have an Ajax-Typeahead at some point…

mouse gestures in Firefox and drag-and-drop

In Firefox, you can drag any images to the desktop or anywhere in Finder and it will download it. I turned on Mouse Gestures, and with that on, dragging of the mouse starts a gesture and won’t trigger the default action. To get both gestures and drag-and-drop to work with the left button, i.e., just one finger touching the trackpad, I switched from Mouse Gesture to All-in-One Gestures, and configured it like this:

Now navigation gestures as well as drag-n-drop work perfect.