Skip to content

Instantly share code, notes, and snippets.


Nabil Redmann BananaAcid

View GitHub Profile
BananaAcid / Autodiscover.aspx
Last active Jul 2, 2018
autodiscover for Outlook, working with hMailServer (and other IMAP, SMTP connections) in C# on IIS
View Autodiscover.aspx
<%@ Page Language="C#" %>
<% Response.ContentType = "text/xml";
Nabil Redmann 2016
View eml2img.cs
* User: BananaAcid
* Date: 30.07.2012
* Type: Commandline
using System;
using System.IO;
using System.Linq;
using System.Text;
View filterNewsletterEmlsForSpecificProject.cs
* User: BananaAcid
* Date: 09.02.2011
* Type: Commandline
* Note: Form data extraction to csv from email (*.eml) files
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
BananaAcid /
Last active Sep 21, 2016
Example: basic TCP messaging

A simple TCP-server setup.

[Using Node-RED]

Easy to test your clients used. Like Telnet and others.


  • Server
  • Client
  • Proxy (for clients not terminating their messages with \n)
BananaAcid / autoshrink.js
Last active Oct 20, 2016 — forked from andrewbranch/autoshrink.js
Responds to window resize events. Max font size taken from initial font size (specify with CSS). [no modifications, just forked to extend the example.]
View autoshrink.js
(function($) {
function getTextWidth($element) {
var tester = $("<div/>").text($element.text())
.css({ "position": "absolute", "float": "left", "white-space": "nowrap", "visibility": "hidden", "font": $element.css("font"), "text-transform": $element.css("text-transform"), "letter-spacing": $element.css("letter-spacing") })
width = tester.innerWidth();
return width;
BananaAcid / .htaccess
Created Jan 8, 2017
Subdomain mapping within htaccess
View .htaccess
# Nabil Redmann 2017
# assumed: this htaccess is within htdocs/
# dev.* mapping to ./dev/
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
BananaAcid / result
Last active Aug 17, 2017
koa-better-router subdirs + includes
View result
// ˫ routes ˫ index.js
// ˫ routes ˫ api1 ˫ index.js
GET /api/v1/
GET /api/v1/x
// ˫ routes ˫ api1 ˫ a.js
PUT /api/v1/a/obj/:one/:two
View pug_mixins_PhpStorm_problem.pug
PhpStorm 2018.1 shows multiple errors and is not able to handle this fully valid PUG mixin
mixin test(param1, param2 = "test", optionalParam3)
- var xOptionalParam3 = optionalParam3 || "is none";
<!{param1}> !{param2} => !{xOptionalParam3} </!{param1}>
BananaAcid / precompile pug with normal php - pug file src
Last active Apr 19, 2019
Working with PUG (Jade) and PHP to generate HTML with PHP (Pug2PHP)
View precompile pug with normal php - pug file src
using the PUGjs pre-compiler, ($ npm i -g pug )
HTML with included PHP will be generated as .php -
then served using the webserver as any other PHP file
lines starting with `<` will be handled as if they were prefixed
with `|` (pipe) == that is: as text.
indented lines are not inheriting the text-content-mode.
BananaAcid / RGB-blink-n-toggle.ino
Last active May 24, 2018
Toggle 3 leds (or an RGB) - mode 0 is switching pins 1-3 (Arduino / ESP32 / ESP8266)
View RGB-blink-n-toggle.ino