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 | |
class NotificationManager { | |
public function sendNotification($type = '', $data) | |
{ | |
switch($type){ | |
case "email": | |
$notification = new EmailAdapter(); | |
break; |
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 | |
class NotificationManager { | |
public function sendNotification(NotificationInterface $notification, $data) | |
{ | |
$notification->setData($data); | |
$notification->sendNotification(); | |
} | |
} |
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 | |
class Mage_Adminhtml_Block_Catalog_Product_Grid extends Mage_Adminhtml_Block_Widget_Grid | |
{ | |
// echo $_product->getResource()->getAttribute('attribute name')->getFrontend()->getValue($_product) | |
public function __construct() | |
{ |
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
FROM amacgregor/base | |
MAINTAINER Allan MacGregor <[email protected]> | |
RUN mkdir -p /srv/www/ | |
COPY config/vhosts/ /etc/apache2/sites-available | |
RUN a2ensite localhost.com.conf |
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
Use VHost-PHP5.4 localhost.com * 80 localhost.com |
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
docker run -v /home/amacgregor/Projects/DemacMedia/demac-docker-example/public:/srv/www/localhost.com/public_html | |
-p 127.0.0.1:80:80 -t -i amacgregor/localhost_com |
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
grep -r "global/crypt/key" . |
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
# Rna Transcription | |
Write a program that, given a DNA strand, returns its RNA complement (per RNA transcription). | |
Both DNA and RNA strands are a sequence of nucleotides. | |
The four nucleotides found in DNA are adenine (**A**), cytosine (**C**), | |
guanine (**G**) and thymine (**T**). | |
The four nucleotides found in RNA are adenine (**A**), cytosine (**C**), |
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
{ | |
"name": "amacgregor/robot-name", | |
"authors": [ | |
{ | |
"name": "Allan MacGregor", | |
"email": "[email protected]" | |
} | |
], | |
"require": { | |
"icomefromthenet/reverse-regex" : "dev-master" |
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 | |
namespace Goose\Modules\Formatters; | |
use Goose\Article; | |
use Goose\Traits\NodeCommonTrait; | |
use Goose\Traits\NodeGravityTrait; | |
use Goose\Traits\ArticleMutatorTrait; | |
use Goose\Modules\AbstractModule; | |
use Goose\Modules\ModuleInterface; |