Wednesday, February 8, 2017

Installing a Comodo Wildcard SSL Certificate in HAProxy

Should be straight-forward, but it wasn't...

Create a .pem file by concatenating the following into a single file, in this order:

  1. Server Certificate
  2. Server Private Key
  3. Intermediate Certificate 1 (COMODORSADomainValidationSecureServerCA.crt)
  4. Intermediate Certificate 2 (COMODORSAAddTrustCA.crt)
  5. Root Certificate (AddTrustExternalCARoot.crt)
Name that file something appropriate and then reference it on your "bind" command in your haproxy.cfg file, a la:

frontend https
     mode http
     bind :443 ssl cert /full/path/to/your/.pem/file/star.pem

Wednesday, April 9, 2014

Installing OpenTSDB 2.0 "next" on an HBase cluster in Amazon's ElasticMapReduce (EMR) Service

The remainder of this post will assume you've already gotten an HBase cluster installed on EMR.

Note:  This is not intended as an endorsement of either the performance nor the cost-effectiveness of using EMR to back your OpenTSDB deployment.  Rather, there are definite use cases for being able to quickly bring up a cluster and install OpenTSDB on it, so if you have one of those, this should get it done.


  1. ssh to the master server in your cluster.  If you took the defaults when creating your cluster, you can identify the master in the console by the name of the security group, which will be either ElasticMapReduce-Master or ElasticMapReduce-Slave:

         
    ssh -i nameOfYourKeyPair.pem hadoop@emrMasterPublicDnsName
  2. telnet to the local zookeeper port to make sure zookeeper is installed and running, e.g.:

         telnet localhost 2181and you should see:

         Trying 127.0.0.1...
      Connected to localhost.
      Escape character is '^]'.which means your telnet was successful.  Now enter:
      stats
    and you should see:

       Zookeeper version: 3.4.5-1392090, built 09/30/12 17:52 GMT
       Clients:
        /10.XXX.XXX.XXX:50333[1](queued=0,recved=4048,sent=4048)
        /10.XXX.XXX.XXX:50360[1](queued=0,recved=4052,sent=4052)
        /127.0.0.1:37169[0](queued=0,recved=1,sent=0)
        /10.XXX.XXX.XXX:50343[1](queued=0,recved=12209,sent=12212)
        /10.XXX.XXX.XXX:50331[1](queued=0,recved=4053,sent=4054)
        /10.XXX.XXX.XXX:45165[1](queued=0,recved=12174,sent=12175)
        /10.XXX.XXX.XXX:45160[1](queued=0,recved=4079,sent=4087)
        /10.XXX.XXX.XXX:50350[1](queued=0,recved=4259,sent=4260)
        /10.XXX.XXX.XXX:45168[1](queued=0,recved=12174,sent=12175)
        /10.XXX.XXX.XXX:36065[1](queued=0,recved=4057,sent=4057)
        /10.XXX.XXX.XXX:50336[1](queued=0,recved=8114,sent=8114)
        /10.XXX.XXX.XXX:50332[1](queued=0,recved=4051,sent=4051)
        /10.XXX.XXX.XXX:50335[1](queued=0,recved=4140,sent=4153)
        /10.XXX.XXX.XXX:50337[1](queued=0,recved=20258,sent=24309)
        /10.XXX.XXX.XXX:36062[1](queued=0,recved=4077,sent=4085)

       Latency min/avg/max: 0/1/206
       Received: 101746
       Sent: 105832
       Connections: 15
       Outstanding: 0
       Zxid: 0x1ff1
       Mode: standalone
       Node count: 34
       Connection closed by foreign host.

    So far, so good.
  3. Install git:

         sudo yum install git
  4. In the directory above the location you'd like to have the OpenTSDB repo live, run:
         git clone https://github.com/OpenTSDB/opentsdb.git
  5. To build OpenTSDB, we need to add some more basic dev tools to the base system.  The following command is the nuclear option for adding dev tools:
         sudo yum groupinstall 'Development Tools'
  6. And we also need gnuplot:

         sudo yum install gnuplot
  7. Change directory into the directory containing OpenTSDB:
         cd opentsdb
  8. Pull all of the branches from github:
         git fetch
  9. Checkout "next":
         git checkout next
  10. Now you've got the right code and the right tools.  Let 'er rip!:
         ./build.sh
  11. When complete, change directory into the build directory:
         cd ./build
  12. To verify success, you're looking for the .jar file created by the build process.  In this case, we've built a file named tsdb-2.0.0.jar and a script named tsdb.
         ls tsdb*
  13. And with that, we now have OpenTSDB built and ready to install.  To install it, run:
    sudo make install

  14. Now we'll create the required tables in HBase (with compression).  The good folks at OpenTSDB made this easy by providing a script that does the heavy lifting for us.  By default, this script will enable compression for your HBase tables.  First we'll change directory to the location of the script, then execute it:

    cd ../src

    ./create_table.sh 


  15.  With the tables created, we can configure the OpenTSDB process by editing the opentsdb.conf file and moving it into a place that the process can find it:

    vi ./opentsdb.conf

    and give appropriate values to the following variables (safe recommendations noted in italics, but you should provide answers appropriate for your system/configuration):

    tsd.http.cachedir = /dev/shm/tsdtsd.http.staticroot = /home/hadoop/opentsdb/tsd.storage.hbase.zk_quorum = localhost
     and move the file to a recognized configuration directory:

    sudo mv ./opentsdb.conf /etc  



  16.  Now that you're fully configured, you can start OpenTSDB:

    cd ..

    ./build/tsdb tsd 


  17. You now have OpenTSDB running and receiving requests (both telnet and HTTP!) on port 4242 (assuming you took the defaults)

