Skip to content

Instantly share code, notes, and snippets.

View lisandi's full-sized avatar

Andreas Becker lisandi

View GitHub Profile
@lisandi
lisandi / ep_new.sh
Last active October 6, 2021 16:26
Demo structure and content for an etherpad plugin.
#! /bin/sh
echo "CREATE YOUR NEW ETHERPAD PLUGIN"
echo "-------------------------------"
echo "With this script you can develop different kinds of etherpad plugins:"
echo
echo "A. ep_newplugin you can develop Modules for EtherPad by ether (ep_)"
echo " Please leave the Identifier option empty when you develop for Etherpad in general"
echo
echo "B. ep_id_newplugin.sh you can develop Modules for i.e. T3Pad (ep_t3_), the Pad for education and communities"
@lisandi
lisandi / ep_newplugin.txt
Created October 3, 2021 15:47
Creating New structure for Etherpad Plugin -> Select All -> Copy Paste to Shell -> Change the name for the Plugin and press Enter
# Creating the directory structure
mkdir ep_123 ep_123/locales ep_123/static ep_123/static/css ep_123/static/js ep_123/static/image ep_123/static/tests ep_123/templates
&
# Creating ep_123/package.json
cat <<EOF >ep_123/package.json
{
"name": "ep_PLUGINNAME",
"version": "0.0.1",
"description": "DESCRIPTION",
"author": {
@lisandi
lisandi / gist:07dcc913bc7f2ed451c5aae224222ca3
Created February 22, 2021 10:49
Sngine - downloaded User Information Example - links got replaced
<!doctype html> <html lang="en_us" > <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"> <title>My Information</title> <link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700" rel="stylesheet" /> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous"> <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous"> <style type="text/css">/**
* Index:
*
* 01. BASIC
* 02. MAIN
* 03. HEADER
* 04. COMMON
* 05. PUBLISHER
* 06. POST
* 07. COMMENT
@lisandi
lisandi / divi-mobile-submenu-toggles.css
Created March 8, 2018 01:57 — forked from Garconis/divi-mobile-submenu-toggles.css
Divi | WordPress Theme | Mobile Menu Collapsible Submenus via Toggles | CSS & jQuery Tweaks in action: https://i.gyazo.com/93557e9ef5d4aad260e22c6d5896de3b.mp4
/* when mobile menu is open, change hamburger icon to x icon */
#et_mobile_nav_menu .mobile_nav.opened .mobile_menu_bar::before {
content: '\4d';
}
/* makes sub sub menu icon be right arrow instead of down arrow */
#top-menu .menu-item-has-children .menu-item-has-children > a:first-child::after,
#et-secondary-nav .menu-item-has-children .menu-item-has-children > a:first-child::after {
content: '5';
}
@lisandi
lisandi / jpopt.sh
Created September 5, 2016 07:32 — forked from johan/jpopt.sh
jpopt is a convenience shell wrapper around jhead and jpegtran, for losslessly shrinking jpeg files in batch, written by Fredrik Mellström.
#! /bin/sh
# Lossless repacking of JPEG images, to save disk space
# Keeps EXIF tags and comments on digital camera images, otherwise wipes them
# Requires the "jhead" program to function properly
# Keeps file timestamps, or sets file time to EXIF timestamp if present
# Fredrik Mellström <traal@chalmers.se>, Aug 2005
# Usage examples:
# jpopt *.jpg
<?php
// ------------------------------ FORM Processing ---------------------------------------
$errors = null;
$success = false;
// helper function to format form errors
function showError($e){
return "<p class='error'>$e</p>";
<?php
$out = '';
// create a new form field (also field wrapper)
$form = $modules->get("InputfieldForm");
$form->action = "./";
$form->method = "post";
$form->attr("id+name",'subscribe-form');