This file contains 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 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 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
#!/bin/bash | |
a2enmod ssl -y | |
apt-get update -y | |
apt-get install git -y | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
cd /opt/letsencrypt | |
./letsencrypt-auto --apache -d domain.com -d domain.com -d domain.com |
This file contains 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
#!/bin/bash | |
a2enmod ssl -y | |
apt-get update -y | |
apt-get install git -y | |
git clone https://github.com/letsencrypt/letsencrypt /opt/letsencrypt | |
cd /opt/letsencrypt | |
./letsencrypt-auto --apache -d anniballo.com -d diego.anniballo.com -d www.anniballo.com |
This file contains 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
<VirtualHost *:80> | |
ServerName anniballo.com | |
ServerAlias diego.anniballo.com www.anniballo.com | |
Redirect permanent / https://diego.anniballo.com/ | |
</VirtualHost> | |
<VirtualHost *:443> | |
ServerName anniballo.com | |
ServerAlias diego.anniballo.com www.anniballo.com | |
ServerAdmin [email protected] | |
# [...] |
This file contains 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 | |
// Use InfititeIterator for traversing a circular data structure | |
// https://en.wikipedia.org/wiki/Circular_buffer | |
/** | |
* Interface AvailabilityService | |
*/ | |
interface AvailabilityService | |
{ | |
/** |
This file contains 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
<div class="error"> | |
Gister plugin: you must specified a snippet id attribute for render gist code, try with [gister snippet-id="put here the code"] | |
</div> |
This file contains 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 | |
/** | |
* Class Adapter | |
*/ | |
abstract class Adapter extends RecursiveArrayIterator{ | |
} | |
/** | |
* Class GoogleDriveAdapter |
This file contains 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 | |
/** | |
* Class Message | |
*/ | |
abstract class Message | |
{ | |
protected $text; | |
/** |
This file contains 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 | |
/** | |
* Class User | |
*/ | |
class User | |
{ | |
public $name; | |
/** |