Sunday, March 9, 2014

How I Learned to Stop Worrying and Love Daylight Savings Time

I woke up on this, the ugliest calendar-imposed-lack-of-sleep mornings feeling great.  No -- even better than that.  I'm going with "excellent".  And I was commiserating with friends last night about how this "spring forward" things sucks.  And despite that, I accidentally stumbled into the secret combination to make "losing an hour sleep" work for you.

First, sleep in.  Get a little extra sleep over your typical workday.  Since I've been getting about 5 hours sleep a night (or less) for the past many months, getting more than this wasn't a problem.  I've also been trying to sleep in a little on the weekends to make up for particular arduous, sleep-deprived weekdays.  I ended up getting about 9 hours last night, which was a critical part of this whole "feeling good in the AM" thing.

Second, get an Internet-connected alarm clock.  A smartphone will work here, but I happen to use a now-discontinued-and-out-of-business Chumby.  This is important for two reasons:

  1. You never have to go through the depressing "I've got to set my clock forward and this is going to suck in the morning" ritual right before falling asleep, and 
  2. When you wake up in the morning and look at your clock, you think you've gotten even more sleep than you expected because it automatically reset the time when it was supposed to.  Having a poor memory doesn't hurt here at all.

So about two hours after I woke up, my oldest started making his way around the house resetting clocks, and wasn't until then that I remembered I'd lost an hour, but I was already up, productive, and feeling good before it could slow me down.  And now I'm pumped that I beat Daylight Savings Time!

A good night's sleep FTW!

Friday, December 20, 2013

Exporting GarageBand Tracks for Use in Other DAW Software

This post is basically just a digested form of the information in the following article:


Create the AIF Tracks:

  1. Turn on Track Lock buttons:
    • Track -> Show Track Lock, or Cmd-Option-L
  2. Lock all tracks.
  3. Hit "Play".
  4. When the "Locking Tracks..." dialog clears, the files have been created.

Access the AIF Tracks:

  1. Open Finder.
  2. Go to Music -> GarageBand.
  3. Cmd-Click or Right-Click on your projects .band file.
  4. Select Show Package Contents.
  5. Open the folder named Freeze Files.
  6. The .aif files you see are the complete tracks from your GarageBand project.  AIF is not a compressed format, so these files will be big.  Copy them to a location of your choice.
    • Note:  This is a temporary file location for GarageBand and these files will be overwritten or deleted.  You must make a copy of them if you wish to use these versions.
  7. Enjoy.

Sunday, November 3, 2013

Senior Citizen Discounts

I grabbed this from a Facebook post.  I have no idea if these are real or not, but in the off chance that they are, I've saved them.

If you find that any of these are incorrect or invalid, please let me know and I'll update accordingly.


