Skip to content

Instantly share code, notes, and snippets.


Stefan Schulz-Lauterbach stefansl

View GitHub Profile

Contao 4 Lokales Bundle

Mit der folgenden Anleitung wird ein lokales Contao 4 Bundle angelegt, das ein Inhaltselement mit der Ausgabe "Hello World" erzeugt.

Das Bundle wird nicht über Composer installiert, sondern einfach in die Anwendung gelegt. Es wird nicht das AppBundle verwendet, sondern ein eigener Vendor und Bundle Name.

Der Vendor Name für das Beispiel ist "Acme" der Bundle Name "TestBundle". Diese Strings müssen bei einem eigenen Bundle entsprechend ersetzt werden.

Bundle Erstellung

avafloww /
Last active Aug 28, 2021
This snippet of code is syntactically valid in both PHP and Java, and produces the same output in both.
//*/public class PhpJava { public static void main(String[] args) { System.out.printf("/*%s",
class PhpJava {
static function main() {
"Hello World!");
juliangruber / extend.plist
Last active Aug 23, 2020
Here is how to accept files dropped on an @electronjs app's icon in osx. For this to work you need to properly package the app into a `.app`, and to place the CFBundleDocumentTypes spec into it's Info.plist. Here we're using electron-packager.
View extend.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
<string>All Files</string>
shyim / Gulpfile.js
Last active Nov 27, 2018
Gulp Shopware with browser-sync
View Gulpfile.js
function basename(path) {
return path.split('/').reverse()[0];
var gulp = require('gulp'),
less = require('gulp-less'),
concat = require('gulp-concat'),
rename = require('gulp-rename'),
path = require('path'),
fs = require('fs'),
RavuAlHemio / contao3.conf
Last active Jul 21, 2017
Contao 3 and 4 nginx.conf
View contao3.conf
index index.php index.html;
location ~ ^/(favicon\.ico|robots\.txt)$ {
allow all;
log_not_found off;
access_log off;
# don't show templates
location ~* \.(tpl|html5|xhtml)$ {
natelandau / .bash_profile
Last active Sep 22, 2022
Mac OSX Bash Profile
View .bash_profile
# ---------------------------------------------------------------------------
# Description: This file holds all my BASH configurations and aliases
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
johndwells / .htaccess
Created Feb 26, 2013
One htaccess to rule them all. Combo of 5G Blacklist + HTML5Boilerplate + EECMS.
View .htaccess
# ----------------------------------------------------------------------
# @
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
# ----------------------------------------------------------------------
<IfModule mod_rewrite.c>
RewriteEngine On
jareware /
Last active Sep 19, 2022
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

leofeyer / contao-db-update.php
Created Aug 9, 2012
Update path in database
View contao-db-update.php
// Database credentials
$strHost = 'localhost';
$strUser = '';
$strPassword = '';
$strDatabase = '';
// From and to path
$strFrom = 'tl_files/';