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
/* | |
``` | |
npm install browser-sync gulp gulp-autoprefixer gulp-cssnano gulp-rename gulp-sass gulp-uglify gulp-watch vinyl-source-stream babelify browserify browserify-shim babel-preset-es2015 babel-core --save-dev | |
``` | |
``` | |
npm install jquery --save | |
npm install foundation-sites --save | |
``` | |
*/ |
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 | |
/** | |
* common things about a developer | |
*/ | |
abstract class Developer { | |
protected $_languages; | |
protected $_characteristics; | |
abstract public function setLanguages($language); | |
abstract public function getLanguages(); |
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 | |
// Used in https://github.com/im4aLL/roolith-event | |
class Event { | |
private static $events = []; | |
public static function listen($name, $callback) { | |
self::$events[$name][] = $callback; | |
} |
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
html { | |
box-sizing: border-box; | |
} | |
*, | |
*:before, | |
*:after { | |
box-sizing: inherit; | |
} |
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
function LinkedList() { | |
this.list = null; | |
this.length = 0; | |
} | |
LinkedList.prototype.add = function(value) { | |
if( this.list === null ) { | |
this.list = this._node(value); | |
} | |
else { |
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
:) |
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 | |
interface NotificationInterface { | |
public function send(); | |
} | |
class Notification implements NotificationInterface { | |
public function send() | |
{ | |
return 'Default notification service!'; |
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 | |
abstract class Status { | |
protected $successor; | |
abstract public function check(ServerStatus $serverStatus); | |
public function succeedWith(Status $status) | |
{ | |
$this->successor = $status; |
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 | |
/** | |
* PHP decorator pattern example | |
*/ | |
interface TransactionInterface { | |
public function getCost(); | |
} |
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 | |
interface MailServiceInterface { | |
public function sendEmail(); | |
} | |
class SMTPService implements MailServiceInterface { | |
public function sendEmail() | |
{ |
OlderNewer