Why Typo3 Developers Drink

Concatenating multiple comparisons with AND, OR or NOT is not possible in f:if.

From the Fluid documentation

<div class="row">
    <f:if condition="{content_3}">
    <f:then>
        <f:if condition="{content_4}">
        <f:then>
            <f:if condition="{content_5}">
            <f:then>
                <div class="col-md-4">
                    {content_3 -> f:format.raw()}
                </div>
                <div class="col-md-4">
                    {content_4 -> f:format.raw()}
                </div>
                <div class="col-md-4">
                    {content_5 -> f:format.raw()}
                </div>
            </f:then>
            <f:else>
                <div class="col-md-6">
                    {content_3 -> f:format.raw()}
                </div>
                <div class="col-md-6">
                    {content_4 -> f:format.raw()}
                </div>
            </f:else>
            </f:if>
        </f:then>
        <f:else>
            <f:if condition="{content_5}">
            <f:then>
                <div class="col-md-6">
                    {content_3 -> f:format.raw()}
                </div>
                <div class="col-md-6">
                    {content_5 -> f:format.raw()}
                </div>
            </f:then>
            <f:else>
                <div class="col-md-12">
                    {content_3 -> f:format.raw()}
                </div>
            </f:else>
            </f:if>
        </f:else>
        </f:if>
    </f:then>
    <f:else>
        <f:if condition="{content_4}">
        <f:then>
            <f:if condition="{content_5}">
            <f:then>
                <div class="col-md-6">
                    {content_4 -> f:format.raw()}
                </div>
                <div class="col-md-6">
                    {content_5 -> f:format.raw()}
                </div>
            </f:then>
            <f:else>
                <div class="col-md-12">
                    {content_4 -> f:format.raw()}
                </div>
            </f:else>
            </f:if>
        </f:then>
        <f:else>
            <f:if condition="{content_5}">
            <f:then>
                <div class="col-md-12">
                    {content_5 -> f:format.raw()}
                </div>
            </f:then>
            <f:else>
            </f:else>
            </f:if>
        </f:else>
        </f:if>
    </f:else>
    </f:if>
</div>

Stupid Emacs Tricks 1 – Searching in LessCSS with CSS selectors

(defun less-search (search-string)
  "Search a LessCSS buffer for an expression such as
\".content .inner .banner img\",
matching both full expressions as well as nested ones.
 
This means that it should match anything in the form:
 
.content .inner {
    .banner {
        img {
 
        }
    }
}
 
TODO: handle the case of .block.banner matching .block { &.banner { ... } }
TODO: handle looping like a normal search function
TODO: interactive search??"
  (interactive "sSearch: \n")
  (let ((search-components (split-string search-string " "))
        (end-point (point-max))
        (found-point nil))
    (save-excursion
      (goto-char (point-min))
      (setq found-point (dolist (item search-components ret)
                                        ; Search is here limited to a
                                        ; range that starts as the
                                        ; whole buffer and gets
                                        ; gradually restricted by the
                                        ; matched elements.
                          (unless (equal end-point (point-max))
                            (save-excursion
                              (forward-list)
                              (setq end-point (point))))
                          (let ((search-point (search-forward item end-point t)))
                            (unless search-point
                              (error "Search failed"))
                            (setq ret search-point)))))
    (when found-point
      (goto-char found-point))
    found-point))

Sticky Buns

Cinnamon Buns

Ingredients

Dough

  • 1 block fresh yeast or 1 package active dry yeast
  • 125 mL water
  • 500g white flour
  • 100g sugar
  • 250 mL (soy) milk
  • 2 tablespoons oil
  • 1 teaspoon salt

Filling

  • 125g butter
  • 55g brown or raw sugar
  • 1 handful chopped nuts

Icing

  • 50g icing sugar (confectioner's gugar, powdered sugar)
  • 1 tablespoon (soy) milk

Directions

Dissolve the yeast in the water along with a spoon of sugar. Let sit until it foams slightly, 15 minutes or so.

Mix the rest of the sugar, the milk, the oil and the salt into the dissolved yeast.

Mix in flour and knead until you have a soft dough.

Let rise for approximately one hour.

Melt the butter in a heavy saucepan. Whisk in the sugar and the nuts, adding more sugar until the mixture is thick and dark brown.

Let the filling cool.

Butter a baking form.

Roll out the risen dough into a square about 1 centimetre thick.

Spread the cooled filling on the dough, leaving a border between filling and edges so that it doesn't ooze out.

Roll the rectangle into a log, so that a spiral of filling is inside the log, then slice it into 8 rolls.

Place the rolls, cut side up, into the buttered baking form. Let them rise for another hour.

Preheat the oven to 175°C (150° with forced air).

Bake in the middle of the oven for 30 minutes. The visible dough should be golden to dark brown and firm.

Mix icing sugar and milk together to form a thick liquid. Drizzle the liquid over the hot buns.

Let cool. Serve warm.

Building the paper bed

So, we recently got a bed made of cardboard. As you can see, the cats loved it from the start.

Trying to start the paper bed

This being the modern era, though, some assembly was required. Each slat was three pieces of cardboard that had to be folded, holes punched out, and then the pieces locked together.

Building the paper bed - Bottom

Eventually, all parts of the bottom were folded and assembled, and could be set up and joined together.

Building the paper bed - Bottom built

The top of the bed was a lot harder to assemble. Those pieces were nearly rigid and took a lot of force to fold. Even then, getting one piece on was a two-person job, as it had to be held at both ends and shoved in.

Building the paper bed - Mostly built

The bed, finally fully complete.

Building the paper bed - Fully built