Skip to content

Instantly share code, notes, and snippets.

@cukabeka
cukabeka / gdocs-mailmerge.gs
Created January 10, 2024 21:21
MailMerge Google Docs Script für Serienbriefe
BATCH_SIZE=50;
/*
Beim start werden neue Menüpunkte zu Sheets hinzugefügt
*/
function onOpen() {
renderMenu();
}
/*
@cukabeka
cukabeka / flac2mp4.py
Last active April 15, 2023 17:13
FLAC to mp4 converter for SPOTREC downloads
# parameters not working yet, added removal of number prefixes
import os, re
from mutagen import File
from mutagen.mp4 import MP4, MP4Cover
from subprocess import call
input_folder = "flac_to_convert"
output_folder = "mp4"
quality = "320"
@cukabeka
cukabeka / unzip.php
Created December 20, 2022 12:20
Simple Server Unzip
<?php
// Open the zip file
$zip = new ZipArchive;
if ($zip->open('input.zip') === TRUE) {
// Extract the file to the specified destination
$zip->extractTo('./');
$zip->close();
echo 'Zip file extracted successfully!';
} else {
@cukabeka
cukabeka / clean_wpimport_for_pelican.py
Created September 1, 2022 23:22 — forked from kevingoldsmith/clean_wpimport_for_pelican.py
Clean up the markdown code created from pelican-import from wordpress including downloading and re-adding all the images
import argparse
import xml.etree.ElementTree as ET
from bs4 import BeautifulSoup
import urllib.request
from urllib.parse import urlparse
import os
import re
def get_downloads_from_img(img):
return_list = []
@cukabeka
cukabeka / wallabag_2.3.8_fresh_install.sql
Last active April 4, 2020 23:47
A SQL database scheme dump for folks interested in the adventure to install wallabag on a shared hoster… Just import this into your Database with PHPMyAdmin and edit the MySQL credentials in app/config/parameters.yml
-- phpMyAdmin SQL Dump
-- version 3.5.8.1
-- http://www.phpmyadmin.net
--
-- Server Version: 5.7.28-nmm1-log
-- PHP-Version: 5.6.38-nmm2
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
@cukabeka
cukabeka / yfeed output
Created September 30, 2016 13:41
redaxo YFeed output - thx Alex Walther
<section class="modul modul-yfeed" id="modul-REX_SLICE_ID">
<div class="wrapper">
<h2>###modul:yfeed:title###</h2>
<div class="modul-yfeed-twitter">
<h3>Twitter</h3>
<?php
$yfeed_items = rex_sql::factory()->getArray('SELECT * FROM rex_yfeed_item WHERE stream_id = 2 ORDER BY date DESC LIMIT 3');
if (count($yfeed_items)) {
@cukabeka
cukabeka / class.xform.action_saveinsession.inc.php
Last active July 30, 2020 14:02 — forked from anonymous/class.xform.action_saveinsession.inc.php
REDAXO XForm mit Sessions nutzen + Beispiel
<?php
/*
Danke an Blumbeet für diese Action!
$objparams["actions"][] = "db"; // z.b. email, datenbank, als datei speichern etc.
$objparams["action_params"][] = array(
"table" => "REX_VALUE[8]",
"where" => "REX_VALUE[8]",
@cukabeka
cukabeka / copycats.php
Last active August 29, 2015 14:08 — forked from dajoho/copycats.php
<?php
error_reporting(0);
include 'redaxo/include/master.inc.php';
error_reporting(E_ALL ^E_NOTICE);
ini_set('display_errors', 1);
$CLONE_THIS_ID = 184;
$DUPLICATE_MODULES = true;
@cukabeka
cukabeka / backup-files.php
Created February 18, 2014 21:09
Backup Files
<?php
#http://www.phpbuddy.eu/spl-standard-php-library.html?showall=1
ini_set("max_execution_time", 0);
$verzeichnis = new RecursiveIteratorIterator(
new RecursiveDirectoryIterator( './redaxo' ), true );
$zip = new ZipArchive;
$resource = $zip->open( 'redaxo.zip', ZipArchive::CREATE );
if ($resource === TRUE)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="en-UK">
<head>
<title>Buki's Unzipper Script</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="generator" content="thekid" />
<meta name='robots' content='noindex,nofollow' />
</head>
<body>