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"

Friday, February 05, 2010

Ruby Multithreading with a Thread Size Limit

I wrote this class in the process of writing a multithreaded Amazon S3 key migrator. S3 doesn't like that, so don't even bother.

You will want to use this with a thread-safe process block.

Tuesday, January 19, 2010

My .irbrc Ruby irb and Rails console configuration

Here is my customized configuration file for Ruby irb and Rails console. You will need to install the wirble and hirb gems for full functionality.

Monday, January 18, 2010

Compile FFMPEG from Source with x264 Support

Here are my notes for compiling FFMPEG from source with x264 and Xvid/DivX support on Ubuntu 9.10 Karmic Koala.

Your milage may vary!!!

Friday, October 30, 2009

Change Default JVM on OSX

If you install the Java 1.6 JRE on OSX Leopard 10.5 and want to make it default:

open /Applications/Utilities/Java\ Preferences.app

Saturday, October 24, 2009

Giving Up on Windows 7

For some wonderful reason, Windows 7 takes eight minutes to boot on my desktop machine. This is an Intel Core2Quad with 4GB of RAM. Not a speed demon, but no slouch. I have been in *Nix land too long and can't figure out what hardware is stalling the boot process. Horrifically frustrating.

I am not used to not being able to figure things out, but I have reached the point of not caring anymore. Windows is just a game platform for me and I get real work done in Linux or OSX.

Windows XP will play Left4Dead just fine.

Tuesday, September 22, 2009

Set Default Terminal Size in Gnome

This was difficult to find. You CAN set the default size of Gnome Terminal. The following instructions apply to Ubuntu 9.04, so your milage may vary:

Open /usr/share/vte/termcap/xterm:
sudo gedit /usr/share/vte/termcap/xterm
Find the line containing :co#80:it#8:li#24:\ (line 10 in Ubunto 9.04)
Replace the 80 with desired column width, and 24 with the desired row height.
Save and close all terminals.

Sunday, August 30, 2009

Lone Star Ruby Conference 2009

I must say that the conference this year was amazing. This is the first time I have been to a Ruby conference. Though I could have easily learned any of the subjects presented myself, the insight and enthusiasm from the speakers gave me better ideas for implementation and more excitement to actually do something.

I have been inspired and now I want to give a talk next year.

I am still stoked from the experience.

Sunday, August 16, 2009

De-Interlace Video in AcidRip

To enable deinterlacing of video when converting DVD video with AcidRip, add the following to the "Post Filters" field under the "Video" tab: "pp=lb"

Saturday, August 01, 2009

Apple Exploits




Hackers are having a seeming field day with Apple products. Between the Apple Keyboard Firmware hack, the Intel processor firmware hack (this one is OS agnostic), and the iPhone SMS hack it's a bad day to be an Apple fanboy or user.



I'll stick to doing my online banking on my Linux machine.

Sunday, July 19, 2009

Must Read Book for Web Developers

Today I got my copy of Programming Collective Intelligence and I wish I had bought this book back when it came out. In my day job, I am developing mostly social networking type sites, and I could have saved days of hair pulling.

Some days it seems as if I am just writing the same old "dumb" web-sites, and I never really understood how other programmers integrated the massive amounts of data we collect every day into a usable and actionable form, both for user and stake-holder. I figured it involved complicated maths that I either don't remember or never took (dotcom college dropout here). Tobey Segaran puts data mining concepts into readable English and sample code.

I never post book reviews, but I am only 3 chapters in, and I love it.

Monday, June 22, 2009

Adium won't connect to Yahoo Messenger

Do you have Yahoo Messenger connection problems with Adium or Pidgin.  The Adium 1.4 beta fixes the issue.  beta.adium.im

More here.

Wednesday, June 10, 2009

View Contents of SSL CSR

openssl req -text -noout -in host.csr

Monday, May 25, 2009

Pushing to a Gitosis Git Repo for the first time

git push origin master:refs/heads/master