Category Archives: Tech

new mac Flash player breaks most click-to-copy share links

A couple of days ago I noticed that the click-to-copy-to-clipboard share links at Skitch’s site stopped working. I thought it was because of MultiClutch, a program that gives you multi-touch inputs to all Cocoa programs, I wanted to be able to use 3-finger swipes left and right to navigate back and forward in Firefox. I uninstalled that and the input manager it came with and the click-to-copy links still didn’t work. So I think about it more, and since I know how these click-to-copy links work pretty well, I know that most of them depends on Flash to copy to clipboard, and then it occurred to me that I had upgraded Flash to version 10.

I then downgraded it back to version 9 and the click-to-copy links now all work again. 🙂 So if you’re googling the same problem, check your Flash version (about:plugins), and see if it’s version 10, if so, downgrade it back to 9.

Rails plugin/helper to provide “click to copy text field” (to clipboard)

You often see sites with text fields of share links in various different formats, like Skitch provides links to share the images you skitch, they look like this:

Skitch.com > andrewng > Energy Saver
Uploaded with plasq‘s Skitch!

You often click the text box or a copy button next to it and the content is copied to your clipboard so you can paste it into a tweet, a blog or forum post and what not.

I needed something like this for one of my projects, it is pretty easy to do, and there are things you can use to do this. However there isn’t a super simple way to do this in Rails, maybe it’s so simple that nobody bothered to publish a plugin. Well, just for kicks I’ve created a plugin that lets you do exactly this by using a cilick_to_copy_text_field_tag helper in your views. This plugin requires jQuery or jRails, neither of which is part of standard Rails, but they are pretty easy to add to any Rails project.

The plugin is hosted here: http://github.com/ayn/click_to_copy_text_field/tree/master, the README pretty much tells all you need to know to use it.

Initial impressions of new MacBook Pro

Apple - MacBook Pro
Uploaded with plasq‘s Skitch!

Broke down and walked out from the San Francisco Apple store with a new MacBook Pro, I definitely do not need an upgrade, I got my MBP this Jan. But the unibody is just too sexy, and I have to send in my MBP for repair and I absolutely cannot live without my laptop for a week, so getting a new one allows me to send the old one in for some cosmetic repair (free of charge by Apple), and then I can sell it on eBay. I went with the 2.53GHz version as I do want more memory, bigger hard drive, larger L2 cache.

By now I’m sure you’ve all read the specs countless times and know what the differences are on paper, here are some things you probably won’t find by reading the specs:

  • the keyboard is LOUD, it is much louder than the gapless keyboard on the last generation MBPs and the PowerBooks.
  • the keys of the keyboard has a slight “play”, overall the keyboard doesn’t feel as solid as the Apple Bluetooth or the slim USB keyboards, I actually might even prefer the keyboard on the plastic MacBook to this one. Keep in mind that the machine is only a few hours old so things like this might change with more usage.
  • the glass trackpad is great, it feels better than a used MBP/PB trackpad, but again I’m not sure how it would feel a couple months from now, according to Apple it is supposed to stay this way because of the new material and processes used
  • the machine runs quite a bit cooler, they keyboard and the palm rests don’t feel hot like my old MBP (it is 2 generations old, the last MBP with the old-style keyboard layout).
  • even though the fans run at around the same speed as my old MBP (at around 2k rpm), they are a lot nosier. I could hardly hear the fans on my old MBP at 2k rpm, but I can DEFINITELY hear them on this new one.
  • speed of normal usage (web, mail.app, etc) and web development feels about the same, I fired up Bridge and CS3 and it is a bit snappier.
  • Migration Wizard was able to copy almost everything over, including the stuff in /opt (MacPorts stuff mostly, including my Rails setup). I had to however re-install X Code and Passenger again manually.
  • I would prefer a matte screen but the glossy screen is okay so far, we’ll see how much I hate/like it during the day tomorrow.

Overall I am pretty happy with it. I’m gonna drop off my old MBP at the store to get the top deck replaced, when I get it back it will pretty much be a brand spanking new MBP. Let me know if you want to buy it!

Using Phusion Passenger in Facebook apps development

Ray pointed me to a RailsCast on how to use Passenger for local development, it literally took me 2 minutes to setup. If you work on multiple Ruby on Rails applications, you should definitely do it.

There is however one problem on this approach, since the default passenger.pref config relies on virtual host, you can’t really setup SSH port forward to forward something to one of the virtual hosts, and this is important as this is how most of us develop Facebook applications locally. To get Passenger and Rails Facebook apps to work, you have to:

  • open up httpd.conf ask Apache to listen to another port:
Listen 81
  • add another named virtual host, here I’m adding port *.81:
<IfModule passenger_module>
  NameVirtualHost *:80
  NameVirtualHost *:81
  Include /private/etc/apache2/passenger_pane_vhosts/*.conf
</IfModule>
  • In the configuration for that Facebook app, change it to respond to all traffic on the new port (81 in this case):
<VirtualHost *:81>
  ServerName app_name.local
  DocumentRoot "/Users/ayn/work/app_name/public"
  RailsEnv development
  RailsAllowModRewrite off
  <directory "/Users/ayn/work/app_name/public">
    Order allow,deny
    Allow from all
  </directory>
</VirtualHost>

Now you can setup your tunnel to forward to localhost (or 127.0.0.1 if you use SSHKeychain) port 81 and it should work. Add more ports if you work on multiple Facebook apps at the same time.

I *need* one of these

Well not quite coz I don?t have the space in SF, but if I did, man, this looks so cool? 🙂



Well it?s actually not all that useful coz when I?m on a multi-hour Skype voice call I am usually also on iChat screen sharing or at least doing work at the same time so I need to be handsfree, but this sure looks damn cool.

The solid walnut and brass PAPPA*PHONE mixes old and new with profound simplicity. This luxury phone, hand crafted in Montreal Canada works as a Skype phone with MAC + PC (via the USB adaptor included)

* – Plugs directly into MAC + PC
* – Plug-and-play, no need for software installation
* – Works with all VoIP services (Skype, iChat, GoogleTalk, Vonage, Yahoo, etc.)
* – Handset Cord Length 1.5 metres
* – Original Design by HULGER, handmade by Furni of Montreal

Each phone is handmade to order. This takes 6 to 8 weeks after the order is
placed. Standard delivery times, of 5 days to 2 weeks depending on location,
apply thereafter.

[From HULGER US]