Categories
General

Using multiple public/private keys with ssh

To use multiple public/private keys with ssh, instead of having to specify which key you want to use for which host on the command line, you can create a $HOME/.ssh/config as such:

# Default Identity to use
IdentityFile ~/.ssh/id_rsa
# I create a different key-pair for each host
Host heroku.com
IdentityFile ~/.ssh/id_rsa-heroku
Host github.com
IdentityFile ~/.ssh/id_rsa-github
Categories
General

Why you shouldn't stay logged in to Facebook

Recently it’s become more common for websites to use Facebook to handle the comments on their website. Personally, it creeps me out when I go to some random website and I see my Facebook profile picture on the page. Then, I thought, well if they have my Facebook profile pic on their page, could they have any other information about me?
I decided to see if there was a way to block this behavior and found this link (https://www.facebook.com/help/?faq=17093) in the Facebook help system. Okay, so Facebook says the website in question doesn’t receive any information about you *unless* you decide to use the Facebook feature on their site, whether it’s the Like button or a comment, or etc. So everything is fine right?
No it’s not.
While Facebook isn’t sharing information about you to the website you’re on, Facebook themselves are able to see what website and page you’re on (https://www.facebook.com/help/?faq=17512). Do you really think that Facebook should be privy to every site you visit?
I don’t. It’s none of Facebook’s business what other sites I visit unless I explicitly decide to share that information with Facebook.
And that is why I will make sure to leave the “Keep me logged in” check box cleared, and log out of Facebook when I’m not using it.

Categories
General

Clearance + Rspec + Shoulda

To get the shoulda macros that clearance provides working in your controller specs, use:

in your ‘spec_helper.rb’.