Skip to content

Instantly share code, notes, and snippets.

@Mabahe
Mabahe / query_page_tree.sql
Last active May 9, 2025 13:01 — forked from eliashaeussler/query_page_tree.sql
Query TYPO3 page tree with MySQL 8+
set @rootPageId := 15047;
set @maxDepth := 99;
with recursive children as (
select root.*, 1 as depth
from pages root
where root.uid = @rootPageId
or (root.sys_language_uid > 0 and root.l10n_parent = @rootPageId)
and root.deleted = 0
union all
<?php
// INPUT: phpMyAdmin xml-dump
// HOW TO: on CLI: php dump-to-dataset.php dumpfile.xml
// OUTPUT: dumpfile.xmldataset.xml
$xsl = "<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:template match='/'>
<dataset><xsl:text>&#xa;</xsl:text>
<xsl:for-each select='pma_xml_export/database/table'>
@Mabahe
Mabahe / migrate_repo.sh
Created February 10, 2016 10:36 — forked from mariozig/migrate_repo.sh
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror [email protected]:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
#!/bin/bash
#
# This script will
# * fire up a ramdisk
# * start a mysql server using it as storage
# * copying your typo3 database to ram
# * run the tests
# * clean up
#
# use -k as parameter to clean-up after a failed run