Skip to content

Instantly share code, notes, and snippets.

Avatar

Nabil Redmann BananaAcid

View GitHub Profile
@BananaAcid
BananaAcid / fix-schule.hessen.js
Created Sep 30, 2021
Remember User name, and fix spacings in inserted one-time-passwords (copied from Authy)
View fix-schule.hessen.js
// ==UserScript==
// @name schule.hessen.de - Nabil
// @namespace http://tampermonkey.net/
// @version 1.0
// @description Remember User name, and fix spacings in inserted one-time-passwords (copied from Authy)
// @author NR 2021
// @match https://owa.hessen.de/logon/LogonPoint/tmindex.html
// @icon https://www.google.com/s2/favicons?domain=hessen.de
// @grant none
// ==/UserScript==
@BananaAcid
BananaAcid / cache-promise-returns.mjs
Last active Sep 30, 2021
simple, ugly and working (should probably be a class)
View cache-promise-returns.mjs
/*
* cache module for promise returns
*
* @author Nabil Redmann <repo+gist@bananaacid.de>
* @license ISC
*
* USE:
* cache.setTTL(10*1000); // optional
*
* let [ret1, ret2, ret3] = await cache.create(
View howto-rpi-pihole.md
  1. RaspberryPi OS

  2. PPI (connect screen and keyboad)

    • login: pi:raspberry
    • sudo raspi-config
      • WLAN ?
        • set it up.
@BananaAcid
BananaAcid / getOutput.mjs
Last active May 17, 2021
get process output / async JS
View getOutput.mjs
/*
* Get output and exitcode from a command
*
* @author Nabil Redmann <repo+gist@bananaacid.de>
* @license ISC
*
* import getOutput from './getOutput.mjs';
* let {out, code} = getOutput('ls', ['-l', '*.txt']);
*/
import { spawn } from 'child_process';
@BananaAcid
BananaAcid / readme.md
Last active Jan 22, 2021
Web-Starter Package on VSCode für Mediengestalter
View readme.md

This is a living-document... immer wenn Änderungen nötig werden, werde ich dies hier updaten.

1. Installieren (Kommandozeile)

win:VSCode (per Win+R und eingeben: cmd )

\>  bitsadmin /transfer vscode /download /priority normal "https://aka.ms/win32-x64-user-stable" "%temp%\vscode.latest.exe" &&  %temp%\vscode.latest.exe /SILENT /NORESTART /MERGETASKS=!runcode
@BananaAcid
BananaAcid / web.config
Last active Jan 2, 2021
contao/iis web.config
View web.config
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<!-- HTTPS !!
<rule name="Redirect to https" stopProcessing="true">
@BananaAcid
BananaAcid / .gitignore
Created Mar 14, 2020
Pack up a project and some couchdb docs
View .gitignore
node_modules
.gitignore
thumbs.db
@BananaAcid
BananaAcid / local-redis-check.ps1
Created Jan 23, 2020
Check if a local redis server is up and running (no redis-cli for https://www.memurai.com/)
View local-redis-check.ps1
tnc 127.0.0.1 -port 6379
View SimplestHttpFileServer.cs
using System;
using System.IO;
using System.Text;
using System.Threading.Tasks;
using System.Net;
namespace SimplestHttpFileServer
{
class Program
@BananaAcid
BananaAcid / asyncWrappers.pug
Last active Dec 22, 2019
Promise/Callback fn wrappers for then-pug (which is generators based)
View asyncWrappers.pug
//- will only work with the `npm install then-pug` module instead of default `pug`
//- passed in locals are: sendmail (node module), insp which is require('util').inspect, and just passed in Promise
-
// for functions having the second param as callback (e.g. nodejs fs.readFile)
function syncifyCb(fn) {
return function* (param1) {
let result = null;
yield function* () {