This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $appendIterator = new AppendIterator(); | |
| $data = array('a_elementOne','a_elementTwo','a_elementThree'); | |
| $appendIterator->append(new ArrayIterator($data)); | |
| $data = array('b_elementOne','b_elementTwo','b_elementThree'); | |
| $appendIterator->append(new ArrayIterator($data)); | |
| foreach($appendIterator as $item){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $data = array('EC2-CHOPIN01','EC2-CHOPIN02','EC2-CHOPIN03','GCE-MOZART01','GCE-MOZART02'); | |
| $iterator = new RegexIterator(new ArrayIterator($data),"/(EC2)/"); | |
| foreach($iterator as $serviceInstance){ | |
| echo $serviceInstance . PHP_EOL; | |
| } | |
| /* | |
| EC2-CHOPIN01 | |
| EC2-CHOPIN02 | |
| EC2-CHOPIN03 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // RecursiveRegexIterator | |
| $data = array( | |
| array( | |
| 'EC2-CHOPIN01', | |
| 'EC2-CHOPIN02', | |
| 'EC2-CHOPIN03', | |
| ), | |
| array( | |
| 'EC2-CHOPIN04', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $filePath = '/vagrant/data/anniballo.com'; | |
| /** | |
| * Class FolderFilter | |
| */ | |
| class FolderFilter extends FilterIterator | |
| { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $filePath = '/vagrant/data/anniballo.com'; | |
| /** | |
| * Class FolderFilter | |
| */ | |
| class DotFilter extends RecursiveFilterIterator | |
| { | |
| /** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $xml = <<<EOF | |
| <results> | |
| <user> | |
| <name>Diego</name> | |
| <surname>Anniballo</surname> | |
| </user> | |
| <user> | |
| <name>Mari</name> | |
| <surname>Monti</surname> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| John | Busha | developer | |
|---|---|---|---|
| Mark | Boiler | graphic designer | |
| Mario | Rossi | developer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| abstract class Event | |
| { | |
| public $name, $code; | |
| public function __toString() | |
| { | |
| return $this->name . ' ' . $this->code; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ######################################################################## | |
| # BASH TOOLS | |
| # _ | |
| # ./ | _________________ | |
| # / / / __________ //\_ | |
| # /' / | (__________) ||.' `-.________________________ | |
| # / / | __________ ||`._.-'~~~~~~~~~~~~~~~~~~~~~~~~` | |
| # / \ \__(__________)__\\/ | |
| # | `\ | |
| # | | ___________________ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Cleanup | |
| rm -rf ./build | |
| rm -rf ./dist/src | |
| # Create directory structure | |
| mkdir -p ./build | |
| mkdir -p ./dist | |
| # Set correct node version |