1. GMail can handle MAILTO links, it’s simple

    It’s extremely frustrating when I click a mailto link and Mail.app starts to open. This is one of the most annoying things on my Mac (which I otherwise adore).

    But I just found a way to make GMail in Chrome handle mail links…

    1. Open a GMail tab
    2. [from that GMail tab] Open a javascript console with CMD-OPTION-J and paste in the following:
      • navigator.registerProtocolHandler('mailto', 'https://mail.google.com/mail/?extsrc=mailto&url=%s', 'Gmail');
    3. Hit enter and accept the popup in your browser.

    :-]

    Will you be my code-valentine, Chrome?

     

    tags:  mailto  chrome 

    Comments
  2. Jobs, IBM, middle finger.
Good for him.

    Jobs, IBM, middle finger.

    Good for him.

    (Source: 10on10)

     

    tags:  steve jobs 

    Comments
  3. (Source: 10on10)

     
    Comments
  4. [8:26pm] • doyleRules this is the part of the day where we communicate by changing our nicks in irc
    [8:28pm] wick: I am going to tell you all a beautiful story.
    [8:28pm] wick is now known as Sean_John_Combs.
    [8:28pm] Sean_John_Combs is now known as Puff_Daddy.
    [8:29pm] Puff_Daddy is now known as P_Diddy.
    [8:29pm] P_Diddy is now known as Diddy.
    [8:29pm] • Diddy and that is the story of my name
    [8:29pm] Diddy is now known as wick.
    [8:30pm] • doyleRules wishes Tumblr had an IRC post option
    — 

    I love this team.  Was going to write a longer post about our launch of TouchPlay today and how awesome the team is that put it together.  Instead, you get a little glimpse into our IRC.

    If you find that snippet funny and want to code and/or design Shelby.tv, please get in touch.  If you don’t find it funny, you’re normal.  If you don’t find it funny, but you want to, come join one of the greatest teams on Earth.

     
    Comments
  5. Getting Rails SSL right on Nginx w/ Passenger

    400 Bad Request

    The plain HTTP request was sent to HTTPS port

    It bugged me for an entire day.  ”Please send HTTPS stuff to HTTPS and I’ll be perfectly happy,” said nginx.  ”Fuck you, I do what I want,” said the oAuth callback from Twitter.  So I started digging…

    Maybe I could just tell nginx to re-direct the request.  It knows what it wants; it should be able to satisfy itself…

    error_page 497 https://$host$request_uri;

    Nope.  But if this did work, it would only treat a symptom, not the problem itself.

    So I needed to find out *why* the oAuth callback_url was being set to “http://shelby.tv:443” instead of “https://shelby.tv”.  A little digging into OmniAuth and I found the full_host method which ultimately makes this determination based on request.url.  An additional line of logging and I discovered that reqeust.url had the http scheme, not https.

    I’m running Rails w/ Passenger on nginx.  But nginx likes to keeps secrets from Rails (specifically, it doesn’t let on about SSL).  So you just ask nginx to let Rails in on the secret and boom, everything “just works” (thanks to the excellent work on the Rails core team and OmniAuth, behind the scenes).

    passenger_set_cgi_param HTTP_X_FORWARDED_PROTO https;

    That’s it.  Threw that one liner into my ssl-enabled server{} block and Rails’ request.url was fixed, allowing OmniAuth correctly built the callback_url.  :-]

    —-

    FYI: I spent almost a full day researching this problem (to no avail), during which time I learned a shit tonne about these technologies and code bases.  I then made a smart move: document my progress and go home.  Came in the next morning and hit the fix in 20 minutes.  

    Work is a much better version of school.

     

    tags:  nginx  ssl  passenger  omniauth 

    Comments
  6. An Engineers Laptop

    I’m bringing a new lappy online completely fresh (as my last one was stolen) and setting up my dev environment.  It’s nice to get a clean start, a blank system, without all the crud that builds up around apps you’ve stopped using.  So, here’s a running list of the bigger things I set up:

    Chrome Dev Channel - I’m not stable, why would I want a browser that is?

    XCode - Apple should install this by default.

    rvm - The lightweight and perfectly powerful Ruby Version Manager.  Don’t run Ruby without it.

    git - I’ve gotten into a good habit of habitually branching and pushing my branches to github regularly.  This means ~0 lines of code were lost in the burglary.

    Spice up your shell prompt for git (~/.bash_profile):

    And why not add some color (~/.gitconfig):

    TextMate - Although vim doesn’t kill you, it doesn’t make you stronger.  TextMate works really well, makes it easy to read/write/navigate code, and it’s keyboard shortcuts are now muscle memory for me.

    AckMate - Better full-project search than TextMate’s built in grep.  Also updated my ~/.ackrc file for some additional filetypes I want searched.

    Javascript Lint - Automatically link my js files on save in TextMate.  This isn’t the bundle I used to use, but so far it seems okay (does require you to install node.js).

    iStat Menus - To know what my system is doing with a quick glance.  Love this thing (and glad I was able to find my old serial number).

    Colloquy - b/c Shelby <3 IRC

    F.lux - Warms up my screens at night.  The cool blue of my anti-glare screen is fine during the day.  But at night it seriously causes eye/brain hurt.

    Backblaze - Yep, I’ve been backing up for years, rationalizing that “$50/year will seem super cheap when I lose all my data.”  Most of my work is in the cloud, but most of my personal stuff is on Backblaze.  It helped take the sting out of the loss.

    Dropbox - Pretty good for communicating with consultants.  I would prefer github for everything like this, but git isn’t for everybody.  And in theory, I can use dropbox on my iPhone/iPad to view some stuff (I haven’t, yet).

    OS X Settings

    • Trackpad: tap-to-click
    • Keyboard: fast key repeat w/ short delay (I get really annoyed using computers that don’t have this set)
    • Terminal: “pro” scheme
    • N.B. holding down the command key, you can drag items in the menu bar.

    And finally, Vagrant, for a virtualized Shelby dev environment.  It’s really nice to just download a box, run a couple of scripts, and Shelby is up and ready for hacking.  

    Beware; vagrant has more than it’s fair share of land mines.  One of our newest engineers recently tackled this project, so watch the Shelby blog for an informative and useful guide to vagrant in the coming weeks.

    That’s all for now.  I’ll update this if I left anything important out.

     
    Comments
  7. i would take such good care of a loch ness pet monster

    i would take such good care of a loch ness pet monster

    (Source: nsf56k)

     
    Comments
  8. I don’t often fight the status quo, but I always ignore it.
    — Spinoza
     
    Comments
  9. The Count on #censoredshelby is amazing… /via onshelby Nick Ruffilo http://shel.tv/tN2GCz

     

    tags:  shelby.tv 

    Comments
  10. blog comments powered by Disqus