Skip to content

Instantly share code, notes, and snippets.

View Radiergummi's full-sized avatar
💻
Yes of course I can implement that 🥲

Moritz Friedrich Radiergummi

💻
Yes of course I can implement that 🥲
View GitHub Profile
@Radiergummi
Radiergummi / 6379.conf
Created January 12, 2016 16:13
Current redis configuration
# Redis configuration file example
# Note on units: when memory size is needed, it is possible to specify
# it in the usual form of 1k 5GB 4M and so forth:
#
# 1k => 1000 bytes
# 1kb => 1024 bytes
# 1m => 1000000 bytes
# 1mb => 1024*1024 bytes
# 1g => 1000000000 bytes
@Radiergummi
Radiergummi / gist:05940a00f805d7581ce5a4cbe66f1d05
Created May 3, 2017 11:56 — forked from sprankhub/gist:a386a2969ca7cc6f6552
Fish Shell Autocompletion for the Magento 2 Shell Script
# Installation:
# Copy to ~/.config/fish/completions/magento.fish
# Open new or restart existing shell session
# Commands based on Magento 2.0.0-rc and the command
# bin/magento --raw --no-ansi list
# It is a static list since you probably do not have the magento shell script
# in your path.
complete -f -c magento -s h -l help -d "Displays help for a command";
complete -f -c magento -s q -l quiet -d "Do not output any message";
@Radiergummi
Radiergummi / drag.js
Created May 15, 2017 12:49
DripDrop rewrite ES6 + eventEmitter
// node - The dom node to set as a drag handle
// options
// image - Can take on one of the following possible values:
// false - (Default) No image
// true - The default generated drag image
// string - The path to an image
// imageObject - If this is an Image object, that will be used
// start(setData, e) - Called when dragging starts. Use setData to set the data for each type.
// setData(type, data) - Sets data for a particular type.
@Radiergummi
Radiergummi / Api.php
Last active September 16, 2017 07:12
CraftCMS API Wrapper class
<?php
namespace Craft;
use Closure;
use function array_merge;
/**
* API endpoints wrapper
*
@Radiergummi
Radiergummi / README.md
Last active November 24, 2017 11:22
Phoenix

Phoenix

A lightweight and modular framework to document code projects

Reasoning

Born out of frustration while working on a Vue.js project, I decided to write something on my own. The amount of work to generate documentation for a simple project involving Vue.js components seemed tedious to me: While there are certain packages that parse single file components, it seemed near

@Radiergummi
Radiergummi / TimeSpan.php
Last active July 12, 2018 16:49
TimeSpan class - a flexible PHP class to handle time calculations
<?php
/**
* TimeSpan class
* ==============
*
* Provides a convenience class to handle time amounts and time spans: Ever wondered how to easily figure out how many
* hours there are between 09:15:31 and 18:55:01? This class is for you. Going with the example, it's as easy as:
*
* `echo (new TimeSpan('18:55:01'))->sub('09:15:31')->format('h:m'); // '09:39'`
@Radiergummi
Radiergummi / http.js
Created July 26, 2018 21:31
Micro ajax wrapper in vanilla JS
/**
* Micro-wrapper for HTTP requests
*
* @type {Object}
*/
window.http = {
/**
* Builds a valid URL. Unless a full URL (including a protocol) is given, the current origin will be used.
*
@Radiergummi
Radiergummi / laroute.vue.js
Last active September 18, 2018 09:58
This is a simple Vue plugin implementation of Laroute
'use strict';
//noinspection JSFileReferences
/**
* This is a generic HTTP module such as axios, which needs to be defined by the user.
* Maybe as a config setting?
*/
import http from './modules/http';
/**
@Radiergummi
Radiergummi / TemplateEditor.vue
Last active October 11, 2018 11:44
Twig template editor Vue component
<template>
<article class="template-editor">
<header>
<h2 class="editor-heading">Twig Template editor</h2>
</header>
<section class="variable-editor">
<header>
<h3 class="variables-heading">
Variables
<span class="variable-count">{{ Object.keys(this.variables).length }}</span>
'use strict';
import FileSaver from 'file-saver';
import JSZip from 'jszip';
class Spreadsheet {
/**
* Holds all replacement strings to escape
*