Skip to content

Instantly share code, notes, and snippets.

View cedricziel's full-sized avatar
🥸

Cedric Ziel cedricziel

🥸
View GitHub Profile
'documents' => array(
'exclude' => 0,
'label' => 'LLL:EXT:cziel_worldcom_base/Resources/Private/Language/locallang_db.xlf:tx_czielworldcombase_domain_model_organisation.documents',
'config' => array(
'maxitems' => 10,
'type' => 'inline',
'foreign_table' => 'sys_file_reference',
'foreign_field' => 'uid_foreign',
'foreign_sortby' => 'sorting_foreign',
'foreign_table_field' => 'tablenames',
@cedricziel
cedricziel / SliderSections.html
Last active December 31, 2015 22:39
fluid sections/partials..
<f:section name="main">
<f:comment>
Render a slider...
</f:comment>
<div class="blubb">
<f:for each="{slides}" as="slide">
<f:comment>
v:switch might come in handy here...
</f:comment>
<f:if condition="...">
140121/144810.373, internalError, message: Uncaught error: Invalid session stack: Error: Uncaught error: Invalid session
at Object.exports.assert (/opt/src/ws-main/node_modules/hapi-auth-cookie/node_modules/hoek/lib/index.js:394:11)
at Object.request.auth.session.set (/opt/src/ws-main/node_modules/hapi-auth-cookie/lib/index.js:56:22)
at processLogin (/opt/src/ws-auth/lib/index.js:63:23)
at /opt/src/ws-main/node_modules/hapi/lib/handler.js:95:35
at protect (/opt/src/ws-main/node_modules/hapi/lib/ext.js:100:9)
at /opt/src/ws-main/node_modules/hapi/lib/handler.js:92:9
at Function.internals.Ext.runProtected (/opt/src/ws-main/node_modules/hapi/lib/ext.js:103:5)
at Object.internals.handler (/opt/src/ws-main/node_modules/hapi/lib/handler.js:69:9)
at exports.execute (/opt/src/ws-main/node_modules/hapi/lib/handler.js:31:19)
@cedricziel
cedricziel / setup_sshkeys.sh
Created February 13, 2014 11:35
Openshift git wrapper script creation for being able to use private git repos
#!/usr/bin/env bash
# copy this script to your gear, make it executable and run it once
# make the appropriate directory
mkdir -p "$OPENSHIFT_DATA_DIR/.ssh"
# generate a key
ssh-keygen -q -t rsa -f $OPENSHIFT_DATA_DIR/.ssh/id_rsa -N ""
if($projects = $service->getProjects()){
//if($projects = $this->projectRepository->getAllProjectsByService($service)){
foreach($projects as $project){
foreach($project->getSlides() as $slide)
$slidearray[] = $this->formatSlide($slide);
}
}
@cedricziel
cedricziel / handler.js
Created February 19, 2014 16:14
File upload with node-imager and hapijs
AccountController.prototype.setProfilePicAction = function setProfilePic(request, reply) {
// remember to load your config in imagerConfig
var imagerConfig = {json: 'config'};
var file = {
name : request.payload.file.filename,
path: request.payload.file.path,
type: request.payload.file.headers['content-type'],
size: request.payload.file.bytes
};
<IfModule pagespeed_module>
# Variables
#ModPagespeedAnalyticsID UA-6872579-4
AddOutputFilterByType MOD_PAGESPEED_OUTPUT_FILTER text/html
ModPagespeed On
# ModPageSpeed On
ModPagespeedMapOriginDomain "http://p0023.ihre-preview.de" "https://p0023.ihre-preview.de"
# ModPagespeedRewriteLevel CoreFilters
@cedricziel
cedricziel / app.env.PLAY_OPTS
Last active November 17, 2016 23:14
Deploy a Play! Framework Application behind nginx -> haproxy -> netty (Play2 core) for transient upgrading. This setup fully supports Websockets in almost any variation. - But most importantly uses 2 instances minimum to allow seamless upgrade. Prepare the instances with "cd app/instances/$instance && ~/app/play/play clean compile stage"
fooapp@srv:~$ cat app/env/PLAY_OPTS
export DATABASE_URL="jdbc:postgresql://127.0.0.1/foobar"
# We could wire a different configuration file here
# or set up a different database on the fly
export PLAY_OPTS="-DapplyEvolutions.default=true -DapplyDownEvolutions.default=true -Ddb.default.url="$DATABASE_URL" -Ddb.default.user=fooapp -Ddb.default.password=fooapppw -Ddb.default.driver=org.postgresql.Driver"
{namespace v=Tx_Vhs_ViewHelpers}
{namespace flux=FluidTYPO3\Flux\ViewHelpers}
<f:layout name="Content" />
<div xmlns="http://www.w3.org/1999/xhtml"
xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
<f:section name="Configuration">
{v:var.typoscript(path: 'plugin.tx_fluidcontentbootstrap.settings') -> v:var.set(name: 'settings')}
@cedricziel
cedricziel / Demo.html
Last active August 23, 2017 07:48
Simple SlimScroll directive for AngularJS. Requires jQuery, AngularJS and the jQuery SlimScroll (http://rocha.la/jQuery-slimScroll) Plugin.
<!-- place plugin configuration on rather the "slimScrollConfig" global value
or override it when needed -->
<div slim-scroll="{height: '500px'}"></div>