Sunday, October 21, 2012

Nestlé Toll House Cookies


Who says that cookies can't benefit from refactoring?

Alterations

Ingredients

  • Add 1/2 tsp to 1 tsp cream of tartar if you want cookies that are cracked on top instead of a smooth finish.
  • Add 2 tbsp of milk, but refrigerate mixed dough for at least fifteen minutes before spooning onto cookie sheet. The milk results in a moister cookie that is also less sensitive to over-baking. The downside is that the dough will be less viscous—the cookies will be more flat if the dough is not chilled.
  • Increase vanilla extract from 1 tsp to 1 tbsp. (Assuming you're using real vanilla, which you should be. If it's made with bourbon, you're on the right track.)
Revised ingredients:
290g all-purpose flour
5g baking soda
5g salt
4g cream of tartar
1 cup (2 sticks) (450g) butter, softened
150g granulated sugar
165g brown sugar
12g vanilla extract
30g whole milk
2 large eggs (~95g)
2 cups (12-oz. pkg.) (340g) Semi-Sweet Chocolate Chips
1 cup (130g) chopped walnuts

Directions

  • Figure out how to get the sugar to dissolve in the butter for a better texture after baking. I use the sunlight from a skylight to get the butter almost to the point that it melts, then cream in the sugars and vanilla, then let the resulting mixture get some more sun. The result is significantly reduced sugar granules in the batter and a much improved texture in the cookie. By improved texture I mean crunchy on the outside and soft and chewy on the inside.
  • If you don't have access to sunlight powered butter magic, a double-boiler, microwave or an oven with a warming drawer can be used instead. Watch the butter carefully (especially in the microwave). The goal is to just barely melt the butter.

Notes

  • When using cream of tartar, mix it with salt, baking soda and a quarter cup of flour. Add this to the sugar, butter and egg mix and thoroughly combine prior to using the rest of the flour. This ensures a good distribution of the lesser ingredients. Afterwards, proceed to add the last two cups of flour in the normal method.
  • If you're going to bake the dough quickly, use baking soda. If you're going to refrigerate the dough for more than a couple of hours before baking, use double-acting baking powder (triple the amount--1 tbsp). Baking powder includes cream of tartar, so don't add extra.
  • Use normal sized chips. The big ones don't melt right in 9-11 minutes.
  • Completely cool any baking sheets between batches. Wash them under cool water to make sure, even if you bake on parchment paper.
  • Weigh the flour, don't measure it. A sifted and spooned cup of all-pupose flour usually weighs about 4 ounces (113g). A scooped cup of ap flour can weigh up to 5.5 ounces (156g). When weighing, use 4.5oz (128g) for each full cup measure of ap flour.

Nestlé Recipe

 (Ghiradelli's is identical except for chip brand and double the vanilla.)

Ingredients

2 1/4 cups all-purpose flour
1 teaspoon baking soda
1 teaspoon salt
1 cup (2 sticks) butter, softened
3/4 cup granulated sugar
3/4 cup packed brown sugar
1 teaspoon vanilla extract
2 large eggs
2 cups (12-oz. pkg.) NESTLÉ® TOLL HOUSE® Semi-Sweet Chocolate Morsels
1 cup chopped nuts

Directions

PREHEAT oven to 375° F.

COMBINE flour, baking soda and salt in small bowl. Beat butter, granulated sugar, brown sugar and vanilla extract in large mixer bowl until creamy. Add eggs, one at a time, beating well after each addition. Gradually beat in flour mixture. Stir in morsels and nuts. Drop by rounded tablespoon onto ungreased baking sheets.

BAKE for 9 to 11 minutes or until golden brown. Cool on baking sheets for 2 minutes; remove to wire racks to cool completely.

PAN COOKIE VARIATION: Grease 15 x 10-inch jelly-roll pan. Prepare dough as above. Spread into prepared pan. Bake for 20 to 25 minutes or until golden brown. Cool in pan on wire rack. Makes 4 dozen bars.

SLICE AND BAKE COOKIE VARIATION:
PREPARE dough as above. Divide in half; wrap in waxed paper. Refrigerate for 1 hour or until firm. Shape each half into 15-inch log; wrap in wax paper. Refrigerate for 30 minutes.* Preheat oven to 375° F. Cut into 1/2-inch-thick slices; place on ungreased baking sheets. Bake for 8 to 10 minutes or until golden brown. Cool on baking sheets for 2 minutes; remove to wire racks to cool completely. Makes about 5 dozen cookies.

* May be stored in refrigerator for up to 1 week or in freezer for up to 8 weeks.

FOR HIGH ALTITUDE BAKING (5,200 feet): Increase flour to 2 1/2 cups. Add 2 teaspoons water with flour and reduce both granulated sugar and brown sugar to 2/3 cup each. Bake drop cookies for 8 to 10 minutes and pan cookie for 17 to 19 minutes.

fail2ban on Amazon AMI

Installing fail2ban on an Amazon AMI. I'm not going to get into too many details, just briefly run through the steps to get the latest version of fail2ban up and running.

> yum install gamin python
gamin and python are both probably already installed, but it doesn't hurt to check. gamin is optional.

> cd /var/tmp
Or wherever you feel like having a temp directory.

> wget http://sourceforge.net/projects/fail2ban/files/latest/download?source=files
As long as fail2ban keeps up to date on sourceforge this will get you the latest version.

> tar -xjvf fail2ban*
Using a wildcard will work so you don't have to worry about version numbers. The results could be unexpected if you failed to clean out your tmp directory first.

> cd fail2ban*
Ditto above.

> python setup.py install
This is what actually installs fail2ban and its associated files into the correct places.

> cp files/redhat-initd /etc/init.d/fail2ban
You'll need to manually copy the redhat initd into the appropriate place. If you're not on a redhat based distro, make sure that you copy the correct file to the correct place.

Create a jail.local file in /etc/fail2ban and add your personal settings. Using jail.conf isn't the greatest idea as it will be overwritten if you upgrade.

You will have to add a default action to jail.local depending on your configuration. This is most likely something akin to:
banaction = iptables-multiport
action = %(banaction)s[name=%(__name__)s, port="%(port)s"]

Add any additional filters to /etc/fail2ban/filter.d

> chkconfig --add fail2ban
Make fail2ban available at startup by adding the service

> chkconfig fail2ban on
Make fail2ban run at startup

> service fail2ban start
Start the fail2ban service

That should take care of it barring any configuration specific errors.

Additional fail2ban filters for common apache nonsense:

phpmyadmin
# Fail2Ban configuration file
#
# Author: Garth Metzger ([email protected])
#
 
[Definition]

pma = pma|phpmyadmin|myadmin|mysql|mysqladmin|sqladmin|mypma|admin|mysqldb|mydb|pmadb
 
# Option:  failregex
# Notes.:  regex to match phpmyadmin probes.
# Values:  TEXT
#
failregex = [[]client <HOST>[]] File does not exist: .*/(?:%(pma)s)
 
# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =

w00tw00t
# Fail2Ban configuration file
#
# Author: Garth Metzger ([email protected])
#


[Definition]

# Option:  failregex
# Notes.:  regex to match failures to find w00tw00t. Even though the w00tw00t
#          itself is probably harmless, it's almost guaranteed that anyone
#          trying this will try more attacks soon after.
# Values:  TEXT
#
failregex = [[]client <HOST>[]] File does not exist: .*w00tw00t.*

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex = 

xrumer
# Fail2Ban configuration file
#
# Author: Garth Metzger ([email protected])
#

[Definition]

# Option:  failregex
# Notes.:  regex to match xrumer nonsense by grepping its results.
# Example: ++++++++++Result:+forum+not+found+
# Values:  TEXT
#
failregex = [[]client <HOST>[]] File does not exist: .*\+\+Result:.*

# Option:  ignoreregex
# Notes.:  regex to ignore. If this regex matches, the line is ignored.
# Values:  TEXT
#
ignoreregex =