Skip to content

Instantly share code, notes, and snippets.

@mvtango
mvtango / README.md
Last active February 27, 2020 11:52
Fix <div> inside of <p> for livebridge

Fix <div> inside of <p> for livebridge

Liveblog gives you broken HTML. Here's how to fix it.

Dependencies

  • beautifulsoup

Files:

@mvtango
mvtango / install.sh
Created July 7, 2019 01:53
ssm-install
#! /bin/bash
# from https://docs.aws.amazon.com/systems-manager/latest/userguide/sysman-install-managed-linux.html
mkdir /tmp/ssm
curl https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/debian_amd64/amazon-ssm-agent.deb -o /tmp/ssm/amazon-ssm-agent.deb
sudo dpkg -i /tmp/ssm/amazon-ssm-agent.deb
sudo service amazon-ssm-agent stop
@mvtango
mvtango / service.sh
Created March 28, 2019 12:00
bash service: sync on file change
#! /bin/bash
# Improvement: Use https://github.com/reduardo7/bash-service-manager
# https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
# -o pipefail fail immediately if error in pipe
# -e fail immediately on error
# -E subshells inherit ERR handler
# -u Error on unset variables
# -x Echo all lines to STDERR
@mvtango
mvtango / Makefile
Created August 24, 2018 15:06
Makefile to run a EsperService inside a tomcat docker container using https://github.com/IPVS-AS/EsperService
SHELL := /bin/bash
PWD := $(shell pwd)
target/EsperService-0.0.1.war:
mvn install
# make run MODE=-d - run as daemon
MODE := -it
@mvtango
mvtango / README.md
Last active August 8, 2023 11:04
Auth0: Restrict E-Mails of users that can sign up

auth0-check-for-domain-hook

In hook.js, you'll find a piece of code to ensure that new users' emails match certain criteria.

You'll have to deploy it as a "Pre User Registration" hook at https://manage.auth0.com/#/hooks.

Additionally, enable the "Force Email Verification" rule in https://manage.auth0.com/#/rules - otherwise, new users can sign in without confirming their email addresses first.

@mvtango
mvtango / .gitignore
Last active February 4, 2018 18:04
loghelper.py - e-mail errors using python's loggier module
credentials.py
@mvtango
mvtango / .gitignore
Created January 14, 2018 17:07 — forked from cecilemuller/letsencrypt_2020.md
How to setup Let's Encrypt for Nginx on Ubuntu 16.04 (including IPv6, HTTP/2 and A+ SLL rating)
domainname.txt
@mvtango
mvtango / ribbon-blank.svg
Last active August 29, 2017 10:19
"Fork Me On Github"-style ribbon SVG template
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mvtango
mvtango / keybase.md
Created July 26, 2017 11:23
keybase.md

Keybase proof

I hereby claim:

  • I am mvtango on github.
  • I am mvtango (https://keybase.io/mvtango) on keybase.
  • I have a public key whose fingerprint is ECDE 6DC9 26AD 94A6 A276 1FC3 CCF2 6A71 65BB FF07

To claim this, I am signing this object:

@mvtango
mvtango / README.md
Last active December 20, 2015 23:55
User Style for editing Wordpress Galleries with long captons

Wordpress: Edit galleries with long captions

The normal gallery editing screen in Wordpress is good for re-ordering the images, but bad for editing long captions. The text areas are simply too small.

Using the [Stylish plugin][stylish] in Google Chrome, you can use this stylesheet for an alternative layout of the editing screen.

Screenshot