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 | |
## Specification: | |
## A User needs to be able to manage tasks to help with their workflow and and self management. | |
## They will need the ability to add tasks, update a task and delete a task for themselves only. | |
## Concept: | |
## A user can have a collection of tasks attached to them. | |
## A task must consist of a `Title`, `Description` and a `User` |
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 | |
/** | |
* This is simplistic code to illustrate how routing config files could be implemented. | |
*/ | |
public function addRoutesFromConfig( | |
array $routes = [], | |
$namedRoutes = false, | |
Strategy\StrategyInterface $strategy = null |
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(window, document, undefined) { | |
/** | |
* @returns {XMLHttpRequest|ActiveXObject} | |
*/ | |
function initialise () { | |
if (window.XMLHttpRequest) { | |
// [ IE7+, FireFox, Chrome, Opera, Safari ] | |
return new XMLHttpRequest(); | |
} 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
<?php | |
final class EmployeeProfileAction | |
{ | |
private $domain; | |
private $responseHandler; | |
public function __construct( | |
EmployeeService $domain, | |
ActiveEmployeeListingResponseHandler $responseHandler |
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 | |
$start = microtime(true); | |
/* | |
CREATE TABLE `employees` ( | |
`sId` varchar(40) NOT NULL DEFAULT '', | |
`sUsername` varchar(255) NOT NULL DEFAULT '', | |
`sFirstname` varchar(255) NOT NULL DEFAULT '', | |
`sLastname` varchar(255) NOT NULL DEFAULT '', |
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 | |
namespace League\Route\RouteGenerator; | |
final class RouteGenerator | |
{ | |
private $routes; | |
public function __construct( | |
array $routes = [] |
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 | |
require __DIR__.'/test.file.php'; | |
$class = new ReflectionClass(Some\TheThing::class); | |
//// | |
// Better way to find if the class has strict_type enabled | |
//// | |
$tokens = token_get_all(file_get_contents(__DIR__.'/test.file.php')); |
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 Newspaper implements \SplSubject{ | |
private $name; | |
private $observers = array(); | |
private $content; | |
public function __construct($name) { | |
$this->name = $name; | |
} |
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
## Pre-reqs | |
sudo apt-get install -y apt-transport-https ca-certificates | |
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D | |
## Create docker sources list file | |
sudo touch /etc/apt/sources.list.d/docker.list | |
sudo echo "deb https://apt.dockerproject.org/repo debian-jessie main" >> /etc/apt/sources.list.d/docker.list | |
## Update sources | |
sudo apt-get update | |
## Install docker engine | |
sudo apt-cache policy docker-engine |
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
# to run: | |
# ./react.go {path_to_server.php} ./dir_one ./dir_two ... | |
package main | |
import ( | |
"log" | |
"os" | |
"os/exec" | |
"fmt" |
OlderNewer