RESTAURANTS


  • Applebee's: 15% off with Golden Apple Card (60+)
  • Arby's: 10% off ( 55 +)
  • Ben & Jerry's: 10% off (60+)
  • Bennigan's: discount varies by location (60+)
  • Bob's Big Boy: discount varies by location (60+)
  • Boston Market: 10% off (65+)
  • Burger King: 10% off (60+)
  • Chick-Fil-A: 10% off or free small drink or coffee ( 55+)
  • Chili's: 10% off ( 55+)
  • CiCi's Pizza: 10% off (60+)
  • Denny's: 10% off, 20% off for AARP members ( 55 +)
  • Dunkin' Donuts: 10% off or free coffee ( 55+)
  • Einstein's Bagels: 10% off baker's dozen of bagels (60+)
  • Fuddrucker's: 10% off any senior platter ( 55+)
  • Gatti's Pizza: 10% off (60+)
  • Golden Corral: 10% off (60+)
  • Hardee's: $0.33 beverages everyday (65+)
  • IHOP: 10% off ( 55+)
  • Jack in the Box: up to 20% off ( 55+)
  • KFC: free small drink with any meal ( 55+)
  • Krispy Kreme: 10% off ( 50+)
  • Long John Silver's: various discounts at locations ( 55+)
  • McDonald's: discounts on coffee everyday ( 55+)
  • Mrs. Fields: 10% off at participating locations (60+)
  • Shoney's: 10% off
  • Sonic: 10% off or free beverage (60+)
  • Steak 'n Shake: 10% off every Monday & Tuesday ( 50+)
  • Subway: 10% off (60+)
  • Sweet Tomatoes: 10% off (62+)
  • Taco Bell : 5% off; free beverages for seniors (65+)
  • TCBY: 10% off ( 55+)
  • Tea Room Cafe: 10% off ( 50+)
  • Village Inn: 10% off (60+)
  • Waffle House: 10% off every Monday (60+)
  • Wendy's: 10% off ( 55 +)
  • Whataburger: 10% off (62+)
  • White Castle: 10% off (62+)

RETAIL & APPAREL


  • Banana Republic: 30% off ( 50 +)
  • Bealls: 20% off first Tuesday of each month ( 50 +)
  • Belk's: 15% off first Tuesday of every month ( 55 +)
  • Big Lots: 30% off
  • Bon-Ton Department Stores: 15% off on senior discount days ( 55 +)
  • C.J. Banks: 10% off every Wednesday (50+)
  • Clarks : 10% off (62+)
  • Dress Barn: 20% off ( 55+)
  • Goodwill: 10% off one day a week (date varies by location)
  • Hallmark: 10% off one day a week (date varies by location)
  • Kmart: 40% off (Wednesdays only) ( 50+)
  • Kohl's: 15% off (60+)
  • Modell's Sporting Goods: 30% off
  • Rite Aid: 10% off on Tuesdays & 10% off prescriptions
  • Ross Stores: 10% off every Tuesday ( 55+)
  • The Salvation Army Thrift Stores: up to 50% off ( 55+)
  • Stein Mart: 20% off red dot/clearance items first Monday of every month ( 55 +)

GROCERY


  • Albertson's: 10% off first Wednesday of each month ( 55 +)
  • American Discount Stores: 10% off every Monday ( 50 +)
  • Compare Foods Supermarket: 10% off every Wednesday (60+)
  • DeCicco Family Markets: 5% off every Wednesday (60+)
  • Food Lion: 60% off every Monday (60+)
  • Fry's Supermarket: free Fry's VIP Club Membership & 10% off every Monday ( 55 +)
  • Great Valu Food Store: 5% off every Tuesday (60+)
  • Gristedes Supermarket: 10% off every Tuesday (60+)
  • Harris Teeter: 5% off every Tuesday (60+)
  • Hy-Vee: 5% off one day a week (date varies by location)
  • Kroger: 10% off (date varies by location)
  • Morton Williams Supermarket: 5% off every Tuesday (60+)
  • The Plant Shed: 10% off every Tuesday ( 50 +)
  • Publix: 15% off every Wednesday ( 55 +)
  • Rogers Marketplace: 5% off every Thursday (60+)
  • Uncle Guiseppe's Marketplace: 15% off (62+)

TRAVEL

Airlines:


  • Alaska Airlines: 50% off (65+)
  • American Airlines: various discounts for 50% off non-peak periods (Tuesdays - Thursdays) (62+)and up (call before booking for discount)
  • Continental Airlines: no initiation fee for Continental Presidents Club & special fares for select destinations
  • Southwest Airlines: various discounts for ages 65 and up (call before booking for discount)
  • United Airlines: various discounts for ages 65 and up (call before booking for discount)
  • U.S. Airways: various discounts for ages 65 and up (call before booking for discount)

Rail


  • Amtrak: 15% off (62+)

Bus


  • Greyhound: 15% off (62+)
  • Trailways Transportation System: various discounts for ages 50+

Car Rental


  • Alamo Car Rental: up to 25% off for AARP members
  • Avis: up to 25% off for AARP members
  • Budget Rental Cars: 40% off; up to 50% off for AARP members ( 50+)
  • Dollar Rent-A-Car: 10% off ( 50+) Enterprise Rent-A-Car: 5% off for AARP members Hertz: up to 25% off for AARP members
  • National Rent-A-Car: up to 30% off for AARP members

