Saturday, November 26, 2011

Fix unity after disabling in in Compiz

I thought I'd disable Unity in Compiz after a fresh install of Ubuntu 11.10. Alas, it's so ingrained in the system that it totally borks the UI. To fix this I created a terminal launcher on the desktop (as Ctrl-Alt-T and Alt-F2 didn't work any more) that looked like this:

#!/bin/sh   
gnome-terminal

Then selected the file's properties and set the execute bit to true. Then ran the file. This left me with an open terminal in which I then typed:

ccsm

This brought back unity and now the computer's back to a functional UI.

Now all I need to do is work out how to disable that damn sidebar that gets in the way more than it help...

Wednesday, November 2, 2011

Download the android source as a zip

Hmmm, the repo script doesn't appear to be working thanks to conflicting variables on the work set up. So to get a zip of the android source I went to http://rgruet.free.fr/public/ and downloaded the latest.

All the other google results were severely outdated.

Tuesday, July 12, 2011

Enable the location bar in nautilus ubuntu's file browser.

The more and more I sit with Ubuntu I find myself in gconf-editor doing things, whether it's adding the week to the time (handy in European workplaces), making the minimize maximize and close buttons sit in the correct corner with the correct order, or in this case get that location bar back.

So the steps:

$ gconf-editor

apps->nautilus->preferences->always_use_location_entry

You could do this in one line, but I'm sure there's a few other things in gconf-editor that will keep you busy.

Monday, July 11, 2011

BankID Ubuntu 10.04 64-bit

Ahhh the woes of a 64 bit machine bite again. I'm still Using Ubuntu 10.04 (I haven't seen anything worth upgrading for) so installing BankID isn't a problem as Swedbank's sucurity program has a Ubuntu distribution. But getting it to show up in Firefox is the step that they leave out of the instructions.

The missing line is:

$ nspluginwrapper -i /usr/local/lib/personal/libplugins.so

ns plugin wrapper wraps your 32 bit plugin so that your 64 bit machine can use it. After restarting your browser, in your Tools -> Addons -> Plugins you should see a Nexus entry which is your bank ID.

Now I don't need to switch back to windows for anything.

Thursday, June 16, 2011

Big Apple BBQ

Whilst in the US for a holiday we encountered the Big Apple BBQ Block Party. It was simply amazing. Two sides of Madison Square Park were filled with people barbequing, eating barbeque, and drooling while they queued for more barbeque.

After trying 3 bbq stands, I can far and away say that the the 17th Street Baby Back Ribs were the best thing I ate there. I think a whole lot of people agreed with me judging by the queue that had formed there on the second day of the event.

Since Sweden isn't known for it's barbeque, I thought I'd try and see if I could do ribs anything like the crew did on that day. I'm recording the recipe and lets hope I can get to it before winter sets in.

So this is what you need:

