Skip to content

Instantly share code, notes, and snippets.

View christophengelmayer's full-sized avatar

Christoph Engelmayer christophengelmayer

View GitHub Profile
@christophengelmayer
christophengelmayer / language-switch.php
Created January 5, 2017 13:12
ProcessWire Language Switch
<ul class="navigation__language">
<?php
foreach($languages as $language) {
if(!$page->viewable($language)) continue;
$class = "$language" == "$user->language" ? "navigation__current" : "";
$url = $page->localUrl($language);
echo "<li class='$class'><a title='$language->title' href='$url'>$language->title</a></li>";
}
?>
</ul>
@christophengelmayer
christophengelmayer / Makefile
Created January 7, 2017 19:36
Makefile Laravel deployment
rsync:
rsync -avzu --delete --progress -h \
--exclude 'Makefile' \
--exclude '.git' \
--exclude '/.env' \
--exclude '/public/.htaccess' \
--exclude '/database/database.sqlite' \
--exclude '/public/storage' \
--exclude '/bootstrap/cache' \
--exclude 'storage/framework/*' \
@christophengelmayer
christophengelmayer / CustomFormFinisher.php
Created June 19, 2017 15:15
NEOS CMS FormFinisher - Email with attachments
<?php
// Classes/Finishers/CustomFormFinisher.php
namespace UnWomen\Website\Finishers;
use Neos\Flow\Annotations as Flow;
use Neos\Form\Core\Model\AbstractFinisher;
use Neos\Form\Exception\FinisherException;
use Neos\FluidAdaptor\View\StandaloneView;
use Neos\SwiftMailer;
prototype(Your.Site:AbstractPage) < prototype(Page) {
head {
headTags = ${'
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
'}
stylesheets {
css = Neos.Fusion:Tag {
tagName = 'link'
attributes {
@christophengelmayer
christophengelmayer / ajax.js
Created November 3, 2015 10:32
Vanilla JavaScript AJAX Function
var ajax = (function () {
var ajax = {};
ajax.get = function (url, callbackFunc) {
var req = prepareRequest('GET', url, callbackFunc);
req.send();
}
ajax.post = function (url, params, callbackFunc) {
var req = prepareRequest('POST', url, callbackFunc);
@christophengelmayer
christophengelmayer / Settings.yaml
Last active January 21, 2020 21:35
Neos CMS + webpack-dev-server
# Configuration/Development/Webpack/Settings.yaml
Neos:
Flow:
http:
baseUri: 'http://localhost:3000/'
@christophengelmayer
christophengelmayer / tailwind-resonsive-embed.html
Last active March 26, 2023 13:42
Tailwind CSS responsive Video embed
<div class="relative" style="padding-top: 56.25%">
<iframe class="absolute inset-0 w-full h-full" src="https://www.youtube-nocookie.com/embed/FMrtSHAAPhM" frameborder="0" …></iframe>
</div>
@christophengelmayer
christophengelmayer / Contract Killer 3.md
Last active November 25, 2023 10:24 — forked from malarkey/Contract Killer 3.md
Contract Killer 3 - German Translation / Deutsche Übersetzung von Contract Killer 3, einer Vertragsvorlage für Webdesign und -development Tätigkeiten.

Contract Killer 3 deutsch

Letzte Änderung: 21.01.2013

Zwischen uns [Unser Firmenname] und Ihnen [Name des Kunden]

Zusammenfassung:

Wir tun immer unser Bestes um Ihre Bedürfnisse und Erwartungen zu erfüllen, jedoch ist es wichtig Dinge niederzuschreiben damit jeder weiß, was was ist, wer was und wann tuen soll und was passiert wenn etwas schief läuft. In diesem Vertrage werden Sie keine komplizierten, in Juristensprache verfassten Geschäftsbedingungen oder lange Passagen von unleserlichem Text finden.