Skip to content

Instantly share code, notes, and snippets.

@mgiagnoni
mgiagnoni / twig.snippets
Created August 29, 2011 12:11
Twig snippets for vim snipmate
snippet comm
{# ${1} #}
snippet tw
{% ${1} %}
snippet ifel
{% if ${1} %}
${2}
{% else %}
${3}
{% endif %}
@jcleveley-zz
jcleveley-zz / dev_tools_osx.md
Last active December 12, 2015 10:39
Dev setup for osx
class MoneyType extends AbstractType implements DataMapperInterface
{
public function buildForm(FormBuilder $builder, array $options)
{
$builder
->add('amount', 'integer')
->add('currency', 'string')
->setDataMapper($this)
;
}
@mdwheele
mdwheele / proposal.md
Last active January 3, 2018 20:25
Discussing how to make DDD easier to learn.

Edit: A bit of context as more than expected are happening upon the gist.

This is in response to a conversation between a few engineers I consider experts in their respective fields:

  • Jeffrey Way (of Laracasts) as a technical educator aiming to investigate exposing newcomers to DDD in an easier-to-digest/grasp way.
  • Konstantine Kudryashov (Behat, phpSpec, Inviqa) as a BDD consultant
  • Mathias Verraes (dddinphp.org, http://verraes.net/) as a significant DDD resource and independent consultant.

Additional context can be sought reading backwards from https://twitter.com/mdwheele/status/527233999744557056. The stream is a bit broken, but the general gist/context is there.

@graffic
graffic / gist:6c15f8c2b4f0f208939e
Created May 11, 2014 19:49
Uncle bob "Framework Whipped" original post

Framework Whipped

Uncle Bob 11 May 2014 Craftsmanship Frameworks are powerful tools. We'd be lost without them. But there's a cost to using them.

The relationship between a programmer and a framework is similar to the relationship between an executive and an administrative assistant. The framework takes care of all the necessary details, so that the executive can focus on high level decisions.

Think of Rails, or Spring, or JSF, or Hibernate. Think about what writing a web system would be like without these frameworks to help you. The idea is disheartening. There'd be so many little piddling details to deal with. It'd be like endeavoring to construct a mnemonic memory circuit using stone knives and bearskins[1].

And so we gleefully use those glittering frameworks. We joyously intermingle our code with the frameworks' in anticipation of all the benefits they promise. We make the mistake that so many executives have made before us. We marry our secretary.

@archie
archie / ddd_cqrs_es.md
Last active May 20, 2019 07:36
Draft blog post about ddd, cqrs, and es.

DDD, CQRS and Event Sourcing

In preparation for a new gig I'm reading up on the terms Domain-Driven Design, Command-Query Responsibility Segregation, and Event Sourcing. Here are a list of useful texts and talks that I've discovered so far. If anything is missing please leave a comment.

DDD

@nikic
nikic / php_evaluation_order.md
Last active October 19, 2021 05:47
Analysis of some weird evaluation order in PHP

Order of evaluation in PHP

Yesterday I found some people on my [favorite reddit][lolphp] wonder about the output of the following code:

<?php

$a = 1;
$c = $a + $a++;
@philandstuff
philandstuff / codemesh2014.org
Last active July 5, 2022 13:29
Code Mesh 2014

Codemesh 2014, London

keynote: complexity is outside the code

when I started programming:

  • architecture was always:
    • box - box - cylinder
  • then layers:
    • ideally:
@ciaranmcnulty
ciaranmcnulty / notes.md
Last active March 25, 2024 06:36
Notes on using Docker on ARM Macs (November 2021)

Docker for Mac

On M1 machines, Docker for Mac is running a lightweight linux ARM VM, then running containers within that, so containers are essentially running natively. Don't be fooled by the fact the UI or binary CLI tools (e.g. docker) might require Rosetta.

Within that VM is an emulation layer called QEmu. This can be used by docker to run Intel containers. This does not use Rosetta at all, and has a roughly 5-6X performance penalty. (If you just upgraded your CPU this may result in a similar performance to your old machine!)

Pulling and running with Docker

Many images in public registries are multi-architecture. For instance at the time of writing on Docker Hub the php:8.0-cli image has the following digests:

layout title description path
barewithrelated
Book Authoring Using GitHub and Git
Formats, tips and techniques for using GitHub and Git as the version control and collaborative platform for writing short and long form books.
usecases/_posts/2001-01-01-book-authoring-using-git-and-github.md

GitHub and Git are not just for writing programming code. They can also be an effective tool for writing articles and books. Matthew McCullough has written a quick guide to writing books in lightweight formats. This article will be folded into this Teaching repository over the coming months.

What is this?