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
{ | |
"require": { | |
"react/socket": "0.2.*" | |
} | |
} |
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
require "rubygems" | |
require "sinatra" | |
require "json" | |
# Configure this with the directory path for the Web server's clone of the Git repo | |
git_dir = '/var/www/origin.git' | |
# Configure the mappings between Git branches and Web document roots | |
branch_to_working_directory = { | |
'www' => '/var/www/www.example.com', |
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 | |
protected function flushQueue() | |
{ | |
$container = $this->getContainer(); | |
$transport = $container->get('mailer')->getTransport(); | |
$spool = $transport->getSpool(); | |
$spool->flushQueue($container->get('swiftmailer.transport.real')); |
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 | |
use Sami\Sami; | |
use Sami\Version\GitVersionCollection; | |
use Sami\Parser\Filter\TrueFilter; | |
use Symfony\Component\Finder\Finder; | |
$iterator = Finder::create() | |
->files() | |
->name('*.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 | |
use Sami\Sami; | |
use Sami\Version\GitVersionCollection; | |
use Sami\Parser\Filter\TrueFilter; | |
use Symfony\Component\Finder\Finder; | |
$iterator = Finder::create() | |
->files() | |
->name('*.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 | |
// src/Foobar/Controller/FooController.php | |
namespace Foobar\Controller; | |
class FooController | |
{ | |
public function helloAction($request) | |
{ |
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
{ | |
"name": "rezzza/myproject", | |
"description": "myproject", | |
"authors": [ | |
{ | |
"name": "Chuck norris", | |
"email": "[email protected]" | |
} | |
], | |
"licence": "MIT", |
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 | |
use JMS\DiExtraBundle\Annotation as DI; | |
use Symfony\Component\HttpKernel\Event\FilterResponseEvent; | |
/** @DI\Service */ | |
class QSAListener | |
{ | |
private $blacklist; |
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 | |
function array_diff_simple($a, $b) | |
{ | |
$r = array(); | |
foreach($a as $key => $val) { | |
if(!isset($b[$key])) { | |
$r[$key] = $val; | |
} else { | |
if(is_array($b[$key]) && !is_array($val)) { |
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
# first sphinx | |
brew install sphinx | |
# the formula does not install libsphinxclient :/ | |
wget http://sphinxsearch.com/files/sphinx-2.0.4-release.tar.gz | |
tar xzf sphinx-2.0.4-release.tar.gz | |
cd sphinx-2.0.4-release/api/libsphinxclient/ | |
CXXCPP="gcc -E" ./configure --prefix=/usr/local | |
make | |
make install |
NewerOlder