Overnight Accommodations


  • Holiday Inn: 20-40% off depending on location (62+)
  • Best Western: 40% off (55+)
  • Cambria Suites: 20%-30% off (60+)
  • Waldorf Astoria - NYC $5,000 off nightly rate for Presidential Suite (55 +)
  • Clarion Motels: 20%-30% off (60+)
  • Comfort Inn: 20%-30% off (60+)
  • Comfort Suites: 20%-30% off (60+)
  • Econo Lodge: 40% off (60+)
  • Hampton Inns & Suites: 40% off when booked 72 hours in advance
  • Hyatt Hotels: 25%-50% off (62+)
  • InterContinental Hotels Group: various discounts at all hotels (65+)
  • Mainstay Suites: 10% off with Mature Traveler's Discount (50+); 20%-30% off (60+)
  • Marriott Hotels: 25% off (62+)
  • Motel 6: Stay Free Sunday nights (60+)
  • Myrtle Beach Resort: 30% off ( 55 +)
  • Quality Inn: 40%-50% off (60+)
  • Rodeway Inn: 20%-30% off (60+)
  • Sleep Inn: 40% off (60+)

ACTIVITIES & ENTERTAINMENT 


  • AMC Theaters: up to 30% off ( 55 +)
  • Bally Total Fitness: $100 off memberships (62+)
  • Busch Gardens Tampa, FL: $13 off one-day tickets ( 50 +)
  • Carmike Cinemas: 35% off (65+)
  • Cinemark/Century Theaters: up to 35% off
  • Massage Envy - NYC 20% off all "Happy Endings" (62 +)
  • U.S. National Parks: $10 lifetime pass; 50% off additional services including camping (62+)
  • Regal Cinemas: 50% off Ripley's Believe it or Not: @ off one-day ticket ( 55 +)
  • SeaWorld, Orlando , FL : $3 off one-day tickets ( 50 +)

CELL PHONE DISCOUNTS


  • AT&T: Special Senior Nation 200 Plan $19.99/month (65+)
  • Jitterbug: $10/month cell phone service ( 50 +)
  • Verizon Wireless: Verizon Nationwide 65 Plus Plan $29.99/month (65+).

MISCELLANEOUS


  • Great Clips: $8 off hair cuts (60+)
  • Supercuts: $8 off haircuts (60+)

Lyrics and Chords for "Down By The Sea"

As performed by Quincy the Robot
in "The Beach Party at the Threshold of Hell"

Original Recording (YouTube) is in F#, so the Roman numerals below can be substituted as follows:
I = F# 
IV = B
V = C# 
III = A 
VII = E  
Enjoy!


Intro

I     V    I    V

Verse

I                         V                         IV     V
Lived on an island down by the sea,

I                                     V      IV   //
Ask yourself "Where else,

                           V
Would an island be?"
                           IV   V   //
Down by the sea.
                           IV   V  //
With you and me.
                           IV   V  //
Love so tenderly.
                                                   
Down by the sea.

Repeat Intro

Verse

When to the market down by the sea.
Ask yourself what I would buy
In a market by the sea
Maybe kiwis
Or orange-ees
Or appl-ees
Or kumquat-ees
But definitely goat's milk.

Bridge


III          VII          
Monkey see, monkey do
        IV                              I
As I go to the market with you.
III          VII
Monkey see, monkey do
            IV                  
As I'm lighting my fire and drinking my goat's milk.

Repeat Intro (and vamp out)

Wednesday, October 9, 2013

Facebook rant++: Open Letter to Speaker John Boehner

Speaker Boehner:

Do your job. You need to call for a vote on a "clean" budget bill IMMEDIATELY or resign. If you refuse to do so and continue your anti-government, un-Constitutional tactics to the point that the United States of America defaults on our debt, you should be tried for seditious conspiracy (18 U.S.C. § 2384), and I do not level this charge lightly. You are not only actively destroying the credibility of the US government, you stand to destroy the credit-worthiness of the United States of America and a significant portion of the amassed wealth of its citizens.

You refuse to call for a vote on a budget bill that will re-open the government based on your claims that it lacks the votes to pass. There are MANY sources that disagree with your math on this (see Doing the Math, below), but "your math" shouldn't matter. The government is shutdown due to lack of a viable budget bill being presented for a vote, and you, Speaker Boehner, are the one that can call for this vote. If there aren't the votes to pass this bill, fine, but give your fellow legislators a chance to do their job. This is obstructionism at its absolute worst.

