Skip to content

Instantly share code, notes, and snippets.

View wachterjohannes's full-sized avatar

Johannes Wachter wachterjohannes

View GitHub Profile

Keybase proof

I hereby claim:

  • I am wachterjohannes on github.
  • I am wachterjohannes (https://keybase.io/wachterjohannes) on keybase.
  • I have a public key ASBIifVwqrfqYv7RfPTTgmZoN618ChDmdgYA9w3vMC1hwgo

To claim this, I am signing this object:

@wachterjohannes
wachterjohannes / k8s-pi.md
Created December 4, 2018 05:12 — forked from alexellis/k8s-pi.md
K8s on Raspbian

Kubernetes on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system called Raspbian. This means you can carry on using all the tools and packages you're used to with the officially-supported OS.

This is part of a blog post Serverless Kubernetes home-lab with your Raspberry Pis written by Alex Ellis.

Copyright disclaimer: Please provide a link to the post and give attribution to the author if you plan to use this content in your own materials.

Pre-reqs:

0x8a77Ef3f3B473e5A550BbA4dF9004d6D51AB7dac
@wachterjohannes
wachterjohannes / DefaultController.php
Last active October 20, 2017 10:05
Document to twig structure
class DefaultController extends WebsiteController
{
public function indexAction(StructureInterface $structure, $preview = false, $partial = false)
{
$document = $this->loadDocument('/test', $structure->getLanguageCode(), $structure->getWebspaceKey());
return $this->renderStructure(
$structure,
[
'page' => $this->resolve($this->documentToStructure($document)),
@wachterjohannes
wachterjohannes / CourseSubscriber.php
Created September 18, 2017 06:41
Create article from website-kernel
<?php
namespace App\Course;
use PHPCR\NodeInterface;
use PHPCR\SessionInterface;
use PHPCR\Util\UUIDHelper;
use Sulu\Bundle\ArticleBundle\Document\Behavior\DateShardingBehavior;
use Sulu\Component\DocumentManager\Event\FlushEvent;
use Sulu\Component\DocumentManager\Event\PersistEvent;
@wachterjohannes
wachterjohannes / PageIndexCommand.php
Last active September 11, 2017 09:56
Index pages in ONGR
<?php
namespace AppBundle\Command;
use Sulu\Bundle\ContentBundle\Document\BasePageDocument;
use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand;
use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;
/**