Skip to content

Instantly share code, notes, and snippets.

Rinze de Laat biermeester

Block or report user

Report or block biermeester

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@biermeester
biermeester / pre-commit
Last active Aug 16, 2018
Git hook pre-commit script for stripping output and irrelevant metadata from Jupyter notebooks
View pre-commit
#!/usr/bin/env python3
"""
Git pre-commit hook script
Strips output from Jupyter Notebooks
"""
import os
import sys
@biermeester
biermeester / css_property_to_typescript.py
Created Aug 13, 2018
Script used to help extract data from the Google Caja project
View css_property_to_typescript.py
from itertools import groupby
# Caja tag information can be gotten from:
# https://github.com/google/caja/tree/1056be89dad487f9178d89f462fe5cb207c7e604/src/com/google/caja/lang/html
caja_tags = ['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'command', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dir', 'div', 'dl', 'dt', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'map', 'mark', 'menu', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'pre', 'progress', 'q', 's', 'samp', 'section', 'select', 'small', 'source', 'span', 'strike', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']
sa
@biermeester
biermeester / css_test.ipynb
Created Aug 13, 2018
Jupyterlab Notebook used for testing inline CSS styles on HTML tags embedded in Markdown text
View css_test.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@biermeester
biermeester / multiconf.py
Created Sep 5, 2012 — forked from facelessuser/multiconf.py
Multiconf, defining host dependent Sublime Text plugin configuration values
View multiconf.py
import socket
import sublime
import re
""" Copyright (C) 2012 Isaac Muse
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CON
@biermeester
biermeester / gist:1992197
Created Mar 7, 2012
Determine if the given parameter is a valid (Dutch) social security number, known as Burger Service Nummer.
View gist:1992197
def is_eleven_proof(bsn):
""" Determine if the given parameter is a valid (Dutch) social security
number, known as Burger Service Nummer.
The parameter may be an integer or a string. Non-digit characters will
be filtered out.
The function returns 'True' if the number is valid and 'False'
otherwise.
"""
if isinstance(bsn, (str, unicode)):
You can’t perform that action at this time.