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
| # start minikube | |
| minikube start --vm-driver=hyperkit --extra-config=apiserver.Admission.PluginNames="Initializers,NamespaceLifecycle,LimitRanger,ServiceAccount,DefaultStorageClass,ResourceQuota,PodPreset" --kubernetes-version=v1.9.0 -v 10 --network-plugin=cni --host-only-cidr 172.17.17.1/24 \ | |
| --extra-config=kubelet.PodCIDR=192.168.0.0/16 \ | |
| --extra-config=proxy.ClusterCIDR=192.168.0.0/16 \ | |
| --extra-config=controller-manager.ClusterCIDR=192.168.0.0/16 | |
| # install calico | |
| curl -O -L https://docs.projectcalico.org/v2.4/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml |
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 strict'; | |
| const { Service } = require('./lib'); | |
| const Joi = require('joi'); | |
| // plugins | |
| const doc = require('./lib/service/plugins/doc'); | |
| const log = require('./lib/service/plugins/log'); | |
| const requestId = require('./lib/service/plugins/request-id'); |
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 | |
| $content = file_get_contents(__DIR__.'/Foo.php'); | |
| $namespaces = array(); | |
| preg_match_all('/^use ([^\s;]+)(?:\s+as\s+(.*))?;/m', $content, $matches, PREG_SET_ORDER); | |
| foreach ($matches as $match) { | |
| $namespaces[] = $match[0]; | |
| } |
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 Hunspell; | |
| class Hunspell | |
| { | |
| private $path; | |
| private $language; | |
| private $errors; |
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 user{ | |
| public function getAge(){ return "25";} | |
| } | |
| ?> |
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 | |
| interface Timelineable | |
| { | |
| } | |
| interface TimelinerInterface | |
| { | |
| public function supports($target); | |
| public function getContent(); |
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 Team | |
| { | |
| protected $name; | |
| public function __construct($name) | |
| { | |
| $this->name = $name; | |
| } |
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 Application extends \Pimple implements HttpKernelInterface, EventSubscriberInterface | |
| { | |
| /** | |
| * Constructor. | |
| * | |
| * @param string $environment The environment |
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 IssueManager | |
| { | |
| private $objectManager; | |
| private $issueRepository; | |
| private $distpatcher; | |
| public function __construct(objectManager, IssueRepository $issueRepository, EventDispatcherInterface $dispatcher) | |
| { |
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
| // if no cli | |
| if (0 != strncasecmp(PHP_SAPI, 'cli', 3)) { | |
| // do something | |
| } |
NewerOlder