Skip to content

Instantly share code, notes, and snippets.

View radmiraal's full-sized avatar

Rens Admiraal radmiraal

View GitHub Profile
<?php
/* *
* This script belongs to the TYPO3 Flow framework. *
* *
* It is free software; you can redistribute it and/or modify it under *
* the terms of the GNU Lesser General Public License, either version 3 *
* of the License, or (at your option) any later version. *
* *
* The TYPO3 project - inspiring people to share! *
if ($this->arguments->hasArgument('resource')) {
$propertyMappingConfiguration = $this->arguments->getArgument('resource')->getPropertyMappingConfiguration();
$propertyMappingConfiguration->setTypeConverterOption(
'TYPO3\Flow\Property\TypeConverter\PersistentObjectConverter',
\TYPO3\Flow\Property\TypeConverter\PersistentObjectConverter::CONFIGURATION_TARGET_TYPE,
$this->resourceConfiguration['model']
);
}
Radmiraal:
Emberjs:
applications: []
paths:
ember:
path: 'emberjs/@version/ember'
package: 'Radmiraal.Emberjs'
ember-data:
path: 'emberjs/@version/ember-data'
package: 'Radmiraal.Emberjs'
/**
*
*/
public function callActionMethod() {
if ($this->request->getFormat() === 'jsonp') {
try {
parent::callActionMethod();
} catch (\Exception $exception) {
$this->response->setContent(sprintf('<div class="alert alert-error">%s</div>', $exception->getMessage()));
}
protected function initializeView(\TYPO3\Flow\Mvc\View\ViewInterface $view) {
if ($this->request->getControllerActionName() === 'index') {
$view->setTemplatePathAndFilename('resource://My.Package/Private/Templates/Login/Login.html');
}
}
App = Ember.Application.create();
App.Node = Ember.Object.extend({
name: null,
children: []
});
App.TreeNodeView = Ember.View.extend({
templateName: 'node-template',
classNameBindings: ['isOpen', 'hasChildren']
@radmiraal
radmiraal / CommandController.php
Last active December 12, 2015 02:49
A completely untested possible way of registering plugins in swift
<?php
class CommandController {
$mail = t3lib_div::makeInstance('MyOwnCustomMailMessageObject');
}
?>
App.Router = Ember.Router.extend({
enableLogging: true,
root: Ember.Route.extend({
// Transitions
showModuleDocuments: Ember.Route.transitionTo('moduleDocuments'),
showModuleTask: Ember.Route.transitionTo('moduleTask'),
showSettings: Ember.Route.transitionTo('settings'),
showManagement: Ember.Route.transitionTo('management'),
showAdministration: Ember.Route.transitionTo('administration'),
App.Router = Ember.Router.extend({
root: Ember.Route.extend({
showDashboard: Ember.Route.transitionTo("dashboard"),
showDocumentModule: Ember.Route.transitionTo("documentModule"),
showTaskModule: Ember.Route.transitionTo("taskModule"),
showManagement: Ember.Route.transitionTo("management"),
showAdministration: Ember.Route.transitionTo("administration"),
showSettings: Ember.Route.transitionTo("settings"),
dashboard: Ember.Route.extend({
route: "/",
#!/bin/bash
#
# Parses DHCP options from openvpn to update resolv.conf
# To use set as 'up' and 'down' script in your openvpn *.conf:
# up /etc/openvpn/update-resolv-conf
# down /etc/openvpn/update-resolv-conf
#
# Used snippets of resolvconf script by Thomas Hood <[email protected]>
# and Chris Hanson
# Licensed under the GNU GPL. See /usr/share/common-licenses/GPL.