Category Archives: Coding

AWS EC2 Reserved Instance Auditing

If you’re running instances atop AWS, you’re probably at least bleeding money. If you don’t know what reserved instances are and/or aren’t using them, you are hemorrhaging money. One of the worst parts of AWS billing, is that they don’t … Continue reading

Posted in Architecture, Coding, Work | Tagged , | Leave a comment

CopyFS Update

Years ago I added features to CopyFS 1.0, then 1.0.1 came out and I never bothered to forward-port my changes. After spending some time moving, merging, rebasing, etc. in git this morning, CopyFS 1.3.1M is CopyFS 1.0.1 + CopyFS 1.3M. … Continue reading

Posted in Coding, Linuxy | Tagged , , , | 2 Comments

Ruby Hash Extensions

As I mentioned before, one of the nice things about Ruby is its malleability. Here are a couple extensions to the Ruby Hash object: class ::Hash def random return self.keys[rand(self.size)] end def byValue(subKey) if subKey self.sort_by {|key, value| value[subKey]}.reverse else … Continue reading

Posted in Coding, Linuxy | Tagged | Leave a comment

Ruby 2 From Source on CentOS 6.4

Ruby‘s autoconf doesn’t alert you to the fact that your system doesn’t have everything it could use. It’ll blindly clear you even though, for example, nothing crypto-related will work. On a fresh CentOS 6.4 install (with EPEL) the following will … Continue reading

Posted in Coding, Linuxy, Work | Tagged , , | 2 Comments

Which Oar Best Rows The Boat

Ted Dzuiba wrote a post that boiled down to identifying his own “language bigotry” as a step along the way to software engineering “Mastery”. He’s absolutely correct about introspecting why one chooses to “fight” other languages. And by saying “languages” I could … Continue reading

Posted in Architecture, Coding, Life, Opinions | Tagged , , , , | Leave a comment

Ruby String.each

While I find Ruby to be a half-assed attempt at an object-oriented Perl, I have been using it quite a bit lately to stay consistent with a lot of existing intellectual property. One of the more maddening things is that … Continue reading

Posted in Coding, Linuxy, Rants/Tirades | Tagged , | 1 Comment

NConf 1.3.0 Pass-through HTTPD Auth

If you’d like to use NConf, but want your HTTPD, e.g. Apache, to do the auth for it, apply the below patch to set the NConf user to the currently authenticated user. — include/head.php.orig    2012-04-03 19:34:13.774594705 +0000 +++ include/head.php    2012-04-03 … Continue reading

Posted in Coding, Linuxy, Work | Leave a comment

find -delete

If I hear one more person recommend using a pipe to xargs or -exec rm -f {}  to the question “how can I make ‘find’ delete the files it finds?” I’m going to scream. It’s really simple: find /wherever -mtime … Continue reading

Posted in Coding, Rants/Tirades, Work | Tagged , | Leave a comment

Caching Functions In Perl

Synopsis There are occasions, where you write a function that takes some parameters and outputs consistentish data. Example: sub add { my($first,$second)=@_; return $first + $second; } If you call add(1,1) you get 2: always. Consistent input yields consistent output. … Continue reading

Posted in Architecture, Coding, Linuxy | Tagged | Leave a comment

Sorting Strings Ending In Numbers In Perl

Synopsis I deal with a lot of names that look like “somedumbserver2” and “somedumbserver15”. Using Perl’s default sort, “somedumbserver2” comes before “somedumbserver15” because the character “2” is greater than the character “1”, and that’s where the sort stops.  This sort, … Continue reading

Posted in Coding, Linuxy | Tagged , , | 1 Comment