Jalepeno Tunafish

This recipe is packed with protein and very fast to throw together.  I like this recipe after a good walk/run, though I find this digests really fast and probably goes best with some carbohydrates for me.  Some crackers or one piece of whole wheat bread or toast fits perfectly.

  • 1 can of tuna
  • 1 tablespoon of Mayo (to taste, less is better)
  • 4-5 slices of a fresh jalapeno diced
  • sprinkle of salt and pepper

Mix these ingredients together and serve over a slice of bread or with some whole wheat crackers to be re-energized for several hours.  I prefer this recipe for dinner, when I’m craving a quick protein hit, 30-45 minutes after a workout.

Feel free to suggest alterations or suggestions to improve this recipe.

YMMV: This is a 240-300 calorie meal.

Posted in Personal, Recipes | Tagged | Leave a comment

Tmux is Awesome

Just wanted to drop a line to the tmux crew and say thank you.  I know terminal multiplexing has been around for a while, but never really caught the full benefit until tmux and the book over at The Pragmatic Bookshelf.  What’s most beneficial:

It allows me to switch gears really fast

I’m an engineer full time, I also happen to do a bunch of system administration.  When I was turned toward tmux, I wasn’t sure it would be worth the time.  In about 4 hours, I started seeing benefit, and after 2 days, I couldn’t go without it anymore.

For more on how I use it, I have two branches for my dotfiles; one’s for Mac, and ones for Linux.  Take a look at tmux.conf. It’s pretty straight forward VIM type replacements as the book suggested, maybe an addition or subtraction, but wow, what a book.

Posted in Personal | Leave a comment

Ruby Benchmark String Concat versus Array Join

I was reading about string concat in ruby and found the need to do some.  before I jumped in, I ran a benchmark that was fairly surprising.  Figured I’d share.


require 'benchmark'

n = 2000000

Benchmark.bm do |x|
 str1 = "astring"
 str2 = "anotherstr"
 x.report { for i in 1..n; a = str1 + "." + str2; end }
 x.report { for i in 1..n; a = "#{str1}.#{str2}"; end }
 x.report { for i in 1..n; a = [str1, str2].join("."); end }
 x.report { for i in 1..n; a = str1 << "." << str2; end }
end

Results:


user     system      total        real
 0.880000   0.000000   0.880000 (  0.888089)
 0.920000   0.000000   0.920000 (  0.929991)
 1.640000   0.010000   1.650000 (  1.641790)
 0.700000   0.010000   0.710000 (  0.716267)
Posted in Programming, Ruby | Leave a comment

Scss Sass Opacity Plugin

I was looking for a good cross-browser plugin up front.  Here’s what I found, which is a good sass mixin for opacity.  There is probably a syntax converter, but I don’t think(?) I have one installed.  I was looking for SCSS syntax, so I converted it:

Source of Original Sass Opacity Mixin

@mixin opacity($opacity, $hover_opacity: false) {
 opacity: $opacity / 100;
 -moz-opacity: $opacity / 100;
 -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=#{$opacity})";
 filter: "alpha(opacity=#{$opacity})";
 @if $hover_opacity {
 @include opacity-hover($hover_opacity);
 }
}

@mixin opacity-hover($opacity) {
 &:hover {
 @include opacity($opacity)
 }
}

Cheers!  Leave a comment if you find an issue in a browser or know a better way!

Posted in CSS, Programming, Rails, Ruby, SASS, Web | Leave a comment