Hummus! (חומוס)

2 Cup dry Chickpeas
1/2 Cup Tahini
1/2 Cup Lemon Juice
1/2 – 1 Large Garlic Minced
4 Tbsp Olive Oil
1 Tsp Cumin

Soak chickpeas overnight in cold water. The next day boil then simmer chick peas in fresh water for about 1-2 hours until soft.

Blend tahini and lemmon juice until whipped, then blend in minced garlic, olive oil, cumin, and salt. Blend in chickpeas and chickpea water until you get your desired consistency.

Spread on a plate, sprinkle paprika, and drizzle olive oil on top.

Baked Corn Dogs

Homemade baked corn dogs! Yum! These take a while but the results are fantastic.

1 1/2 Cups Flour
1 1/2 Cups Corn Flour
1 1/2 Tsp Baking Powder
1 Tsp Salt
6 Tbsp Butter
1 Tbsp Mustard (optional)
3/4 Cup Milk
1/3 Cup Honey
12 Hotdogs
Cheese (optional)
6 Kebab Skewers halfed

Whisk together dry goods. Cut butter and mustard into dry goods with fork until its fine and crumbly like pastry dough. Fork in honey again until crumbly. Thoroughly stir in milk and let stand for a few minutes to absorb.

Roll out dough on lightly floured baking paper to about 1/2 cm thick. With a knife, divide into twelve even rectangles slightly longer than a hotdog and about 3 times wider.

corndog_roll

Wrap and form dough rectangle around hotdog. Skewer with half a kebab stick. Optionally add cheese inside before wrapping over hotdog. Place on baking sheet and bake for 15-20 minutes @200C

corndog_prebake

The finished corndogs!

corndog_baked

On the plate ready to eat! Yum!

corndog_ready

Always Use Google.com in Chrome

I read English, mainly. I also read Hebrew, but not enough to want to do web searches in Hebrew by default. I live in Israel, so every time I use the omni search in Chrome I’m redirected to google.co.il, and of course, most searching results are Hebrew pages. This also applies to my Android tablet which is doubly annoying seeing how the omni search settings in Chrome are the same ones used by Google Now and the default search box across the OS.

Here is an easy trick to not get redirected to your local Google page.

1. Open Chrome and type “google.com/ncr”
2. Search for something in the Google page (not the omni search)
3. Close Chrome completely (different in each OS)
4. Open Chrome again, but this time search for something in the omni box
5. You should be greeted by a yellow bar asking if you want to switch to your local Google or keep using Google.com

Enjoy being able to always use Google.com in Chrome :)

Convert Images in Terminal on a Mac

There is some wanky muss with my Piwigo install so I’ve been playing around with all sorts of things. One thing I found is that it no longer seems to like “.png” files as “pwg_representative” for video files. Okay fine, but seriously why all of a sudden? But I digress.. The built-in “sips” (Scriptable Image Processing System) command on a Mac is an easy way to convert a bunch of images from png to jpg. This also works with other formats by the way.

sips -s format jpeg My_Picture.png –out My_Picture.jpg

An oddity for sure is that after “format” you need “jpeg” not “jpg” and yet if you specify “My_Picture.jpeg” it will warn you that it changed your file name to “My_Picture.jpg”. Way to go Apple. Anyway its a useful command, as the name suggests, its good for scripting. Here is how I scripted it..

for PICTURE in `ls pwg_representative | grep png`; do sips -s format jpeg pwg_representative/$PICTURE –out pwg_jpg/`echo $PICTURE | sed ‘s/.png/.jpg/’`; done

Feel free to suggest a more elegant way to do it.

 

Compress and Rotate Videos

For easier and faster viewing of videos online, I compress them before uploading to my server. My goto application for this is HandBrake. It’s cross-platform, has lots of options as well as easy presets, does a really good job of compressing, and is open source.

The two options HandBrake is seemingly missing that I’ve been wanting.. batch and rotate. It does have a queue that can be processed, but all things added to the queue are done so manually. And no rotate. However.. HandBrakeCLI DOES have these options. Because of course its CLI you can script to to do batch, and they’ve added a rotate feature.

The rotate is a little funky and not documented so well though. From various forums it seems that the options are:

  • 1 = flip X axis
  • 2 = flip Y axis
  • 3 = flip on X & Y axes (180 degree rotate)
  • 4 = flip? (anyway this does a 90 degree rotate)

So the command I used was:

HandBrakeCLI -i vid_file.mov -o vid_file.mp4 –preset=”Android”, –rotate=4

Then I scripted the process for the entire directory.

for FILE in `ls`; do HandBrakeCLI -i $FILE -o ../export/`echo $FILE | cut -d”.” -f1`.mp4 –preset=”Android”, –rotate=4; done

Cool. I’ll be bypassing the GUI and using the CLI from now on. 

Persimmon Bread

I grew up with a persimmon tree in my families back yard, but never really liked them. After trying the persimmons in Israel, I was hooked. It’s persimmon season now so I decided to try my hand at making persimmon bread. I compiled my own recipe from others I found online. Here is what I used.

