start new:
tmux
start new with session name:
tmux new -s myname
1. Your application consists of three parts. Information always flows | |
"clockwise": clients, write side, read sides. Clients send Commands | |
to write side. Write side publishes Events to read sides. Read sides | |
reply to Queries for client. | |
2. The interesting logic is all in the write side, but your design may | |
consist *only* of the totality of Commands, Events, and Queries. | |
3. Each Command or Event has exactly one aggregate that it's acting on, | |
identified by unique aggregate ID. There need not be a one-to-one |
<?php | |
use Doctrine\ODM\MongoDB\Mapping\Annotations as Mongo; | |
/** @Mongo\Document(collection="documents") */ | |
class Document | |
{ | |
/** @Mongo\Id */ | |
public $id; |
function New-Symlink { | |
<# | |
.SYNOPSIS | |
Creates a symbolic link. | |
#> | |
param ( | |
[Parameter(Position=0, Mandatory=$true)] | |
[string] $Link, | |
[Parameter(Position=1, Mandatory=$true)] | |
[string] $Target |
<?php | |
namespace Acme\FooBundle\Command; | |
use Doctrine\Common\Persistence\ManagerRegistry; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class FindInvalidReferencesCommand extends ContainerAwareCommand |
""" | |
test commit creation with pygit2 | |
To see the result: | |
rm -rf foo && python test_cc.py && cd foo/ && git log --graph --oneline --date-order --decorate --color --all && git status && cd .. | |
""" | |
import os | |
import sys | |
import pygit2 |
----- Esc ----- | |
Quick change directory: Esc + c | |
Quick change directory history: Esc + c and then Esc + h | |
Quick change directory previous entry: Esc + c and then Esc + p | |
Command line history: Esc + h | |
Command line previous command: Esc + p | |
View change: Esc + t (each time you do this shortcut a new directory view will appear) | |
Print current working directory in command line: Esc + a | |
Switch between background command line and MC: Ctrl + o | |
Search/Go to directory in active panel: Esc + s / Ctrl + s then start typing directory name |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git@github.com:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
\Doctrine\DBAL\Types\Type::addType('uuid', 'BuboBox\Doctrine2\DBAL\Types\UuidType'); |
<?php | |
class ImageType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $builder, array $options) | |
{ | |
if ($options['required_auto'] && ! $options['required']) { | |
$builder->addEventListener(\Symfony\Component\Form\FormEvents::PRE_SET_DATA, array($this, 'determineRequired')); | |
} |