Wednesday, April 09, 2014

Updating Phusion Passenger to Mitigate the Heartbleed Bug

Install Passenger/Nginx with Heartbleed Mitigation

The following steps may be taken to mitigate the OpenSSL vulnerability.
Compile the heartbleeder vulnerability tester
Locally:
$ brew install go # Mac only
$ mkdir -p ~/Code/go
$ export GOPATH=$HOME/Code/go
$ cd $GOPATH
$ go get github.com/titanous/heartbleeder
$ go build heartbleeder
$ bin/heartbleeder example.com

Update Passenger/Nginx

On your servers:
$ gem update passenger
$ export EXTRA_CXXFLAGS="-DOPENSSL_NO_HEARTBEATS"
$ export EXTRA_CFLAGS="-DOPENSSL_NO_HEARTBEATS"
$ passenger-install-nginx-module
# Update your nginx.conf with the new Passenger path
# Restart your nginx processes

Check your https web servers

$ bin/heartbleeder example.com
Author: Patrick Morgan (patrick -at- patrick-morgan.net)
License: Creative Commons. Distribute Freely!

Friday, January 18, 2013

So which branch do I want to merge with?

You type git pull at the command line, then you get a message that says:
You asked me to pull without telling me which branch you want to merge with, and 'branch.master.merge' in your configuration file does not tell me, either. Please specify which branch you want to use on the command line and try again (e.g. 'git pull '). See git-pull(1) for details.
It goes on to say that you can make an addition to .git/cofig to correct the underlying issue.    I think that is too many keystrokes.   Use the handy git config command to make those changes for you:
git config branch.master.remote origin
git config branch.master.merge refs/heads/master
This is probably going to happen again, so lets add a git alias:
git config --global alias.fixmaster \
    '!git config branch.master.remote origin && \
    git config branch.master.merge refs/heads/master'
Now if you get this error again, just type git fixmaster.

Friday, April 06, 2012

Pest Control in Austin

I just finished deploying my father-in-law's pest control business site. If you have a bug problem in the Austin area, please consider BC Pest Control.  Bruce has decades of experience and has kept my home and lawn bug-free for several years now (especially the spiders and fleas!).

For you developers out there, Heroku and Sintra are a great match for small commercial web sites.

Tuesday, January 18, 2011

Netbeans Won't Debug Rails Project

If the Netbeans says it "can't contact the web server" when running "Debug Project" there is likely an issue with the debug gems that the IDE installs itself. To correct this problem:
  1. Exit Netbeans
  2. $ gem uninstall linecache
  3. $ gem uninstall ruby-debug-base
  4. $ gem uninstall ruby-debug-ide
  5. $ gem install ruby-debug-ide
  6. Start Netbeans, and "Debug Project"

Please note that I am using MRI (native Ruby), not JRuby.
  • Netbeans 6.9.1 (Linux)
  • ruby 1.8.7 (2010-12-23 patchlevel 330) [x86_64-linux]
  • RubyGems 1.4.1
  • linecache (0.43)
  • ruby-debug-base (0.10.4)
  • ruby-debug-ide (0.4.16)

Saturday, December 11, 2010

Per Host SSH Key Configuration

You can automatically specify an SSH private key, via local configuration, when connecting to SSH hosts. This is especially helpful when using Git to connect to multiple repositories which require different SSH keys.

On a Unix client (or compatible shell such as cygwin, Xming, or msysgit ), create/modify ~/.ssh/config
Host HOSTNAME_OR_IP
IdentityFile ~/.ssh/OTHER_ID_RSA

Wednesday, June 16, 2010

How to Enable Aero on Windows 7 N


To enable the Aero UI enhancements in Windows 7, you must "rate" your computer using the Performance Information and Tools panel. If you receive the error: "This system does not have the necessary multi-media support to run the requested assessment", you may not have Windows Media Player installed (especially if you are running Windows 7 N). Download and install Windows Media Player at http://www.microsoft.com/windows/windowsmedia/download/AllDownloads.aspx and try again.

Tuesday, March 02, 2010

Convert a Hash to a Query String or Parameter String

I Rails, to convert a Hash object into a query string or parameter string for use in a url:

opts = {:a => 1, :b => 2}
params = ActionController::Routing::Route.new.build_query_string(opts)

Params => "?a=1&b=2"