Ingredients


  • 1/2 cup paprika




  • 1/4 cup kosher salt, finely ground




  • 1/4 cup sugar




  • 2 tablespoons mustard powder




  • 1/4 cup chili powder




  • 1/4 cup ground cumin




  • 2 tablespoons ground black pepper




  • 1/4 cup granulated garlic




  • 2 tablespoons cayenne






  • Cooking Directions

    Mix all ingredients and store in a tightly covered container. To make it a little more hot and spicy, increase the mustard powder and black pepper to 1/2 cup each.
    Makes about 2 1/2 cups

    Ingredients


  • 1 cup ketchup (I use Hunt's)




  • 2/3 cup seasoned rice vinegar




  • 1/2 cup apple juice or cider




  • 1/4 cup apple cider vinegar




  • 1/2 cup packed brown sugar




  • 1/4 cup soy sauce or worcestershire sauce




  • 2 teaspoons prepared yellow mustard




  • 3/4 teaspoon garlic powder




  • 1/4 teaspoon ground white pepper




  • 1/4 teaspoon cayenne




  • 1/3 cup bacon bits, ground in a spice grinder




  • 1/3 cup peeled and grated apple




  • 1/3 cup grated onion




  • 2 teaspoons grated green bell pepper






  • Cooking Directions

    Combine the ketchup, rice vinegar, apple juice or cider, cider vinegar, brown sugar, soy sauce or worcestershire sauce, mustard, garlic powder, white pepper, cayenne, and bacon bits in a large saucepan. Bring to a boil over medium-high heat. Stir in the apple, onion, and bell pepper. Reduce the heat and simmer, uncovered, 10 to 15 minutes or until it thickens slightly. Stir it often. Allow to cool, then pour into sterilized glass bottles. A glass jar that used to contain mayonnaise or juice works real well. Refrigerate for up to 2 weeks.
    Makes 3 cups
    Variation: to make this sauce a little hotter, add more cayenne pepper to taste, approximately another 1/4 to 1/2 teaspoon. Be careful; a little cayenne goes a long way.


    This is how to cook them:

    People are mystified about how to cook ribs properly. I'm going to walk you through every step of the way as though you're using a basic charcoal grill. Obviously if you have different or more high-tech equipment, you'll need to modify these procedures. If you're setting up your backyard charcoal grill for indirect cooking, you'll want to use a disposable aluminum pan to capture the grease as the fat renders while cooking. Some people add water to this pan to add moisture to the cooking environment.
    Let me caution you right up front to mop the ribs with sauce no more than 10 minutes before you take them off the grill. Saucing the meat too early is a mistake many people make when smoking or grilling. Virtually all barbecue sauce contains sugar, and your meat will have a burned crust around the outside if you use sauce too soon in the process.
    Ribs are readily available in most grocery stores. When selecting ribs, try not to buy ones that weigh less than 2 pounds. A true baby back rib weighs about 1 1/4 to 1 1/2 pounds; they are very fragile and dry out quickly. This recipe calls for a meatier rib. A loin back rib is preferable; they're easier to cook, less fragile, and have more meat.
    Once you start smoking ribs, you can't leave the smoker unattended for any more than about 20 minutes. You'll need to continually check that the temperature in the grill remains between 200 and 210 degrees at all times. If it gets too hot, open the lid and allow some of the heat to escape. Coals that appear to be glowing red will cause a hot spot. Don't cook the ribs directly over the hot spot; move the ribs to a different, cooler part of the grill. If the temperature dips below 200 degrees, move the ribs to a hot spot for a while. If the temperature gets too low, add some more coals.
    You'll need about 4 cups of apple wood chips to be authentic; you can use hickory, pecan, sweet maple, or cherry, but the ribs won't taste as sweet. You'll also need a chimney starter or another small covered grill or bucket to keep extra hot coals.

    Note: this is all from Mike Mills.

    Ingredients


  • 4 racks of ribs (about 2 pounds each)



  • Magic Dust (click here for the recipe) or your favorite dry rub



  • 4 cups apple juice in a spray bottle



  • Apple City Barbecue Sauce (click here for the recipe) or your favorite barbecue sauce





  • Cooking Directions

    Trim any excess fat and remove the membrane from the back of the ribs.
    Sprinkle the ribs liberally with magic dust, coating both sides. Put them in a shallow pan or on a cookie sheet and cover them with clear plastic wrap or a lid. Refrigerate them until you're ready to use them. I recommend letting them marinate for at least an hour. At the restaurant, we dust the ribs up to a day in advance.
    Start your fire using royal oak charcoal.
    Soak the apple wood chips in water for half an hour. Drain.
    Remove the grate and arrange the medium-hot coals in a grill or smoker. If you are using a grill, it must have a lid. Set an aluminum pan next to the coals as a drip pan. Spread out the wet wood chips on the coals. Replace the rack, close the grill, and check the temperature. It should be between 200 and 210 degrees. If the temperature is too high, open the lid to allow some heat to escape.
    Notice that the meat on a rack of ribs is on the top. The bottom, where you removed the membrane, is called the "bone side." Once the temperature is steady, place the ribs on the rack, bone side down. You want to cook them bone side down as much as possible. Turning them dries out the meat. If necessary, you can cut the racks of ribs in half to comfortably fit your grill.
    Cover and smoke the ribs for about 4-6 hours or until the ribs are done and tender. This is not an exact science; we're not baking a cake.
    You'll want to check the ribs every 20 minutes or so. Examine them to see if the surface of the meat looks dry or moist. Ribs "sweat" about three times during the smoking process. The pores of the meat open, and this allows moisture to escape. This is when the seasoning from the dry rub and the smoke itself are reabsorbed into the meat. When they're sweating, mop or mist them with some apple juice and sprinkle them with a little more magic dust. Opening the lid will lower the temperature; add more coals and wood chips as needed to maintain the temperature.
    About 10 minutes before you remove the ribs from the pit, mop them with the sauce. When you take them off the pit, mop again with sauce and sprinkle some more magic dust on them. Serve immediately.
    Serves 4, or you can cut the racks in half to serve 8.
    Looking forward to trying all that - unfortunately I wont have the right grill, but we'll see what we can do.

    Sunday, January 2, 2011

    Rails 2.3.5 App adding Bundler on Heroku

    After staying up a little later than usual, I pushed the latest ASX value screener code to heroku - only for it to be rejected as now bundler was being used for everything. Bugger.

    If you are following the instructions on converting a 2.3.5 rails app to use bundler and you get an error like this:

    $ rake db:migrate --trace
    (in ...)
    ** Invoke db:migrate (first_time)
    ** Invoke environment (first_time)
    ** Execute environment
    rake aborted!
    uninitialized constant Rails::Boot::Bundler
    /usr/lib/ruby/gems/1.8/gems/activesupport-2.3.5/lib/active_support/dependencies.rb:105:in `const_missing'

    You have probably misspelt preinitialize.rb in your config directory. Correct it and ensure that it is added into your git and you will get rid of this error.

    Uploading to heroku was where the next trap lay in wait:

    $ git push heroku master
    Counting objects: 24, done.
    Delta compression using up to 2 threads.
    Compressing objects: 100% (17/17), done.
    Writing objects: 100% (17/17), 5.86 KiB, done.
    Total 17 (delta 12), reused 0 (delta 0)

    -----> Heroku receiving push
    -----> Rails app detected
    -----> Gemfile detected, running Bundler version 0.9.9
    -----> Bundler works best on the Bamboo stack.  Please migrate your app:
           http://docs.heroku.com/bamboo
           Unresolved dependencies detected; Installing...
           /usr/local/lib/ruby/1.8/yaml.rb:133:in `load': syntax error on line 2, col 8: `  specs:' (ArgumentError)
               from /usr/local/lib/ruby/1.8/yaml.rb:133:in `load'

    To avoid this, switch to the bamboo stack as recommended and bundler will work as expected.

    Eventually, site back up - off to bed.