Monthly Archives: June 2014

More sous vide ribs

Got a larger rack. Bagged with salt, pepper, brown sugar in the fridge on Sunday. Monday night, added soy, sherry, cider vinegar, garlic, red pepper flakes, and star anise and put into a 138F bath at 9:30 PM. The vinegar is a change from last time.

I cut the rack in half and put both halves in one 1 gallon ziploc bag (HEB store brand, actually).

I had planned on having these on Tuesday night, but there was a last-minute burger craving, so we went to Mickey’s Sliders instead. The ribs stayed at 138F for another day and we had them on Wednesday. I made another hoisin, ketchup, and sambal glaze and did two coats on each side under the broiler.

The ribs were more tender this time, with the meat falling off the bones as I sliced them. I actually like ribs both this way and how they came out last time where there’s a bit more resistance in a bite. Don’t know if the vinegar or the extra time was the difference. There wasn’t enough vinegar to impart a significant taste.


WordPress shortcode plugins with multiple instances

I’ve been working on the JSmol2wp plugin used in these previous posts. There have been a couple of challenges associated with putting multiple copies of the JSmol viewer applet in the same post, and in having multiple posts with viewers.

The WordPress shortcode API doesn’t provide an obvious way for a shortcode to know its position in a post. For most shortcodes, this doesn’t matter; they return content to WordPress to put in place of the shortcode. The reason it’s important for JSmol2wp (and perhaps to other plugin developers) is that JSmol2wp needs to assign each applet a unique identifier so that commands are channeled to the correct applet. Googling “wordpress shortcode multiple instances” reveals other developers having the same problem.

My solution(s)

