Put flip somewhere in your $PATH and chmod a+x it.
Copy fuck into ~/.bashrc.
| // Udi style w Static Domain Events | |
| var dispatcher = new RecordingDomainEventsDispatcher(); | |
| DomainEvents.Dispatcher = dispatcher; | |
| var customer = new Customer(new Address()); | |
| customer.Move(new Address()); | |
| Console.WriteLine("Customer moved: " + dispatcher.RecordedDomainEvent(new CustomerMoved())); |
| module InventoryItems(Command(..), Event(..), handle) where | |
| import Data.Maybe(isJust) | |
| type Id = String | |
| type Name = String | |
| type Amount = Int | |
| data Command = CreateInventoryItem Id | |
| | RenameInventoryItem Id Name |
| #!/usr/bin/env bash | |
| # finds all sprint tags (like @sprint:42) and runs them in a reversed order (won't run not tagged scenarios) | |
| PARALLEL_COMMAND='parallel --gnu' | |
| #PARALLEL_COMMAND='xargs -I{}' | |
| BEHAT_COMMAND='./bin/behat --ansi --tags={}' | |
| grep '@sprint:' features/*.feature | sed -e 's/.*\(@sprint:[0-9]*\).*/\1/' | sort -ur | $PARALLEL_COMMAND $BEHAT_COMMAND |
| #!/bin/bash | |
| # SSH into a Vagrant VM, forwarding ports in a way that allows node within Vagrant to be debugged by a debugger | |
| # or IDE in the host operating system. Don't know why, but Vagrantfile port forwarding does not work. | |
| # (https://groups.google.com/forum/#!topic/vagrant-up/RzPooJ0dp6Q) | |
| /usr/bin/vagrant ssh-config > $TMPDIR/vagrant-ssh-config | |
| ssh -F $TMPDIR/vagrant-ssh-config -L 5858:127.0.0.1:5858 default | |
| rm $TMPDIR/vagrant-ssh-config |
| // 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, |
| section .text | |
| global _start | |
| _start: | |
| xor eax, eax ; init eax 0 | |
| xor ebx, ebx ; init ebx 0 | |
| xor esi, esi ; init esi 0 | |
| jmp _socket ; jmp to _socket | |
| _socket_call: |
| PYTHONPATH=/opt/graphite/webapp/graphite | |
| MODULE=graphite_uwsgi |
| <?php | |
| /* | |
| OCP - Optimizer+ Control Panel, by _ck_, stasilok | |
| Version 0.0.6 | |
| Free for any kind of use or modification, I am not responsible for anything, please share your improvements | |
| * revision history | |
| 0.0.6 2013-03-16 added opcache support (autodetect opcache or ZendOptimizerPlus functionality) (because of "ZendOptimizerPlus" is renamed to "opcache" to be merged into PHP-5.5) (stasilok) | |
| 0.0.5 2013-03-10 added refresh button (GK) | |
| 0.0.4 2013-02-18 added file grouping and sorting (click on headers) - code needs cleanup but gets the job done |
This is just a small post in response to [this tweet][tweet] by Julien Pauli (who by the way is the release manager for PHP 5.5). In the tweet he claims that objects use more memory than arrays in PHP. Even though it can be like that, it's not true in most cases. (Note: This only applies to PHP 5.4 or newer.)
The reason why it's easy to assume that objects are larger than arrays is because objects can be seen as an array of properties and a bit of additional information (like the class it belongs to). And as array + additional info > array it obviously follows that objects are larger. The thing is that in most cases PHP can optimize the array part of it away. So how does that work?
The key here is that objects usually have a predefined set of keys, whereas arrays don't: