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
# this comment will be in the help text for a_task | |
function a_task() { | |
... | |
} | |
# prints this help text | |
function help() { | |
# @todo allow a tag such as `# @internal` to denote functions as not available for external execution | |
declare -A DESCRIPTIONS | |
local CMD MAX LEN |
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 | |
# Script to be run as part of the github pre-push hook. | |
# | |
# Checks that, if there is a "version-like" tag being pushed, all the files which are supposed to contain the tag do | |
# actually have the correct tag value in them. If they do not, the push is blocked. | |
# NB: this does _not_ automatically alter the source files and commit them with the correct tag value, nor prevent the | |
# tag to be added to the wrong git commit locally (ie. a commit in which the source files have the wrong tag value). | |
# All it does is prevent the developer from pushing the 'bad tags' to remote repositories, giving him/her the chance to | |
# manually rectify the situation on the local repo before retrying to push. |
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 | |
class MyClass | |
{ | |
protected $p = array(); | |
public function &__get($name) | |
{ | |
echo "Getting: $name\n"; | |
if (!isset($this->p[$name])) { |
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 | |
include('../vendor/autoload.php'); | |
$clnt = new \PhpXmlRpc\Client('https://localhost/var/srv.php'); | |
$clnt->setAcceptedCompression(false); | |
$clnt->setSSLVerifyPeer(false); | |
$resp = $clnt->send(new \PhpXmlRpc\Request('yolo')); |
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
#!/usr/bin/env bash | |
# Looks in the legacy cache folder for any compiled legacy templates belonging to a specific design | |
# Useful to be put in a cronjob | |
DESIGN=my_site_design | |
VARDIR=my_site | |
# names of compiled templates files: ${sourcetpl}-hash.php | |
EXCLUDEDTEMPLATES=compiled/3- | |
ROOTDIR=$(dirname ${BASH_SOURCE[0]})/.. |
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
select i.contentobject_attribute_id, group_concat(i.filepath) | |
from ezimagefile i | |
left join ( | |
select | |
id, | |
concat( | |
'|', ExtractValue(data_text, '/ezimage/@dirpath'), '/', replace(ExtractValue(data_text, '/ezimage/@filename'), '&', '&'), | |
'|', ExtractValue(data_text, '/ezimage/@dirpath'), '/', replace(ExtractValue(data_text, '/ezimage/@basename'), '&', '&'), '_', | |
replace( | |
-- list of aliases, space separated |
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 Acme\AppBundle\Command; | |
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
class ListLegacyScriptsCommand extends ContainerAwareCommand | |
{ |
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 MyCustomer\VendorOverrideBundle\Cache; | |
use eZ\Bundle\EzPublishLegacyBundle\Cache\PersistenceCachePurger as BasePersistenceCachePurger; | |
use eZ\Publish\Core\Base\Exceptions\InvalidArgumentType; | |
use eZ\Publish\SPI\Persistence\Content\Location; | |
use eZ\Publish\API\Repository\Exceptions\NotFoundException; | |
class PersistenceCachePurger extends BasePersistenceCachePurger |
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
#!/usr/bin/env bash | |
# Command to dump the dev db + storage | |
# We try to clean up both the db and the storage as much as possible when dumping | |
# | |
# @todo allow user to specify target files | |
function help { | |
echo 'Usage: dumpdb.sh [-f] [env]' | |
echo 'Options:' |
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 WebDriver extends AbstractWebDriver | |
{ | |
protected $proxy = ''; | |
public function setProxy($proxy) | |
{ | |
$this->proxy = $proxy; | |
} | |
/** |
NewerOlder