Skip to content

Instantly share code, notes, and snippets.

View radmiraal's full-sized avatar

Rens Admiraal radmiraal

View GitHub Profile
/**
* @return void
*/
public function initializeCreateAction() {
$propertyMappingConfiguration = $this->arguments['person']->getPropertyMappingConfiguration();
$propertyMappingConfiguration->allowAllProperties();
$person = $this->request->getArgument('person');
foreach ($person['electronicAddresses'] as $index => $tmp) {
<?php
error_reporting(E_ALL ^ E_STRICT);
ini_set('display_errors', 1);
class FetchHandler {
/**
* @var string The path to this script
*/
protected $rootPath;
/**
* The posts contained in this blog
*
* @var \Doctrine\Common\Collections\Collection<\TYPO3\Blog\Domain\Model\Post>
* @ORM\OneToMany(mappedBy="blog")
* @ORM\OrderBy({"date" = "DESC"})
*/
protected $posts;
<form name="newOrganisation" class="form-horizontal" action="manage/organisation/create.html" method="post">
<div style="display: none">
<input type="hidden" name="__referrer[@package]" value="BKWI.Kernkaart">
<input type="hidden" name="__referrer[@subpackage]" value="">
<input type="hidden" name="__referrer[@controller]" value="Manage\Organisation">
<input type="hidden" name="__referrer[@action]" value="new">
<input type="hidden" name="__referrer[arguments]" value="YTowOnt9b7f60ab3622afbb731dfe0f8afb5a98472d1be80">
<input type="hidden" name="__trustedProperties" value="a:1:{s:15:&quot;newOrganisation&quot;;a:4:{s:4:&quot;name&quot;;i:1;s:11:&quot;phoneNumber&quot;;i:1;s:7:&quot;address&quot;;i:1;s:7:&quot;aliases&quot;;a:2:{i:0;a:1:{s:4:&quot;name&quot;;i:1;}s:5:&quot;alias&quot;;a:1:{s:4:&quot;name&quot;;i:1;}}}}0983ea2280eba8bbf78b618d65377ea496b741b9">
</div>
/**
* Updates the given organisation object
*
* @param \BKWI\Kernkaart\Domain\Model\Organisation $organisation The organisation to update
* @return void
*/
public function updateAction(Organisation $organisation) {
$this->organisationRepository->update($organisation);
$this->addFlashMessage('Updated the organisation.');
$this->redirect('index');
<?php
use \TYPO3\Surf\Domain\Model\Node;
use \TYPO3\Surf\Domain\Model\SimpleWorkflow;
/**
* For this deployment the following env variables are required:
*
* DEPLOYMENT_HOST: hostname of the remote server to deploy to
* DEPLOYMENT_PATH: path on the remote server to deploy to
* DEPLOYMENT_USER: username to connect to the remote server
/**
* @var \Doctrine\Common\Collections\Collection<\Foo\Bar\Domain\Model\Branch>
* @ORM\OneToMany(mappedBy="branch")
* @Flow\Lazy
*/
protected $children;
/**
* @var \Foo\Bar\Domain\Model\Branch
* @ORM\ManyToOne(inversedBy="children")
App.ApplicationController = Ember.Controller.extend();
App.ApplicationView = Ember.View.extend({
templateName: "application"
});
App.DashboardController = Ember.Controller.extend();
App.DashboardView = Ember.View.extend({
templateName: "dashboard"
});
App.AdministrationController = Ember.Controller.extend();
App.AdministrationView = Ember.View.extend({
@radmiraal
radmiraal / install_couchdb.sh
Created December 13, 2012 11:43
Installation on Debian squeeze. It's just a POC so I did not matter too much about the details and the test that failed during the compile step, in a production environment this might need some more attention.
# Guide based on http://wiki.apache.org/couchdb/Installing_on_Debian
# Install dependencies
aptitude install -y build-essential libtool autoconf automake autoconf-archive pkg-config libssl0.9.8 libssl-dev zlib1g zlib1g-dev libcurl4-openssl-dev lsb-base ncurses-dev libncurses-dev libmozjs-dev libmozjs2d libicu-dev xsltproc
# Installing Erlang/OTP
cd /tmp/
wget http://www.erlang.org/download/otp_src_R15B01.tar.gz
tar xzf otp_src_R15B01.tar.gz
cd otp_src_R15B01
echo "skipping gs" > lib/gs/SKIP
function(doc) { emit(
[
doc.city,
'indicator_beroepsbevolking',
parseInt(doc.date.substr(0, 4))