Skip to content

Instantly share code, notes, and snippets.

View styks1987's full-sized avatar

styks1987

  • Sttark
  • Greenville, SC
View GitHub Profile
<Proxy "fcgi://app_php:9000/" enablereuse=on max=10>
</Proxy>
<FilesMatch "\.php$">
SetHandler "proxy:fcgi://app_php:9000/"
</FilesMatch>
<?php
$mailer->expects($this->exactly(2))
->method('send')
->withConsecutive(
[$this->anything(), $this->matches($user)],
[$this->anything(), $this->matches($user);
?>
"minimum-stability": "dev",
"prefer-stable": true,
"repositories" : [
{
"type" : "vcs",
"url" : "git@github.com:vendername/reponame.git"
}
]
<?php
$controllerMock = $this->_getMock($sessionParams, $controller, [], $requestData);
$Listings = TableRegistry::get('Listings');
$controllerMock->Listings = $Listings;
$listing = $controllerMock->Listings->newEntity();
$listing = $controllerMock->_updateEntity($requestData, $listing);
$listing = $controllerMock->_saveData($listing);
<?php
public function findSubscribers(Query $query, $options)
{
$query
->contain([
'UserSettings' => function ($q) {
return $q->where(['UserSettings.id' => UserSetting::ALERTS]);
}
module.exports = {
findClosestSource: (creep) => {
return creep.pos.findClosestByPath(FIND_SOURCES);
},
moveToSource: (creep, source) => {
creep.moveTo(source);
},
<?php
$invoice = $this->Invoices->newEntity([
'amount' => 100,
'description' => 'Simple little description of invoice',
'invoice_status_id' => 1,
'due_date' => new Time('2016-05-05')
]);
$invoice->user = $this->Invoices->Users->newEntity([
'first_name' => 'Bob',
<?php
$users = $this->Strategies->Users->find()->contain([
'UserSettings' => function ($q) {
return $q->map(function ($setting) {
return [$setting->id => $setting->users_user_settings->configuration];
});
}
])->toArray();
var React = require('react');
var Store = require('./store');
var Comment = require('./comment');
module.exports = React.createClass({
render: function () {
console.log(Comment);
return (
<div>
<?php
$following = $this->Strategies->Users
->matching(
'FollowingAgencies.Employees'
)
->where(['Users.id' => $this->Auth->user('id')])->toArray();
$following = Hash::extract($following, '{n}._matchingData.Employees.id');
$query = $this->Strategies->find('open')