Dry Ingredients

  • 1 3/4 Cups Wheat Flour
  • 1 1/2 Cups Sugar
  • 3/4 Teaspoon Salt
  • 1 Teaspoon Baking Soda
  • 1/2 Teaspoon Baking Powder
  • 1 Teaspoon Ground Cinnamon
  • 1/2 Teaspoon Ground Cloves
  • 1/2 Teaspoon Ground Nutmeg (I wanted this but didn’t have any. And alas, it was shabbat)
  • 1/2 Teaspoon Ground Allspice (I wanted this but didn’t have any. And alas, it was shabbat)

Wet Ingredients

  • 1 Cup Persimmon Puree
  • 1/2 Cup Butter
  • 2 eggs
  • 1/3 Cup Rum (Others said cognac, burbon, or whiskey which may lend better to the flavor, but I only had rum on hand)

Extras

  • 1 Cup Chopped Walnuts (pecans also sound good)
  • 1/2 Cup Raisins
  • 1/2 Cup Cranberries (dates also sound good)

Let the butter sit out until soft, then cream in eggs and rum. After mixture is really smooth, mix in persimmon. Combine dry ingredients, then slowly mix into creamed wet mixture until smooth. Mix in nuts and berries. Distribute into baking pan(s) and bake for 1 hour at 350℉. With our crazy Israeli convection oven, I did ~1 Hour at 90℃.

All in all it turned out pretty good. I think next time I’d like to have a more spiced flavor so I’ll make sure to have the nutmeg and allspice. This also would probably go really good with an only slightly sweetened cream cheese frosting.

 

Generate Video Thumbnails using Terminal on a Mac

I use a hosted service that does not support video services like ffmpeg. That means that if I use a software package like Piwigo that supports automatic video thumbnailing, I can’t take advantage of that feature. I can however upload my own thumbnail of a video, and if its the same file name (ex: vacation.mp4 and vacation.png) then it will automatically apply that image to my video. I wasn’t able to find a thumbnail generator that worked well and was free. Enter Terminal and the built in services to a Mac.

qlmanage -t -s 512 your_video.mp4 -o .

This command will use the QuickLook Manager utility to generate a 512 sized thumbnail and output it to the current directory. I wrote a quick one-liner to generate for all the videos in my directory that I wanted to upload.

for i in `ls`; do qlmanage -t -s512 $i -o .; done

Then another one-liner to remove the double file extension.

for i in `ls | grep png`; do mv $i `echo $i | cut -d”.” -f1,3`; done

As with all of my scripts, its not the most elegant way to do it, but it works.

Change EXIF Data with ExifTool on a Mac

Ever want to change the EXIF data in your pictures? I’ve had this question responded to in the form of another very shortsighted question “Why would you want to do that?” Here are a few reasons why you might want to update your EXIF data.

  1. Your camera clock went wanky and your pictures came out with the default year of the camera (apparently the vacation we just had actually happened in 2006, at least according to iPhoto).
  2. You took pictures in another timezone, but your camera clock is still at home.
  3. You want to resize your photos but retain the EXIF data.

Right, so here is how to do it.

First, grab a brilliant little tool by Phil Harvey called ExifTool. Seriously, thanks a lot Phil, ExifTool really is brilliant. There is a metric butt-load of options for ExifTool, but if you need to just change the date/time the command goes something like this.

exiftool -AllDates=’2014:01:31 15:35:33′ -overwrite_original your_picture_file.jpg

So that’s nice, but how about 2-300 pictures? Here is the one-liner I used to change my sister’s camera photos that were set to the correct time and day but in 2006. There are for sure more elegant ways to write this. This was quick and what came to me so it fit the bill.

for PIC in `ls Camera/`; do DATE=2014:`exiftool ./Camera/$PIC | grep Create | cut -d’:’ -f3-6`; exiftool -AllDates=”$DATE” -overwrite_original ./Camera/$PIC; done

This changed the year in all the date stamps to 2013 while retaining month, day, and time information. Feel free to make it more extensible and elegant as you see fit.

Pho Broth Recipe

Awesome Beef Tail Pho Broth Recipe

2 Beef Tails
10 Liters of Water
3 Medium Onions (quartered)
5 Inch Piece of Ginger (halved)
3 Cinnamon Sticks
1 1/2 Tablespoons Coriander Seeds
1 1/2 Tablespoons Fennel Seeds
9 Star Anise Pieces
9 Whole Cloves
1/3 Cup Fish Sauce
3 Tablespoons Sugar

Add bones to pot and fill with cold water. Bring to boil keep boiling for 5 minutes. Drain dirty water and bones. Rinse bones in warm water. Thoroughly clean pot.

Add clean bones and cold water to clean pot. Bring to a boil, then lower heat to simmer.

Quarter onions, halve the ginger, then broil (turning occasionally) until charred/browned on all sides. Add to simmering pot.

Toast spices by adding them to dry frying pan and cooking on low heat until fragrant. Add to simmering pot.

Add fish sauce and sugar. Simmer all day or overnight.

Pro tip: wrap everything except bones in a tied cheese cloth before putting in pot to make it easier to filter.