So you have made the switch from Linux to Mac OSX and you realize that owning a Mac is not just about cool software it is about some of the greatest hardware you will ever use. Things like back-lit keyboards, soft flat keys, and the general touch and feel is not something you can find in the PC world. Oh and the high-res glossy screen is wonderful. Yes, Apple is a furniture company and yes OSX is a prison, but it is the NICEST prison you will ever be in. Another point of full disclosure, I am not an Apple fan boy and I am not pro Apple (as noted that I used Linux as day to day OS for 6 years), I am just anti-Windows.
One of the first questions you will ask yourself after you convert to OSX is where are all of the neat programs and tools we were used to in the Linux world. I never realized how many of them I used on a daily basis and how many of them I took for granted. What I have found is:
1) Not all Linux tools are available natively on OSX
2) There is no native apt-get like solution for OSX
3) Not all tools have a native OSX binary versions that you can download
4) You have to have xcode installed in order to get gcc and glibc to even try building the code form source
5) A lot of source code will not easily compile on OSX and if it does, you find yourself in dependency hell really fast
There are a few solutions that help ease a lot of this pain for us. One is called Homebrew (http://mxcl.github.com/homebrew/) and another is Mac Ports (http://www.macports.org/). I prefer Homebrew as it tries to use the native system as much as possible. Mac Ports is more of a Linux subsystem drop in, in the /opt/local directory. Once you have these packages installed, they will work a lot like apt-get or other package management solutions we are used to in Linux. Example:
> brew search minicom
> brew install minicom
The thing to keep in mind is that Homebrew uses /usr/local and Mac Ports use /opt/local by default. If you use Mac Ports and try to compile something that needs a library you installed by Mac Ports you need to make sure you tell ./configure where to find it. Example:
> ./configure -I /opt/local/includes -L/opt/local/libs
Homebrew and Mac Ports will really help ease a lot of the initial pain as you go looking for your favorite tools.
Somewhere between order, disorder, and chaos exists the life in which we live. My views of time and space and everything else therein reflects my never ending war with Entropy.
Monday, December 5, 2011
Converting to Mac OSX from Linux
I recently made the day to day switch from Linux to Mac OSX running Lion. For the most part this transition has been painless, although there is just enough different for a Linux user to scratch his head and say "huh, Apple what were you thinking?". Now for completeness and full disclosure, I made the change from MS Windows to Linux over 6 years ago and only use Windows when I have to and only via VMWare Workstation (http://www.vmware.com), so these posts are not about how to do things from a Windows world because I have not lived in that world for a very long time and I will never go back. It is like once you drive a German car, it is really hard to drive anything else.
I hope you will find these random posts helpful if you are migrating from Linux to Mac OSX.
I hope you will find these random posts helpful if you are migrating from Linux to Mac OSX.
Saturday, March 5, 2011
Puff Pastry
![]() |
| Finished product - cheese |
That day changed me and opened my eyes, nose, taste buds, and pallet to a new way of looking at food. Before that point I had mostly viewed food as just something you ate to keep you from being hungry, not something that should be enjoyed. This little shop taught me to start enjoying food in new ways. Food should be good, good for you, but it should also look and smell wonderful and have excellent texture.
![]() |
| Finished product - jam |
So how does puff pastry fit in to all of this? Well puff pastry dough is a light and flaky dough that can be used for both pastries as well as main dishes. This dough gives a depth of complexity to the flavors and pallet that can not be easily replaced. On top of this, you can do amazing dough art with puff pastry. So why do more people not cook with it? On the surface it appears to be difficult and complex to make, however, neither is true. The key to puff pastry is technique and a little bit of patience, plain and simple.
You can do a lot of neat artsy things with puff pastry to make your creations beautiful. This first post is to work through the basics of the dough and I will be building some simple puff pastry turnovers, nothing ornate just simple wonderful things to eat.
Now before we get started there are a few key things to always remember. Heat in the form of room temperature or from friction/viscosity (from working with the dough) is EVIL. Do not get impatient, this will take several short blocks of time and can be spread over the course of a day or two days. Follow the technique outlined below; if you try to improvise it will fail. If at all possible work your dough on a marble slab as it will help keep the dough cooler. When working with the dough and butter, you want to minimize the amount of time it is out of the refrigerator therefore move quick and do not let the dough sit idle.
![]() |
| Ascorbic Acid powder |
Ingredients – Dough
- 180 ml of cold water
- 300 grams of sifted all-purpose white flour
- 4 grams of salt
- 1/8 teaspoon of ascorbic acid powder
- 170 grams (~1 and ½ sticks) of cold not frozen unsalted butter
- Sugar-in-the-raw and cinnamon
Ingredients – Egg Wash
- 1 egg beaten (umbilical cord removed)
- 10 ml of cold water
Directions
![]() |
| Dough out of food processor |
![]() |
| Dough ball |
- Remove the dough and place on a lightly floured stab of marble and knead by hand until you can form a nice round ball. Wrap the ball in plastic wrap and place in the back of your refrigerator for 30 minutes
![]() |
| Butter sliced |
- Place the butter in the back of the refrigerator for 30 minutes or until nice and firm.
- Take dough ball out of the refrigerator and roll out a cross with a “mound” in the middle.
- Place the butter on top of the mound and then fold up the sides of the dough to cover.
![]() |
| Dough cross with mound |
![]() |
| Butter all wrapped up |
![]() |
| Wrapping butter |
- With your rolling pin, push down and roll to form a nice rectangle. Fold this in thirds, turn the dough 90 degrees, and push down and roll once again in to a nice rectangle. Fold it back together in thirds, wrap in plastic and put in the back of your refrigerator for at least one hour.
![]() |
| Rolled and ready to be folded |
![]() |
| Dough folded - first turn |
- After you are finished with all of your turns, cool the dough one last time for an hour. Then cut in half, put half back in the refrigerator (wrapped in plastic as always) and then roll out the remaining dough so you can cut it in to the desired shapes, in our case large squares.
- Wet the inside edges of each square with a little bit of water, this will help it stick together once you put the pieces on top of each other. Place your desired filling in the middle and cover. (If you do not plan on using a filling that just use one square, do not double them up without a filling). Use a fork to press and seal the seam and carefully spear the top with the fork to provide a vent.
![]() |
| Sealed |
![]() |
| Cut and filled |
- Bake at 375 degrees for 30 minutes.
Wednesday, February 16, 2011
Update records in Salesforce in mass
Recently I was tasked with a side project to clean up some of our data in Salesforce. The first major task I had was to update thousands of Opportunity records. Given that Salesforce will only allow you to update 100 records at a time I needed to find a way around this. Here is a neat trick to make quick automated work of this problem.
For this example I need to copy the data from a field called Invoice to a field called Accounting. I only want to grab Opportunities where there is data in the Invoice field and I only want to update the Accounting field if there is nothing in it yet. Basically I do not want to clobber existing data.
My example will use APEX code and insert and update triggers to repeat the query over and over.
Step 1:
Create a custom object in SF called updateData (this can be called ANYTHING you want). This object should have 1 number (integer) field called “number”. Technically this is not needed, but my code uses this so I can see how many records were updated. Once you have this created, map it to a Tab so you can find it.
Step 2:
Create an APEX trigger. Yes you will need to use APEX code for this and that means you will need to use the Force IDE editor which is basically just a hacked version of Eclipse. You can NOT create, edit, or do anything with APEX without it. Your trigger should look like this:
Step 3:
You will need to create a unit test for this. This unit test just needs to create a single updateData record. So it will look like:
Step 4
At this point you can create a new updateData record and press save. It will update 100 Opportunities. If you edit the record and press save, it will update another 100 records. Now if you are like me and you have thousands of records to do, you need to make use of some web browser automation.
Step 5:
Install the iMacros plugin for Firefox.
Step 6:
Record yourself, with iMacros, editing the record that you created in Step 4. When you are done, you can stop the recording and edit the actual script. It should look something like this (I added the wait seconds=5 at the end to just add an extra delay):
Step 7:
Now set iMacros to play as a loop for as many times as you need and sit back and watch all of your data get updated. NOTE: you can always use the “sForce Explorer” (a Saleforce QUI SQL tool) to query your data and see how many records you will be needing to touch.
For this example I need to copy the data from a field called Invoice to a field called Accounting. I only want to grab Opportunities where there is data in the Invoice field and I only want to update the Accounting field if there is nothing in it yet. Basically I do not want to clobber existing data.
My example will use APEX code and insert and update triggers to repeat the query over and over.
Step 1:
Create a custom object in SF called updateData (this can be called ANYTHING you want). This object should have 1 number (integer) field called “number”. Technically this is not needed, but my code uses this so I can see how many records were updated. Once you have this created, map it to a Tab so you can find it.
Step 2:
Create an APEX trigger. Yes you will need to use APEX code for this and that means you will need to use the Force IDE editor which is basically just a hacked version of Eclipse. You can NOT create, edit, or do anything with APEX without it. Your trigger should look like this:
trigger updateDate on updateData__c (before insert, before update) {
if (Trigger.isBefore && (Trigger.isInsert || Trigger.isUpdate)) {
updateData__c[] udata = Trigger.new;
// Lets grab all of the opportunities that meet our requirements
// Since we can only update a 100 at a time lets limit our results
// once again, I only want records where the Invoice field has
// something in it and the Accounting field is empty.
Opportunity[] allOpps = [
select Id, Name, Accounting__c, Invoice__c
from Opportunity
where Invoice__c <> '' and Accounting__c = ''
limit 100
];
integer count=0;
for (Opportunity o:allOpps) {
// Lets first check to make sure the field is empty,
// we do not want to clobber any data.
if (o.Accounting__c == NULL) {
o.Accounting__c = Invoice__c;
update o;
count++;
}
}
// This just updates the number field with the
// number of records that we actually updated
for (updateData__c d:udata) {
d.number__c = count;
}
}
}
Step 3:
You will need to create a unit test for this. This unit test just needs to create a single updateData record. So it will look like:
@isTest
private class Test_updateData {
static testMethod void myUnitTest() {
updateData__c uData = new updateData__c();
uData.number__c = 1;
insert uData;
}
}
Step 4
At this point you can create a new updateData record and press save. It will update 100 Opportunities. If you edit the record and press save, it will update another 100 records. Now if you are like me and you have thousands of records to do, you need to make use of some web browser automation.
Step 5:
Install the iMacros plugin for Firefox.
Step 6:
Record yourself, with iMacros, editing the record that you created in Step 4. When you are done, you can stop the recording and edit the actual script. It should look something like this (I added the wait seconds=5 at the end to just add an extra delay):
VERSION BUILD=7110203 RECORDER=FX TAB T=1 URL GOTO=https://xxxxxxx.salesforce.com/yyyyyyyyyyyyyyyyyyy TAG POS=1 TYPE=INPUT:BUTTON ATTR=NAME:edit&&VALUE:Edit TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:editPage ATTR=ID:zzzzzzzzzzzzzzzzzzzzzzzzzzzzzz CONTENT= TAG POS=2 TYPE=INPUT:SUBMIT FORM=ID:editPage ATTR=NAME:save&&VALUE: Save WAIT SECONDS=5
Step 7:
Now set iMacros to play as a loop for as many times as you need and sit back and watch all of your data get updated. NOTE: you can always use the “sForce Explorer” (a Saleforce QUI SQL tool) to query your data and see how many records you will be needing to touch.
Sunday, January 30, 2011
Pineapple Teriyaki Swiss Burgers
![]() |
| Finished Product |
Years upon years ago, I did this for the first time after a late night at work not fully realizing the time. In hind-sight I must have gotten home just after midnight and fired up the grill around 1:00 AM. By 1:30 AM as I was eating in the quite darkness of the back yard, I noticed kitchen lights flick on in nearly every house in the neighborhood. Poor things, they were up scouring around their kitchens like little errant mice trying to find something to eat, something to curb their sudden deep thirst for BBQ, without any real knowledge to why they were suddenly so hungry.
Yeah I know it is mean. But there is something about a nice hot teriyaki burger in the late evening. Now before you get started a few rules of the game. If you can see through your teriyaki sauce, it is not a sauce but flavored water. If it is not as thick as honey, then it is just flavored water. Now I realize that everyone’s tastes are different, so go hunting for a teriyaki sauce that you like. Try it as a dipping sauce with some chicken or Chinese take out first. If it is good, then use it else where in your cooking. Cooking is 30% raw materials, 40% recipe, and 30% technique. If you do not have good raw ingredients, it will not taste good.
Now one of the readily available commercial sauces I like is the Kikkoman, Terriyaki Sauce from their Takumi Collection. It has a purplish label and is pretty good, though not wonderful.
Ingredients (2 burgers)
- 1/2 lb of 80/20 hamburger (no fat, no flavor)
- 30 ml of Teriyaki sauce (to be mixed in)
- 30 ml of Teriyaki sauce (to be put on afterwards)
- 3 grams of Lawry’s seasoned salt
- 0.5 gram (~1/4 teaspoon) of black pepper
- 0.5 gram (~1/4 teaspoon) of garlic powder
- 2 pineapple rings
- 2 pieces of baby Swiss cheese
- 2 Kaiser rolls or hamburger buns
Directions
- Knead hamburger, Teriyaki sauce, Lawry’s seasoned salt, black pepper, and garlic together and form in to two patties.
- Barbeque your burgers to your normal desired internal temperature, though I would suggest a nice “medium” that is hot throughout but with a nice slightly pink middle.
- Right before the burgers are done, place a pineapple ring on top of each burger and fill the center of ring with an additional 15 ml of Teriyaki sauce.
- Cover the pineapple with a piece of baby Swiss cheese and let it melt down and seal the pineapple ring to the burger
- Place the Kaiser rolls or hamburger buns on the grill for a few seconds to toast and then serve.
Sunday, January 23, 2011
Honey Wheat Bread
![]() |
| Finished product |
Given this I started my quest to find a good alternative, something that I could start making, and make a hundred or so times to get just right. I started combing through my baking text books (who knew you could spend nearly 50 pages discussing flour), reading baking blogs, and reading recipes at my favorite recipe site, allrecipes.com. I finally found on allrecipes.com a recipe that looked like it might be a good place for me to start. Obviously I would need to adjust it and tweak to my liking and make adjustments for high altitude. What I have come up with is the following, enjoy. NOTE: I have tried this in both my 6 quart stand mixer and my 16 cup food processor and have found that it works best in the stand mixer. Also my stand mixer says to never go above speed 2 for mixing dough. If yours is different you will need to adjust.
Ingredients – Yeast Start
- 120 ml warm water
- 6 grams of white sugar
- 12 grams of active dry yeast
Ingredients – Bread
- 1 can (12 fl oz) of evaporated milk
- 60 ml water
- 60 ml of honey
- 60 ml of shortening (Crisco)
- 12 grams of salt
- 300 grams of whole wheat flour
- 500 grams of white bread flour
Directions – Yeast
- Combine the 120 ml of warm water and sugar in small bowl and mix until sugar is dissolved.
- Add yeast and let stand for 10-15 minutes, or until it is foamy
- Once the yeast is nearly done, start on the bread mixture
![]() |
| Yeast just added |
![]() |
| Yeast is ready |
Direction – Bread
- Melt the shortening in your microwave (less than 60 seconds)
- Combine 60 ml of water, honey, evaporated milk, melted shortening, salt, and the whole wheat flour in your stand mixer bowl (6 quart)
- Using the paddle blade, mix this on speed 2 for 30 seconds.
- Scrape the bottom and sides of the bowl and add the yeast mixture and mix for 30 more seconds on speed 2, once again with the paddle blade. You should have a mixture that resembles pancake batter consistency.
- Take the paddle blade off and put the dough hook on
- Let the mixture rest at room temperature for 10-15 minutes.
- Add 300 grams of the 500 grams of white bread flour and knead for 1 minute 30 seconds on speed 2
![]() |
| Dough just about done |
- Remove the dough from the mixer and place on a lightly floured (white bread flour) table. Lightly knead by hand (folding out side to center and turning method) for 30 seconds and then make in to a dough ball, spinning the dough in your hands to seal the bottom.
![]() |
| Rolled out dough |
- Once the dough has visibly doubled, remove from bowl and place on lightly floured table (white bread flour) and cut in half or thirds depending on pan size (see below in cooking time section, large pans cut in half, medium sized pans cut in thirds). Separate the halves and roll out to the width of your bread pans.
![]() |
| Start of second rise |
![]() |
| Out of the oven |
- Bake at 375 degrees for 30 minutes for a large pan (5.5 inch x 9.5 inch x 2.5 inch pan) or 22 minutes for a medium pan (4.5 inch x 8.5 inch x 2.5 inch). I prefer and recommend the large pans.
- When time is up, remove immediately from pan and place on a cooling rack to cool. After an hour or so you can put the bread in a bread bag to store.
Wednesday, January 19, 2011
Life is to short to eat crappy food!
A friend of mine once told me "life is to short to eat crappy food", and I must say I completely agree with him. I am constantly amazed at how often we as society eat things that are just down right disgusting. We make attempts to justify the crap we eat and make ourselves feel better by saying it was cheap or it was fast or...? But it does not matter, it is still crappy food and often not very good for us.
I wonder, are we as society just apathetic when it comes to what we eat, have we been socialized in to thinking certain foods are good or good for us, or are we just down right lazy and unwilling to either make or eat things that are good? My guess is that it is a mix of the three. From my research the general decline in food and the acceptance of crappy food started with the commercial brain washing of the 1950, 60s and 70s. Do you remember when margarine came with a packet of nuclear yellow dye? It was sold to us that this was the way of the future. I also loved the push for "TV Dinners" that were definitely a ploy to get us to spend more time out of the kitchen and in front of the television watching mindless entertainment and making ourselves fat. When you honestly think about it, none of these prepackaged food back then were good and they surely were not good for us. But we as society were hoodwinked by marketing and the commercialization of "the future" to start eating crappy food.
Today, I believe that too many people have forgotten or never learned how to cook. Basic kitchen and cooking techniques are not being learned in the home. Most recipes, if you can call them that, call for a can of this or a box of that as the main ingredient. Just as we need to refocus on the family and fix that basic building block, we need to fix what it is we eat and serve in our homes. People need to really consider what it is they are eating.
Over the years I have developed a love of eating and in turn cooking, baking and candy making. Through this blog I hope to share with you some of my successes and failures I have with the places I eat at and the things I make. I also hope I can convince you of a simple fact that it is not hard or expensive to eat and cook good food.
Please note, I am not a tree hugging soil munching druid so I will shop at stores other than Whole Foods (though I love Whole Foods), and yes, I will eat meat with the best of them. I also have one general snobby rule in my kitchen, it states that if the recipe calls for a can of Campbells anything to be mixed in, that recipe is forthwith given a burning at the stake that would make the Salem witch hunts jealous.
I hope you enjoy my random posts and find my recipes fun to make. Please feel free to comment on the recipes with your variations. Just so you know, all of my recipes are tailored for an elevation of ~1370 meters (4500 feet) above sea level and for a very low humidity climate. I only use a natural gas range and the oven is NON convection so if your oven is electric, convection, or both, your baking times will be different.
I wonder, are we as society just apathetic when it comes to what we eat, have we been socialized in to thinking certain foods are good or good for us, or are we just down right lazy and unwilling to either make or eat things that are good? My guess is that it is a mix of the three. From my research the general decline in food and the acceptance of crappy food started with the commercial brain washing of the 1950, 60s and 70s. Do you remember when margarine came with a packet of nuclear yellow dye? It was sold to us that this was the way of the future. I also loved the push for "TV Dinners" that were definitely a ploy to get us to spend more time out of the kitchen and in front of the television watching mindless entertainment and making ourselves fat. When you honestly think about it, none of these prepackaged food back then were good and they surely were not good for us. But we as society were hoodwinked by marketing and the commercialization of "the future" to start eating crappy food.
Today, I believe that too many people have forgotten or never learned how to cook. Basic kitchen and cooking techniques are not being learned in the home. Most recipes, if you can call them that, call for a can of this or a box of that as the main ingredient. Just as we need to refocus on the family and fix that basic building block, we need to fix what it is we eat and serve in our homes. People need to really consider what it is they are eating.
Over the years I have developed a love of eating and in turn cooking, baking and candy making. Through this blog I hope to share with you some of my successes and failures I have with the places I eat at and the things I make. I also hope I can convince you of a simple fact that it is not hard or expensive to eat and cook good food.
Please note, I am not a tree hugging soil munching druid so I will shop at stores other than Whole Foods (though I love Whole Foods), and yes, I will eat meat with the best of them. I also have one general snobby rule in my kitchen, it states that if the recipe calls for a can of Campbells anything to be mixed in, that recipe is forthwith given a burning at the stake that would make the Salem witch hunts jealous.
I hope you enjoy my random posts and find my recipes fun to make. Please feel free to comment on the recipes with your variations. Just so you know, all of my recipes are tailored for an elevation of ~1370 meters (4500 feet) above sea level and for a very low humidity climate. I only use a natural gas range and the oven is NON convection so if your oven is electric, convection, or both, your baking times will be different.
Subscribe to:
Posts (Atom)




















