Skip to content

Instantly share code, notes, and snippets.

View dvdvnl's full-sized avatar

david vnl dvdvnl

View GitHub Profile
@dvdvnl
dvdvnl / Dockerfile
Last active September 5, 2019 13:22
Node-RED authentication with JWT. (Gist for https://www.davole.com/2019/node-red-authentication-jwt)
FROM nodered/node-red-docker:v10
# Copy configuration
COPY ./settings.js /data/settings.js
COPY ./public.pem /data/public.pem
# Install additional packages
WORKDIR /usr/src/node-red
RUN npm install passport passport-jwt
@dvdvnl
dvdvnl / logon-script.sh
Last active September 16, 2019 08:35
Send a Pushbullet note whenever a login happens. (Gist for https://www.davole.com/2019/pushbullet-on-login)
#!/bin/bash
accessToken="<Pushbullet Access Token>"
recipient="<Recipient e-mail>"
title="Login - $HOSTNAME"
body="The user '$USER' just logged in to '$HOSTNAME'."
curl -X POST \
--header "Access-Token: $accessToken" \
@dvdvnl
dvdvnl / cups.dockerfile
Last active June 21, 2019 06:49
Docker: MFP with CUPS and SANE (Gist for https://www.davole.com/2019/docker-mfp-cups-sane/)
FROM debian:stable
RUN apt-get update && apt-get upgrade -y && \
apt-get install -y sudo whois usbutils
# Install & configure CUPS
RUN apt-get install -y cups hplip hp-ppd hpijs-ppds
COPY ./cupsd.conf /etc/cups/cupsd.conf
# Add CUPS user
@dvdvnl
dvdvnl / chrome-17.0.963.46.css
Last active June 21, 2019 06:16
Border bug reproduction code for Chrome 17.0.963.46 (legacy gist for https://www.davole.com/2012/chrome-17-0-963-46-border-bug)
.buggy-chrome .messedUpElement{
border-bottom-left-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
@dvdvnl
dvdvnl / .bash_prompt
Created March 28, 2018 12:56
bash config
# @gf3’s Sexy Bash Prompt, inspired by “Extravagant Zsh Prompt”
# Shamelessly copied from https://github.com/gf3/dotfiles
default_username='unknown'
PROMPTCHAR="\$"
if [[ $COLORTERM = gnome-* && $TERM = xterm ]] && infocmp gnome-256color >/dev/null 2>&1; then
export TERM=gnome-256color
elif infocmp xterm-256color >/dev/null 2>&1; then
export TERM=xterm-256color
global
tune.ssl.default-dh-param 2048
maxconn 100
daemon
defaults
mode http
timeout connect 4s
timeout http-request 1s

Angular Pipes

  • Object Filter - objectfilter.pipe.ts
  • Object Sum - objectsum.pipe.ts
  • Money Formatter - money.pipe.ts