I'll concede that I'm no Constitutional scholar, and since neither of us are attorneys, we'll each have our own layman's understanding of how it's supposed to work. But even so, the Constitution provides that any bills that involve "raising revenue" (such as a "budget bill") originate in the House of Representatives (Article 1, Section 7), which you control. Further, the Constitution also expressly burdens Congress with the duty "to pay the Debts and provide for the common Defence and general Welfare of the United States" (Article 1, Section 8). I don't think it's a huge stretch to think that if the Framers went to the trouble to think through both who's responsible for "raising revenues" and paying our debts that they considered that something that's relatively important. And is a government that is shut down (offering only critical services) yet costing taxpayers MORE in the process really contributing to the "general Welfare of the United States"?

Instead of doing your job, you choose to ignore the Constitution and resort to extortionist tactics to expand your powers beyond those bestowed upon your office by the Constitution. In so doing, you defiantly trample on the intentions of the Constitution and its Framers. You've chosen to turn your office and the execution of your duties into a political lever to claim a personal veto power over existing legislation. This incredible over-reach asserts a power that the Constitution affords NO ONE -- not even the President.  
As I said, I'm no Constitutional scholar, but I just can't imagine that somewhere in the Great Beyond the Framers of the Constitution are watching this debacle you've created and thinking, "Yeah. That's it. THAT'S how this is supposed to work." I'd suppose, instead, that they're with the rest of us and probably lining up behind your latest 11% Congressional approval rating, which is statistically a tie with the WORST APPROVAL RATING EVER FOR ANY CONGRESS. You must be proud.


As citizens of this great country with a vested interest in an operational government and sound economy, we must constantly measure the performance of our elected officials. And truthfully, your latest assessment doesn't look very good (the 11% approval rating aside, I'm specifically talking about your PERSONAL performance). Your refusal to call for a vote suggests that either:

a) the vote won't go the way you want it to, so you've decided to take the US (and possibly global) economy hostage to impose your will over the will of the people, or,
b) you are incapable or unwilling to execute the duties of your office.

I will happily give you the benefit of the doubt; I don't believe that the good people of southwestern Ohio managed to elect a total moron to 12 terms in the House of Representatives. But that, unfortunately, leaves us to assess your recent actions as incompetence, intransigence, or seditious conspiracy, which is defined by the U.S. Code, in part, as when "...two or more persons...conspire to...prevent, hinder, or delay the execution of any law of the United States". Of course, as a member of Congress, you are also exempted from arrest, save Treason, Felony or Breach of the Peace (Article 1, Section 6), but seditious conspiracy is a felony. This would qualify you and your Tea Party co-conspirators for fines and up to 20 years in prison. Honestly, that sounds about right, especially when these behaviors come from those sworn by oath to uphold the Constitution.

Now don't get me wrong -- I'm all for smaller government, but there are Constitutionally-provided mechanisms to achieve these goals. You cannot undo the collective work of government expansionists (like Reagan and G. W. Bush) overnight -- and you shouldn't try. Even if the will of the people was on your side, this is not the right course of action to accomplish your goals. Propose legislation that amends the current legislation you want to change and follow the process. Oh, and "following the process" also implies that you must live with the outcome. It seems you're not happy with the results of your MANY failed attempts to defund, delay, or otherwise undermine the Affordable Care Act, or we wouldn't be in this situation. Did you learn nothing from Newt Gingrich's GOP-led government shutdown(s) in 1995 (which you were party to), the resulting public backlash, and Gingrich's own acknowledgement that shutting down the government was his "single most avoidable mistake"? And seriously, there can't be anything enjoyable in letting political opportunists like Ted Cruz call the shots.

It's incomprehensible to me that you've learned nothing from history and shut down the government for purely political reasons. Then, coincidentally, that shut down puts us squarely on a trajectory that forces the world to wonder if the United States of America is about to default on its debts. You show no respect for this country, our Constitution, due process, or our international reputation, which, prior to now, I didn't think could be any worse. Your actions are counter to the interests of the United States and have squarely crossed into the territory of "high crimes and misdemeanors". 


THIS. MUST. STOP. NOW.

You are the Speaker of the House of Representatives of the United States of America. This is a leadership role -- one that has responsibilities beyond political boundaries and party lines. It's time to start LEADING. Your country is depending on you to do so. This has gone too far and you're the one empowered to end it. Stop the political infighting, step up, and get busy doing something to earn your $223K+ salary. You were the one that wanted this job -- now you need to do it. #doyourjob

Sincerely -

Shane O.


Doing the Math: 217 votes are required to pass a budget bill in the House of Representatives. 195 members of Congress have signed a document indicating they would support a "clean" budget bill, and 25 more have indicated verbally that they would support it as well. This means there are 220 votes to support it, 3 more than necessary to pass. You indicate that there aren't enough votes to pass, but offer no details or numbers.