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 | |
// this check prevents access to debug front controllers that are deployed by accident to production servers. | |
// feel free to remove this, extend it, or make something more sophisticated. | |
if (!in_array(@$_SERVER['REMOTE_ADDR'], array( | |
'127.0.0.1', | |
'::1', | |
'84.14.82.2', | |
'88.175.92.100', | |
))) { |
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 Sonata\Bundle\ScreenyBundle\Consumer; | |
use Sonata\Bundle\ScreenyBundle\Screeny\UrlShotManager; | |
use PhpAmqpLib\Message\AMQPMessage; | |
use OldSound\RabbitMqBundle\RabbitMq\Producer; | |
class UrlShotConsumer | |
{ |
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 | |
/* | |
* This file is part of the Sonata project. | |
* | |
* (c) Thomas Rabaix <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE | |
* file that was distributed with this source code. | |
*/ |
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
Sonata Media Bundle | |
=================== | |
Media path generation: http://mycdn.com/context/01223/023/thumb_1232_small.jpg | |
1. CDN http://mycdn.com | |
2. Path Generator : context/01223/023 | |
3. Thumbnail - internal generation: thumb_1232_small.jpg | |
4. Thumbnail - return the relative path: context/01223/023/thumb_1232_small.jpg |
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
class consumer(twistedhttpstream.MessageReceiver): | |
def connectionMade(self): | |
print "connected..." | |
def connectionFailed(self, why): | |
print "cannot connect:", why | |
reactor.stop() | |
def messageReceived(self, tweet): | |
print "new message:", repr(tweet) |
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
Problem 1 | |
- Installation request for sonata-project/user-bundle 2.1.*@dev -> satisfiable by sonata-project/user-bundle 2.1.x-dev. | |
- sonata-project/user-bundle 2.1.x-dev requires sonata-project/admin-bundle 2.1.x-dev -> no matching package found. | |
Problem 2 | |
- Installation request for sonata-project/page-bundle 2.1.*@dev -> satisfiable by sonata-project/page-bundle 2.1.x-dev. | |
- sonata-project/page-bundle 2.1.x-dev requires symfony-cmf/routing-extra-bundle 1.0.* -> no matching package found. | |
Problem 3 | |
- Installation request for sonata-project/media-bundle 2.1.*@dev -> satisfiable by sonata-project/media-bundle 2.1.x-dev. | |
- sonata-project/media-bundle 2.1.x-dev requires sonata-project/admin-bundle 2.1.x-dev -> no matching package found. |
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
import ioc.loader | |
import os | |
class Extension(object): | |
def load(self, config, container_builder): | |
path = os.path.dirname(os.path.abspath(__file__)) | |
loader = ioc.loader.YamlLoader() | |
loader.load("%s/resources/config/services.yml" % path, container_builder) |
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 Stats\Test; | |
use Stats\Entry; | |
interface ComputerInterface | |
{ | |
/** | |
* @return string |
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
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
config.ssh.forward_agent = true | |
config.vm.define "default", primary: true do |web| | |
web.vm.box = "ubuntu13_04" | |
web.vm.box_url = "https://dl.dropboxusercontent.com/s/eo85etnrthnrrfn/ubuntu_13_04.box" |
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
#!/bin/sh -ex | |
# reset local junit data | |
rm -rf junit; mkdir junit | |
# update puppet submodules | |
git submodule update --init | |
# add the ssh agent, so capistrano can use it | |
eval `ssh-agent`; ssh-add /var/lib/jenkins/.ssh/id_rsa |