Skip to content

Instantly share code, notes, and snippets.

Build failed

Michael Neu michaelneu

Build failed
View GitHub Profile
michaelneu / customized-winston-logger.js
Created Sep 3, 2016
Customized Winston logger with chalk-colored output
View customized-winston-logger.js
var winston = require("winston"),
dateformat = require("dateformat"),
chalk = require("chalk");
module.exports = new (winston.Logger)({
transports: [
new (winston.transports.Console)({
timestamp: function () {
return dateformat(, "yyyy-mm-dd HH:MM:ss.l");
michaelneu / blank.html
Last active Apr 5, 2021
A blank page with quotes for Safari's new dark mode
View blank.html
<!doctype html>
<meta charset="utf-8">
<style type="text/css">
@keyframes fade-white {
0% {
background-color: #1e1e1e;
michaelneu / Dockerfile
Last active Mar 27, 2021
docker-compose configuration for PHP with NGINX and MySQL, including sendmail, MailDev and phpmyadmin
View Dockerfile
# see for more information
FROM php:5-fpm
RUN apt-get update && apt-get install -q -y ssmtp mailutils && rm -rf /var/lib/apt/lists/*
RUN docker-php-ext-install mysql mysqli sysvsem
RUN pecl install xdebug-2.5.5 \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name" > /usr/local/etc/php/conf.d/xdebug.ini \
michaelneu /
Last active Mar 22, 2021
A basic, but fast git prompt.


This is a considerably faster, but much more basic alternative to bash-git-prompt.

When adding this script to your .bash_profile or .bashrc, it'll display the selected branch of the current folder (if it's a git repo), and whether it's modified (yellow) or contains staged files (cyan).


The script makes the assumption, that a .git folder only exists when the directory is a git repo. Also, it checks for the english version of the git status command, so if you're using git in a different locale, make sure to adjust this.

michaelneu /
Created Jun 27, 2014
Use Raspberry Pi as external network-monitor
screen_res='python -c "import Tkinter; r = Tkinter.Tk(); print r.winfo_screenwidth(), r.winfo_screenheight(); r.destroy();"'
d=`ssh pi@$PI_IP "export DISPLAY=:0 && $screen_res"`
case $1 in
michaelneu /
Created Apr 30, 2020
vscode C++ tools keep hogging memory, even though IntelliSense is configured to 1GB. Start this script and get notified when it kills the language server, before your system gets unusable
function warn {
i3-nagbar -t warning -m 'killed vscode cpp language server' > /dev/null
function kill_leak {
memory_leak=$(ps -eo pmem,pid,cmd | sort -k1 -nr | head -n1)
if [[ $memory_leak == *"cpptools-srv"* ]]; then
michaelneu / hide.css
Created Apr 9, 2020
A Chrome extension to remove the menubar from the Slack webapp.
View hide.css
.p-client.p-client--ia-top-nav {
grid-template-rows: 0 auto min-content;
.p-client.p-client--ia-top-nav > .p-top_nav {
opacity: 0.1;
.p-client.p-client--ia-top-nav > .p-top_nav:hover {
opacity: 1;
which inotifywait 2>/dev/null > /dev/null
if [[ $? != 0 ]]; then
echo "can't listen for events, install inotify-tools first"
exit 1
michaelneu /
Last active Feb 23, 2020
A bookmarklet to view the page source on iOS Safari - without sending your URL to a third party service.

view-source on iOS Safari - without 3rd party services

A bookmarklet to display the current page's HTML in a new tab. Supports HTML syntax highlighting and indentation, JavaScript keywords will be highlighted, too.


Before adding the bookmarklet, you need to either build view-source.js, or copy view-source.min.js to your clipboard, as we'll paste this into the bookmarklet later.

Safari apparently doesn't support adding a custom bookmarklet, so you'll need to follow these steps:

michaelneu / .dockerignore
Last active Feb 3, 2020
A script to build esp-idf projects inside a Docker - with writable /dev/ttyUSB* mounted inside the container
View .dockerignore