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_once __DIR__.'/AppKernel.php'; | |
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache; | |
use Symfony\Component\HttpFoundation\Request; | |
use Symfony\Component\HttpFoundation\Response; | |
class AppCache extends HttpCache | |
{ |
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 Demo { | |
require __DIR__."/vendor/autoload.php"; | |
use Nocarrier\Hal; | |
class Resource extends Hal {} | |
class ResourceResponse |
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
class CreatePartyAccountOrderSaga < Saga | |
attr_reader :saga_info | |
def initialize(saga_id, party_attributes, account_attributes, order_attributes) | |
@saga_id = saga_id; | |
start(party_attributes, account_attributes, order_attributes) | |
end | |
def start(party_attributes, account_attributes, order_attributes) | |
fiber_based_workflow do | |
party_id = saga_exec("Creating Party..."){CreateParty.execute(*party_attributes)} | |
raise CreatePartyFailedError, "Party Creation Failed" if timeout? |
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
cut -f1 -d" " ~/.bash_history | sort | uniq -c | sort -nr | head -n 10 | |
142 bin/behat | |
61 php | |
27 cd | |
25 sudo | |
22 ls | |
15 ps | |
14 export | |
12 Xvfb | |
9 pear |
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
<!-- Mobile meta & links --> | |
<!-- Reference | |
Custom Icon and Image Creation Guidelines: | |
http://developer.apple.com/library/safari/#documentation/UserExperience/Conceptual/MobileHIG/IconsImages/IconsImages.html | |
Configuring Web Applications: | |
http://developer.apple.com/library/safari/#documentation/appleapplications/reference/safariwebcontent/configuringwebapplications/configuringwebapplications.html |
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 Symfony\Component\HttpKernel\Event\FilterControllerEvent; | |
use Symfony\Component\HttpKernel\HttpKernelInterface; | |
use Symfony\Component\HttpKernel\Event\GetResponseEvent; | |
use Symfony\Component\HttpKernel\KernelEvents; | |
use Symfony\Component\EventDispatcher\EventSubscriberInterface; | |
class AcceptHeaderKernelListener implements EventSubscriberInterface | |
{ |
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
/** | |
* Assert that a XPath matches on a DomNode | |
* | |
* Uses the XPath Method boolean() to see if a node test evaluates to true | |
* It's true if one of the follow conditions is met: | |
* | |
* - a number is true if and only if it is neither positive or negative zero nor NaN | |
* - a node-set is true if and only if it is non-empty | |
* - a string is true if and only if its length is non-zero | |
* - an object of a type other than the four basic types is converted to a |
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
#!/bin/bash | |
# These are the original commands, courtesy of: | |
# http://www.ravelrumba.com/blog/watch-compile-less-command-line/ | |
# Requires watchr: https://github.com/mynyml/watchr | |
# watchr -e 'watch(".*\.less$") { |f| system("lessc #{f[0]} > #{f[0]}.css && echo \"#{f[0]} > #{f[0]}.css\" "}') } | |
# Requires inotify-tools: https://github.com/rvoicilas/inotify-tools | |
# while true;do N=`find -name "*.less" `;inotifywait -qe modify $N ;for f in $N;do lessc $f ${f%.*}.css;done;done |
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
namespace Sagas | |
{ | |
using System; | |
using System.Collections.Generic; | |
class Program | |
{ | |
static ActivityHost[] processes; |
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; |