Skip to content

Instantly share code, notes, and snippets.

@leobm
leobm / istspahnnochimamt-widget.js
Created August 6, 2025 07:48
www.istspahnnochimamt.de mini Widget für die eigenen Webseite
(function() {
const e = document.createElement("style");
e.textContent = `.spahn-widget{background-color:#7c86ff;color:#fff;font-family:-apple-system,BlinkMacSystemFont,'SegoeUI',Roboto,Oxygen,Ubuntu,sans-serif;max-width:600px;padding:2rem;margin:1rem
auto;text-align:center;border-radius:8px}.spahn-widget h1{font-size:4rem}.spahn-widget .answer{font-size:3rem;font-weight:bold;margin-bottom:1rem}.spahn-widget .description{font-size:1.5rem;line-height:1.4}`;
document.head.appendChild(e);
const t = document.createElement("div");
t.className = "spahn-widget", t.innerHTML = `<h1>Ist Spahn noch im Amt?</h1><div class="answer" id="spahn-answer">Lade...</div><div class="description" id="spahn-description"></div>`, document.body.appendChild(t), fetch("https://istspahnnochimamt.de/api/v1/inOffice").then(e => e.json()).then(e => {
document.getElementById("spahn-answer").textContent = e.isSpahnStillInOffice ? "Leider ja" : "Endlich Nein 🥳", document.getElementById("spahn-description").innerHTM
// ==UserScript==
// @name TweetXer
// @namespace https://github.com/lucahammer/tweetXer/
// @version 0.9.3
// @description Delete all your Tweets for free.
// @author Luca,dbort,pReya,Micolithe,STrRedWolf
// @license NoHarm-draft
// @match https://x.com/*
// @match https://mobile.x.com/*
// @match https://twitter.com/*
@BugBuster1701
BugBuster1701 / mig480.php
Last active March 11, 2020 10:55
Contao 4.8.0 DB Migration wichtiger Teil eines Bildes
<?php
//ich muss ins web/ Verzeichnis, Aufruf über Browser oder Kommandozeile
//vorher DB Backup durchführen der tl_files Tabelle zur Sicherheit
define('TL_SCRIPT', 'MIGRATION480');
define('TL_MODE' , 'FE');
include __DIR__.'/../system/initialize.php';
<?php
die ('This is not executable now! Please comment out this line.');
$config = array(
'url' => 'https://getcomposer.org/composer.phar',
'dir' => __DIR__ . '/composer',
'bin' => __DIR__ . '/composer/composer.phar',
'json' => __DIR__ . '/composer/composer.json',
'command' => 'install' // The composer command update/install
@discordier
discordier / endlessscroll.js
Created March 22, 2017 22:11
Endless scrolling for MetaModels content elements.
jQuery(document).ready(function () {
var j= jQuery,
container = '.ce_metamodel_content',
list = '.layout_full',
entry = '.item',
pagination = j('.pagination');
var urls = [],
scrolled = function (elem) {
var
@RavuAlHemio
RavuAlHemio / contao3.conf
Last active July 21, 2017 21:51
Contao 3 and 4 nginx.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)$ {
@fiedsch
fiedsch / Contao backup script
Last active October 20, 2018 16:42
Contao Backup
moved to repository https://github.com/fiedsch/contao-backup-script
see also https://github.com/fiedsch/contao-4-backup-script (for Contao 4)
@stefansl
stefansl / contao-db-update.php
Last active October 17, 2019 21:01
Modified path upgrade script for contao. No config editing necessary. Copy in your Contao root and run.
<?php
/*
When updating from Contao 2 to Contao 3, you must not rename the tl_files folder to files!
If you want to re­name the folder, you have to take the following steps:
· Complete the version 3 update in the install tool
· Then rename the upload folder in the back end settings to files
· Last run the modified version of Tristan's script
@psi-4ward
psi-4ward / contao.conf
Last active October 19, 2016 10:44
NGINX Contao 3 Config with PHP-FPM
index index.php index.html index.html;
client_max_body_size 200M;
sendfile on;
error_page 404 /404.html;
location / {
try_files $uri $uri/ /index.php?$args;
}
location = /favicon.ico {
@stefansl
stefansl / dcaconfig.php
Last active June 15, 2018 17:31
Some personal improvements in Contao (/system/config/dcaconfig.php)
// Reihenfolge der Headline-Typen ändern
$GLOBALS['TL_DCA']['tl_content']['fields']['headline']['options']= array('h2', 'h3', 'h4', 'h5', 'h6', 'h1');
// Artikel und Seiten standardmäßig auf 'veröffentlicht' stellen
$GLOBALS['TL_DCA']['tl_article']['fields']['published']['default'] = true;
$GLOBALS['TL_DCA']['tl_page']['fields']['published']['default'] = true;
// HTML in Überschriften erlauben
$GLOBALS['TL_DCA']['tl_content']['fields']['headline']['eval']['allowHtml'] = true;