Various versions of JSmol2wp used variations on the same solution based on the idea that knowing the integer value for which copy of the shortcode I had is valuable. In hindsight, there are two easier solutions:

  • create a unique id that does not depend on anything else, based on something like a timestamp or an md5 of various passed parameters
  • make the user encode the uniqueID (I don’t like this one, but I ended up having it available as a fallback

The solution I used is to pull the entire content of the post and search for the shortcode markup  using either string functions or regexes. The current version is clunky because I was not sure whether PCRE was causing problems for some installations.

$p = get_post();
# determine the instance if there are multiple copies
# of the shortcode in this post
# we want to do this without preg_match to work on different PHP versions
$m = explode('[jsmol', get_the_content());
foreach($m as $i => $match){
     $t = explode(']', $match);
     # there could be nested shortcodes or other shortcodes in the text
     # but trim off what is safe to trim off
     if(count($t) > 1){
        $match = implode(']]', $t);
     # odd bug requires recasting as a string to get stripos to work
     $match = (string)$match;
     # catenate the post_id to the instance to make the id unique
     # when displaying multiple posts per page
     if( ($acc == '' || stripos($match, $acc) > 0 ) &&
        ($caption == '' || stripos($match, $caption) > 0) &&
        ($fileURL == '' || stripos($match, $fileURL) > 0) &&
        ($isosurface == '' || stripos($match, $isosurface) > 0) &&
        ($id == '' || stripos($match, $id) > 0)
     ) $this->instance = $p->ID."_$i";

This would be better with the right regex, but my regex skills are not that good at thinking about how to handle the possibility of [ and ] inside the parameters passed by the shortcode, since these are legal characters in Jmol scripting.

Note that the unique id includes the post ID. This prevents clashes when multiple posts are displayed on a single page.


 # odd bug requires recasting as a string to get stripos to work
$match = (string)$match;

was to fix a problem where spaces in one of the parameters (caption) caused stripos to return false, even though var_dump showed $match was already a string.

Sous Vide Pork loin and glazed carrots

Previously I did a pork loin with a coffee-chocolate rub. It was so nice that I thought I’d get another pork roast and experiment with another variation. This time it’s 2.5 lbs and I used a pot for the brining step. Getting a later start means a much shorter brine:

  • 2.5 c kosher salt
  • 2.5 c maple syrup
  • 1 q water
  • Thyme, ginger, a crushed clove of garlic

Brining started at 12:45.

Side of glazed carrots

20140622-133434-48874502.jpg 20140622-133434-48874794.jpgWhile the brining was underway, I set up the Nomiku at 183F to make a side of glazed carrots. I modified the recipe by adding some fresh ginger.

  • Peeled carrots cut faux-tournee
  • Slices of fresh ginger
  • Butter
  • Salt
  • Sugar

In the past, the problem with doing vegetables has been outgassing causing the bags to float. I wrapped a couple of knives in plastic wrap and put them in the bottom of the bag as a weight. This turned out to be not enough weight, so I enlisted a potato masher to hold the bag under. Started at 1:30PM

Turned down the heat at 2:30 and pulled the carrots. Into the fridge. The knives meant I needed to use an elongated platter. Clearly, the submerging the vegetables methods need some refinement.

Back to the pork

After 2 hours of brining, bagged the pork while the bath was cooling down to 138F. Final adjustment of the temp downward was easy – I scooped out some of the hot water and added back tap water. Into the bath at 2:45PM. Worked in the garden and watched the USA-Portugal World Cup game (If only Michael Bradley doesn’t turn the ball over in stoppage time!).

Glazing, browning, serving

20140622-205136-75096471.jpgMade a glaze of

  • Maple syrup
  • Cider vineagar
  • Dijon mustard
  • Dash of Worcestershire sauce
  • Paprika
  • Pepper

Reduced over low heat until syrupy. Painted on the roast and caramelized under the broiler. Meanwhile, put the carrots in a saute pan and heated until the liquid boiled down to a glaze.  Added some parsley.

The liquid from the sous vide bag was used to dissolve the last bit of the glaze and a bit of the browned stuff from the broiler pan. This sauce was spooned onto the meat and some rice.

The pork was tasty and tender, and, as predicted, the maple-mustard glaze didn’t dominate the pork as much as the coffee/cocoa spice rub.  I think I might try butterflying a future roast to increase the surface area, though, to get more of the crusty browned parts. The carrots were excellent.

Sous Vide Lamb Shanks

The consensus of various posts seems to be 48 hours at 140-161F. But low end pictures all look a bit on the red side, so I’m going to up the temperature to 145. Started at about 8PM on Thursday night. Shanks were rubbed with olive oil, sprinkled with salt and pepper and put into a 1 gallon ziplock bag with a couple of sprigs of fresh thyme. I’ll update this post when I do more.

Dilute lamb stock

Got up Friday morning to find the water in the bath looking cloudy and the kitchen smelling like lamb soup. The bag had leaked overnight and was full of about quart of liquid. I think I made two mistakes:

  • Putting both shanks in one bag may have put too much stress on the bag
  • Not protecting the bag from the sharper parts of the protruding bones

I thought about how to deal with the second problem and ended up wrapping the ends with plastic wrap and securing it with twine. I put each shank in its own bag and returned them to 145F after changing the water twice.  I put the liquid from the bag into a pot to reduce.



Shanks come out of their bags


Meat pulled from the bones

Saturday things looked good. I pulled the shanks around 6:30 PM while I was roasting some brussel sprouts as a side dish. I browned the shanks a bit in a saute pan with olive oil. This was not entirely successful as I had some sticking to the pan. This might be better on the grill or under the broiler. I added the liquid from the bags to the pot of reduced rescued liquids and deglazed the pan. I added some mustard, tomato paste, and some dried oregano and parsley. This was because the jus was not very flavorful on its own.

Overall it was nice, but I think it needed something. First, this might be more of a cold-weather dish. It’s pretty rich. Second, I think it would be good with some additional spices in the bag. I use star anise when I braise oxtails. I bet that would work. Or perhaps I should have brined them first or seasoned more aggressively during the sous vide step. The shanks are thick enough that the surface seasoning at the end really doesn’t penetrate… the browned bits were more flavorful. I don’t think the leak made the flavors more dilute than they might have been, but it couldn’t have helped.

Yet more testing of JSmol2wp


This is a test of the isosurface capability using an xyz and jvxl file uploaded to WordPress media. Markup is: [jsmol acc='s_den.cub_' type='xyz' caption='Load local file' isosurface='s_den.cub_.jvxl']

Load local file


Linksys router speed problem solved

I was mystified at the painfully slow wifi I was getting at my mother’s house. She lives in Silicon Valley where decent speeds should be expected, but I was getting <1 kbps download on Weirder, the upload speed was 5-6 kbps. Via Google, this blog post explained the problem and solution, which is worse on Apple products. Changing one config setting increased the download more than 25x on my ipad.

More JSmol2wp testing

As of version 0.7, I wonder whether having two posts with viewers causes applet name clashes. The prediction is that this would work while viewing one post, but not on the home page. This prediction turned out to be true.

This first item loaded the first one from the next post, while the first item in the next post didn’t load. Should work now in 0.8

Load 1PRC


Load file from Henry Rzepa's blog



Testing JSmol2wp

lambda repressor headpiece


Last week we had a meeting to discuss enhancements for the department website. One thing that came up was the idea of better eye candy to highlight the research we are doing.  As a biochemistry department where many people are doing structures and structure-function studies, an obvious capability to add is a molecular graphics viewer. Fortunately, I had some experience through EcoliWiki with Robert Hanson’s Jmol project, which uses a Java Applet to embed viewers in websites.

Of course, the Jmol developers recognized several years ago that alternatives to Java were needed, especially for viewing molecules on phones and tablets that lack Java. As a Mac user, I also find Java to be problematic. So Jmol spawned a sister project: JSmol, based on javascript. Since I have some experience with writing WordPress plugins, I adapted JSmol for a plugin, which I call JSmol2wp.  Here’s what it looks like:

Dragging should rotate the model, which is embedded via a shortcode that passes a bunch of parameters, including the PDB accession, the caption, and code to create custom buttons and other interface elements. The buttons run Jmol scripts to select, zoom, recolor etc. The plugin detects multiple instances of the shortcode that creates the applets as long as they use different pdb accessions.

This is the structure of the CynR DNA binding domain from a local file


Sous vide chicken breast

We had some bone-in chicken breasts in the freezer that one of Debby’s sisters bought on a recent visit. These were pretty big chicken breasts and the three of us are not huge eaters, so we split one for dinner tonight. It was already in a zip-loc bag, so I thawed it in the fridge and then salted it in the bag last night. Today I added some freshly ground pepper, a pinch of dried tarragon, and about 2 Tb of butter. In at 142F at about 3PM. I picked the temp to be between Kenji Alt-Lopez’ recommended 140F and “if your family is queasy about slightly pink chicken “145F in the comments. Kenji discusses the role of time in killing off bacteria at the lower than FDA recommended temperatures.
Kenji recommends cooking bone-off, but I left the bone in not for any bone-in flavor myths, but just to have the bone cooked before I remove it and discard it. Because I seasoned the chicken just by opening the mouth of the bag and tossing things in (relying on exuded liquids to redistribute the seasonings), this was one less handling step. If I had done the bagging, I probably would have removed the bones before freezing.

Pulled it a bit before 7PM.  Put it under the broiler for a bit, but didn’t get the skin crisp; I probably could have left it in longer, but I didn’t want to dry it out. Served with roasted red potatoes and blanched asparagus. I liked this a bit better than the previous attempt at chicken at 140F, but the dry-brining might have also been a difference. The meat was tender and flavorful.

The thing I’m really liking as I use the Nomiku more is the convenience. The results are excellent, but I’ve also made very good conventional roast chicken, with much better crisped skin.  However, I can’t just leave the bird in the oven while I do other stuff or wait for Debby to finish walking the dog. The immersion circulator lets me start things much earlier and then finish them fast. Plus I can roast something else at the same time at a different temperature than I might have used. It’s like the appeal of a slow cooker, but with the ability to hit much lower internal temperatures.

And I think the crisped skin is solvable.

Sous vide spareribs

When I got the pork loin roast, I also picked up some spareribs. Wed night: dry-brined (which is a fancy way of saying I unwrapped the meat, sprinkled some salt and pepper on it, and put it back in the fridge.

Cooking times and temps

Sous Vide supreme site (baby back ribs)165F4-24 hours
Sous Vide Supreme blog143F48 hours
Anova160-176F12-48 hours
Follow me foodie140F48 hours
Christopher Cina (St. Louis style)144.572 hours
Nom Nom Paleo148F48 hours
Modernist Cuisine135-141F8-24 hours
food.com138F24-48 hours
A Canadian Foodie155F24 hours
Charlotte Julienne155F24 hours

There is also a NYT piece about making ribs w/o smoke

Time and temp is even more variable than for the loin roast. This reflects different styles of rib cookery, but generally the times are longer, which makes sense based on more connective tissue in the ribs. People seem to package the racks separately, and often have spice rubs/marinades applied before the sous vide step.

On Wed night I took the presalted ribs, cut them to fit into two 1 qt ziplocks, haphazardly threw in some soy, sherry, star anise, and brown sugar, and threw them into a 138F bath. I wasn’t as systematic about this as I should have been, as I was also thinking about a coding project and wanted to get them into the water bath before I became hypnotized by debugging javascript.


20140605-202239-73359384.jpg I took them out around 6:30PM today for a ~22 hour cook. The fragrance of the star anise was very nice as I opened the bags. I made a glaze by mixing hoisin sauce, ketchup, and sambal. Popped them in the broiler to set the glaze did two coats on each side and removed them when the glaze was just bubbling.

The ribs came out pretty much how I wanted. Tender but with a good bite, not falling off the bone. The star anise flavor and the other seasonings gave the meat a nice flavor and the glaze was really nice. Sweet, hot, and slightly acidic.

We saved the juices released by the ribs; the connective tissue gave it a nice gelatinous quality and the seasonings made it an interesting broth.