Skip to content

Instantly share code, notes, and snippets.

View olafgleba's full-sized avatar

Olaf Gleba olafgleba

View GitHub Profile
@olafgleba
olafgleba / cleanup-orphaned-page-folders.php
Last active January 25, 2026 23:01
Clean up orphaned page folders in ProcessWire
<?php namespace ProcessWire;
/**
* Cleanup orphaned page folders and their content
*
* - Only delete page folders WITH NO existing Page-ID.
* - Implements a dry run mode
* - Tested with ProcessWire 3.0.x, PHP 8.4.x
*
* Place the script file in the root of your PW installation (or
@olafgleba
olafgleba / swap-multilanguage-content.php
Last active January 25, 2026 23:01
Swap multilanguage content when changing the default language in ProcessWire.
<?php namespace ProcessWire;
/**
* Swap the content of multilingual fields between two languages
*
* - Tested with ProcessWire 3.0.x, PHP 8.4.x
*
* Usage:
*
* Place the script file in the root of your PW installation (or
@olafgleba
olafgleba / atom-styles.less
Created July 2, 2016 16:02
Bigger Tags in Atom Editor
.tab-bar {
height: 45px;
}
.tab-bar .tab {
height: 45px;
padding-right: 32px;
}
.tab-bar .tab:hover {
@olafgleba
olafgleba / browsersync-install-grunt-plugin.js
Created December 5, 2015 11:06
Browsersync Grunt Plugin installieren
$ npm install grunt-browser-sync --save-dev
@olafgleba
olafgleba / browsersync-source-examples-gulp-4.js
Last active March 22, 2016 12:21
Browsersync mit PHP Server nutzen
var gulp = require('gulp');
var bs = require('browser-sync').create();
var runSequence = require('run-sequence');
var connect = require('gulp-connect-php');
gulp.task('php', function() {
php.server({
base: './app',
port: 8001,
}, function (){
var gulp = require('gulp');
var bs = require('browser-sync').create();
var runSequence = require('run-sequence');
...
@olafgleba
olafgleba / browsersync-install-runsequence-gulp.js
Created December 4, 2015 23:03
Installation NPM Modul run-sequence
$ npm install run-sequence --save-dev
@olafgleba
olafgleba / browsersync-source-examples-gulp-3.js
Last active December 4, 2015 23:59
LibSASS + CSS Injection + Reload bei HTML/JS Änderungen
var gulp = require('gulp');
var sass = require('gulp-sass');
var bs = require('browser-sync').create();
var runSequence = require('run-sequence');
gulp.task('browser-sync', function() {
bs.init({
server: {
baseDir: './'
}
@olafgleba
olafgleba / browsersync-install-gulp.js
Last active December 4, 2015 22:55
Browsersync per NPM installieren
$ npm install browser-sync --save-dev
@olafgleba
olafgleba / browsersync-init-gulp.js
Last active December 8, 2015 10:49
Browsersync im Gulpfile einbinden
var gulp = require('gulp');
var bs = require('browser-sync').create();
/**
* Server-Modus
* 1. Berücksichtige alle Dateien in dem hier angegebenen Ordner
*/
gulp.task('browser-sync', function() {
bs.init({
server: {