Skip to content

Instantly share code, notes, and snippets.

Install 5.4
###########
### preperations
in /var/www/ps/malaga/malagaezp54
https://github.com/vidarl/ezp-toolkit#install-ez-publish-platform-5x--54-
Install 2.5
###########
@larseirik
larseirik / request.txt
Created September 24, 2018 08:58 — forked from bdunogier/request.txt
eZ Platform GraphQL query with html rendering of a landing page field
{
# "Places & tastes" landing page on ezplatform-ee-demo
content(id: 236) {
fields {
value {
html
}
}
}
}
@larseirik
larseirik / ezrest_curl_httpie.md
Created November 27, 2017 07:51 — forked from arfaram/ezrest_curl_httpie.md
Command line using curl and http with eZPlatform Rest API v2

root Location information

curl -u "admin:publish" -H "Accept: application/vnd.ez.api.Root+xml" http://cologne.tripandtravel.dev/api/ezp/v2/

curl -u admin -H "Accept: application/vnd.ez.api.Root+json" http://cologne.tripandtravel.dev/api/ezp/v2/
http -a "admin:publish" --json http://cologne.tripandtravel.dev/api/ezp/v2/
@larseirik
larseirik / docker-cleanup-resources.md
Created August 16, 2017 08:25 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@larseirik
larseirik / createcontent.sh
Created September 21, 2016 08:23 — forked from bdunogier/createcontent.sh
A simple bash script that creates content over the eZ Publish 5 REST API v2 (http://github.com/ezsystems/ezpublish-community)
# Create & publish an ezdemo article using the eZ Publish 5 REST API v2
# Notes:
# - this script requires http ie, which can be found at https://github.com/jkbr/httpie
# - it temporarily depends on a few temporary fixes, available in my fork: https://github.com/bdunogier/ezp-next/tree/tmp-rest-fixes
# - it is NOT well written, and I suck at shell scripting. Feel free to submit improvements to the GIST ;)
#
# Author: Bertrand Dunogier <http://share.ez.no/community/profile>, twitter @bdunogier, http://gplus.to/BertrandDunogier
# Usage: run it
REST_URI="http://vm.ezpublish5/api/ezp/v2"
@larseirik
larseirik / CrossDomainRouter.php
Created April 15, 2016 08:40 — forked from dfritschy/CrossDomainRouter.php
CrossDomainRouter for eZ PlatformIn a multi-site setup, there are usually different domains mapped to different branches in the content tree. In such a use case you will frequently find the need to share content across different siteaccesses.This is no problem with multiple locations, but when generating an URL Alias to a (main) location in anot…
<?php
namespace Webmanufaktur\MySite\Routing;
use eZ\Publish\API\Repository\Values\Content\Location;
use eZ\Publish\Core\MVC\ConfigResolverInterface;
use eZ\Publish\Core\MVC\Symfony\Routing\Generator\UrlAliasGenerator;
use eZ\Publish\Core\SignalSlot\Repository;
use Symfony\Cmf\Component\Routing\ChainedRouterInterface;
use Symfony\Component\HttpFoundation\Request;
@larseirik
larseirik / gist:15629696927848f59bc4
Last active September 10, 2015 11:07 — forked from mms-uret/gist:0781f2e88c3ed2fdc233
Multiple application in EzPublishKernel
class EzPublishKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
// all the bundles
);
$app = $this->getApp();
if ($app == 'backend') {
@larseirik
larseirik / _readme.md
Last active September 3, 2015 14:03 — forked from gka/_readme.md
PHP Endpoint for Github Webhook URLs

PHP Endpoint for Github Webhook URLs

If you love deploying websites using Github, but for some reason want to use your own server, this script might be exactly what you need.

  1. Put github.php somewhere on your PHP-enabled web server, and make it accessible for the outside world. Let's say for now the script lives on http://example.com/github.php
<?php
namespace Example\Bundle\ExampleBundle\Controller;
use eZ\Bundle\EzPublishCoreBundle\Controller;
use eZ\Publish\API\Repository\Values\Content\Location;
use eZ\Publish\Core\Pagination\Pagerfanta\ContentSearchAdapter;
use Pagerfanta\Pagerfanta;
use Symfony\Component\HttpFoundation\Response;