Simply put, destructuring in Clojure is a way extract values from a datastructure and bind them to symbols, without having to explicitly traverse the datstructure. It allows for elegant and concise Clojure code.
| watch -n1 'mysql --user=user --password=password database --execute="SHOW PROCESSLIST"' |
| // Just before switching jobs: | |
| // Add one of these. | |
| // Preferably into the same commit where you do a large merge. | |
| // | |
| // This started as a tweet with a joke of "C++ pro-tip: #define private public", | |
| // and then it quickly escalated into more and more evil suggestions. | |
| // I've tried to capture interesting suggestions here. | |
| // | |
| // Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_, | |
| // @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant, |
| <?php | |
| /** | |
| * Content from http://en.wikipedia.org/wiki/List_of_HTTP_status_codes | |
| * | |
| * You may also want a list of unofficial codes: | |
| * | |
| * 103 => 'Checkpoint', | |
| * 218 => 'This is fine', // Apache Web Server | |
| * 419 => 'Page Expired', // Laravel Framework |
| rm -f out | |
| mkfifo out | |
| trap "rm -f out" EXIT | |
| while true | |
| do | |
| cat out | nc -w1 -l 1500 > >( # parse the netcat output, to build the answer redirected to the pipe "out". | |
| export REQUEST= | |
| while read line | |
| do | |
| line=$(echo "$line" | tr -d '[\r\n]') |
TLDR: The cascade={"remove"} is like a "software" onDelete="CASCADE", and will remove objects from the database only when an explicit call to $em->remove() occurs. Thus, it could result in more than one object being deleted. orphanRemoval can remove objects from the database even if there was no explicit call to ->remove().
I answered this question a few times to different people so I will try to sum things up in this Gist.
Let's take two entities A and B as an example. I will use a OneToOne relationship in this example but it works exactly the same with OneToMany relationships.
class A#256 colors in putty, tmux/screen and vim There is a detailed answer on stackoverflow. If you are looking for a short one, here it is.
-
putty
Set
Connection -> Data -> Terminal-type stringtoxterm-256color -
tmux
Add this line to ~/.tmux.conf
| alias c='docker-compose' | |
| alias cb='docker-compose build' | |
| alias cup='docker-compose up' | |
| alias cr='docker-compose run --service-ports --rm' | |
| alias crl='docker-compose run --service-ports --rm local' | |
| alias crd='docker-compose run --service-ports --rm develop' | |
| alias crt='docker-compose run --rm test' | |
| alias crp='docker-compose run --rm provision' | |
| alias crci='docker-compose run --rm ci' | |
| alias crwt='docker-compose run --rm watchtest' |
JPG:
$ brew install jpegoptim
$ find . -name "*.jpg" -exec jpegoptim -m80 -o -p --strip-all {} \;
- PNG:
$ brew install optipng
$ find . -name "*.png" -exec optipng -o7 {} \;