Tuesday, January 5, 2010

Cranberry Sangria Jam

Cranberry Sangria Jam

  • 2 (12 or 16oz) bags of cranberries
  • 3 cups sugar
  • 2 oranges (zest & juice)
  • 1-2 limes (zest & juice)
  • Red wine (make sure it's something you'd drink!)
  • 1 pouch liquid pectin (optional)
Put the cranberries in a colander, give them a quick rinse and pick out any bad ones or stems.
In a large pot, put the cleaned cranberries.  Zest and juice the fruit into a large measuring device, and add enough wine to make around 2 1/2 cups total liquid.  Dump it into the pot.
Boil for about 6-8 minutes until a lot of the cranberries pop and are soft.  At this point, I decided I wanted more "jam" less whole berry, so I used my stick blender.
I've also been told that the cranberries have a lot of natural pectin and would probably thicken up on their own, but since I added the fruit juice and I wanted it definitely "jam" like, I added a pouch of liquid pectin (Certo) at the end and boiled it for one more minute before putting into jars.

Makes enough to fill seven 1/2 pint jars.

Friday, September 18, 2009

mod_rewrite Voodoo

Ok, so not quite so much voodoo yet... but I have other tweaks in mind for it, and they promise to be more fun.
Background:  I have a new short domain name (flw.bz) resolving to the same place my original domain does (flowbuzz.com).  I decided to keep my flw.bz files in a subfolder (/short).  Oh, and my domain/webserver is virtual (and I think shared). I'm using YOURLS at the moment to provide URL-shortening capability (yay!).
Problem: How to get requests for flw.bz/blahblah to resolve properly while maintaining functionality of Yourls, not ending up in a mod_rewrite endless loop, etc.?
Answer: I tweaked the code in the .htaccess file that came with Yourls to look like this:



RewriteEngine On
# this doesn't do anything for me due to way my server is set up, so I left it commented out
#RewriteBase /

# take anything that's coming in to flw.bz
# and if its not a real file or directory, map it to short/ subfolder
RewriteCond %{HTTP_HOST} ^flw.bz$ [NC]
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f
RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-d
RewriteRule ^(.*)$ short/$1

# if I've put flw.bz/ in front of another URL, shorten it like a bookmarklet
RewriteCond %{HTTP_HOST} ^flw.bz$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^/(http://|https://)(.*)$
RewriteRule ^(.*)$ flwbz/admin/index.php?u=%1%2 [L]

# take anything that's coming in to flw.bz
# and now that it's mapped to short subfolder,
# if it *still* isn't a file or directory send it to YOURLS
RewriteCond %{HTTP_HOST} ^flw.bz$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^short/([0-9A-Za-z]+)/?$ short/yourls-go.php?id=$1 [L]


I may continue to do some tweaks, and probably will write my own PHP catching page and just use the Yourls API page. But after many hours of glazed-eye fiddling with complex mod_rewrite rules, this turned out to work.
[edited to add http catching code]

Friday, June 12, 2009

Jalapeño Margarita Sorbet

Jalapeño Margarita Sorbet

  • 1 1/4 cups sugar
  • 1 1/2 cups water
  • 1 egg white
  • ~1/2 - 2/3 cup lime juice (4-6 limes)
  • lime zest (couple of limes worth)
  • 1/4 tequila
  • 1/4 triple sec
  • 3 jalapeño peppers, deseeded & deveined (use gloves!)

Puree the peppers & water well
Make the simple syrup: boil sugar & peppers/water for a minute or two then pull off the heat.
Beat the egg white, mix in the remaining ingredients (not the syrup yet)
Temper the lime/egg white mixture by adding a little bit at a time of the warm pepper syrup & mixing.
Mix everything, cool completely, then put in your ice cream maker.

This is really tasty... the peppers give it just a teensy bit of "wow" and some great flavor but nothing too overpowering. if you've done a good job deveining them.  I adapted this from a several different sorbet recipes online.  The egg white is supposed to help keep this smooth, creamy, and help it last a while in the freezer.  Not that this will stick around long enough :)

Thursday, April 16, 2009

Converting Entrust Certs

Just a quick tip -- you can convert the PKCS#7 certificates that Entrust exports in a binary format (*.p7c) to an ascii format *.PEM file:

C:\OpenSSL\bin>openssl pkcs7 -in c:\bens_cert.p7c -inform DER -outform PEM -out c:\bens_cert.pem

References:
http://forum.pgp.com/pgp/board/message?board.id=46&thread.id=1148
https://www.sipit.net/CertToolsInstructions

Friday, April 3, 2009

iPhone OCR

There are most likely several applications for the iPhone that already do some of what this idea covers, but probably none that can pull it all together.

With all the power of the cloud/grid/global-supercomputer available via web api's, why not tap further into it with our mobile devices?  I was thinking along these lines earlier in the shower, mulling over Amazon's announcement of the Hadoop/MapReduce service and... eureka!

The iPhone could use a nice optical character recognition system.  But something more than just basic OCR.  Most OCR systems are far from perfect.  Just like most speech-recognition systems aren't perfect.  But imagine, if you will, an application that combined the two.  If you were able to use the phone's camera as a real-time video-feed while you read along "out loud," and pushed a stripe of the video frames, audio data, and accelerometer data (as you move the phone along while reading) to the cloud, it could feasible do a very *very* nice job of text recognition.

But why leave it at that?  Since you're 70% of the way there, why not add 2D barcode processing?  And since those barcodes have embedded information (and often so does text), why not give the application some convenience features while we're at it?  If capturing a URL, it could offer to launch Safari, post it to Delicious, or tweet it via bit.ly.  Phone number handling would be obvious.  In fact any captured text snippets could be pushed to several applications on the phone (somehow?) or Web 2.0 services.   Tie in geolocation and you'd have a great idea of what people are reading where, perhaps making this monetizable (if aggregated anonymously, of course).

Facial recognition might be stretching it a bit, but not a thought that's completely unreasonable.  Tie it in to Facebook and wow...  (business card capturing, anyone?)

So there you go code monkeys.  Get to work :)  And since I'd love to see something like this, consider the idea public domain (duh, it's on a blog) and All Rights Released -- although I'd it would be dandy if you'd mention me in the credits if this inspires you to go build your own.